Fixed blinking issue of gpx chart
This commit is contained in:
parent
f4bcee4315
commit
0075f5fe73
2 changed files with 16 additions and 7 deletions
|
@ -6,13 +6,13 @@
|
|||
android:background="?attr/expandable_list_item_background"
|
||||
android:minHeight="@dimen/list_item_height"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="@dimen/list_content_padding" >
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -34,7 +34,7 @@
|
|||
android:maxLines="2"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
tools:text="Additional" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
|
@ -45,7 +45,7 @@
|
|||
android:layout_weight="1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="@string/lorem_ipsum" />
|
||||
tools:text="Name" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -60,7 +60,9 @@
|
|||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_desc_text_size" />
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
android:paddingLeft="@dimen/list_content_padding"
|
||||
android:paddingRight="@dimen/list_content_padding"/>
|
||||
|
||||
<com.github.mikephil.charting.charts.LineChart
|
||||
android:id="@+id/chart"
|
||||
|
|
|
@ -488,6 +488,10 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
|||
mChart.setDrawBorders(false);
|
||||
mChart.getDescription().setEnabled(false);
|
||||
mChart.setMaxVisibleValueCount(10);
|
||||
mChart.setMinOffset(0f);
|
||||
|
||||
mChart.setExtraTopOffset(24f);
|
||||
mChart.setExtraBottomOffset(16f);
|
||||
|
||||
// create a custom MarkerView (extend MarkerView) and specify the layout
|
||||
// to use for it
|
||||
|
@ -506,6 +510,9 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
|||
yAxis.enableGridDashedLine(10f, 5f, 0f);
|
||||
yAxis.setGridColor(ActivityCompat.getColor(getActivity(), R.color.divider_color));
|
||||
yAxis.setDrawAxisLine(false);
|
||||
yAxis.setPosition(YAxis.YAxisLabelPosition.INSIDE_CHART);
|
||||
yAxis.setXOffset(16f);
|
||||
yAxis.setYOffset(-8f);
|
||||
|
||||
Legend legend = mChart.getLegend();
|
||||
legend.setEnabled(false);
|
||||
|
|
Loading…
Reference in a new issue