From 77e61515d8010ab0e8d4126fab663d1f22997090 Mon Sep 17 00:00:00 2001 From: Skalii Date: Tue, 30 Mar 2021 14:46:01 +0300 Subject: [PATCH] fix replace elements "Time moving" with "Time in motion" --- OsmAnd/res/layout/gpx_item_speed.xml | 4 ++-- .../mapcontextmenu/builders/SelectedGpxMenuBuilder.java | 2 +- .../src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java | 2 +- .../net/osmand/plus/track/GpxBlockStatisticsBuilder.java | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/OsmAnd/res/layout/gpx_item_speed.xml b/OsmAnd/res/layout/gpx_item_speed.xml index 40e1d283b5..66a1d3b74b 100644 --- a/OsmAnd/res/layout/gpx_item_speed.xml +++ b/OsmAnd/res/layout/gpx_item_speed.xml @@ -200,7 +200,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" - android:text="@string/shared_string_time_moving" + android:text="@string/moving_time" android:textColor="?android:attr/textColorSecondary" android:textSize="@dimen/default_desc_text_size" /> @@ -221,7 +221,7 @@ android:layout_width="wrap_content" android:layout_height="@dimen/poi_icon_size" android:layout_marginTop="2dp" - osmand:srcCompat="@drawable/ic_action_time_span" /> + osmand:srcCompat="@drawable/ic_action_time_moving_16" /> diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/SelectedGpxMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/SelectedGpxMenuBuilder.java index 6005ab7215..e4c2bc71ed 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/SelectedGpxMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/SelectedGpxMenuBuilder.java @@ -70,7 +70,7 @@ public class SelectedGpxMenuBuilder extends MenuBuilder { String timeSpan = Algorithms.formatDuration((int) (analysis.timeSpan / 1000), app.accessibilityEnabled()); String timeMoving = Algorithms.formatDuration((int) (analysis.timeMoving / 1000), app.accessibilityEnabled()); - String timeSpanTitle = app.getString(R.string.shared_string_time_span) + " / " + app.getString(R.string.shared_string_time_moving); + String timeSpanTitle = app.getString(R.string.shared_string_time_span) + " / " + app.getString(R.string.moving_time); buildRow(view, getThemedIcon(R.drawable.ic_action_time_span), null, timeSpanTitle, timeSpan + " / " + timeMoving, 0, null, false, null, false, 0, false, false, false, null, false); diff --git a/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java index 8f0c5a1dc5..6f5083d8b2 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/GPXItemPagerAdapter.java @@ -308,7 +308,7 @@ public class GPXItemPagerAdapter extends PagerAdapter implements CustomTabProvid ((ImageView) view.findViewById(R.id.max_icon)) .setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_max_speed)); ((ImageView) view.findViewById(R.id.time_moving_icon)) - .setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_time_span)); + .setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_time_moving_16)); ((ImageView) view.findViewById(R.id.distance_icon)) .setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_polygom_dark)); diff --git a/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java b/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java index 35ee1e08bb..d4bef49ecf 100644 --- a/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java +++ b/OsmAnd/src/net/osmand/plus/track/GpxBlockStatisticsBuilder.java @@ -253,10 +253,8 @@ public class GpxBlockStatisticsBuilder { } public void prepareDataTimeMoving(long timeMoving) { - prepareData(app.getString(tabItem == GPX_TAB_ITEM_SPEED ? R.string.shared_string_time_moving : R.string.moving_time), - Algorithms.formatDuration((int) (timeMoving / 1000), app.accessibilityEnabled()), - tabItem == GPX_TAB_ITEM_SPEED ? R.drawable.ic_action_time_span_16 : R.drawable.ic_action_time_moving_16, - GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_MOVING); + prepareData(app.getString(R.string.moving_time), Algorithms.formatDuration((int) (timeMoving / 1000), app.accessibilityEnabled()), + R.drawable.ic_action_time_moving_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_MOVING); } public void prepareDataDistanceCorrected(float totalDistanceMoving) {