diff --git a/OsmAnd/res/layout/gpx_split_segment_fragment.xml b/OsmAnd/res/layout/gpx_split_segment_fragment.xml index 788f97561c..4741ce93ef 100644 --- a/OsmAnd/res/layout/gpx_split_segment_fragment.xml +++ b/OsmAnd/res/layout/gpx_split_segment_fragment.xml @@ -309,7 +309,7 @@ android:layout_height="wrap_content" android:layout_marginTop="3dp" android:background="@null" - android:text="@string/range" + android:text="@string/range_min_max" android:textColor="?android:attr/textColorSecondary" android:textSize="@dimen/default_split_segments_sub" /> diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index c876a73227..be8990d1a3 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -275,7 +275,7 @@ public class GPXUtilities { public double minElevation = 99999; public double maxElevation = -100; - public float minSpeed = 0; + public float minSpeed = Float.MAX_VALUE; public float maxSpeed = 0; public float avgSpeed; @@ -519,13 +519,9 @@ public class GPXUtilities { hasElevationData = true; } + minSpeed = Math.min(speed, minSpeed); if (speed > 0) { totalSpeedSum += speed; - if (minSpeed == 0) { - minSpeed = speed; - } else { - minSpeed = Math.min(speed, minSpeed); - } maxSpeed = Math.max(speed, maxSpeed); speedCount++; } diff --git a/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java b/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java index 86cbbc353e..b0286a90e6 100644 --- a/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/TrackActivity.java @@ -48,6 +48,10 @@ public class TrackActivity extends TabActivity { private List originalGroups = new ArrayList<>(); private boolean stopped = false; + public PagerSlidingTabStrip getSlidingTabLayout() { + return slidingTabLayout; + } + @Override public void onCreate(Bundle icicle) { ((OsmandApplication) getApplication()).applyTheme(this); @@ -235,6 +239,9 @@ public class TrackActivity extends TabActivity { } } getSupportFragmentManager().popBackStack(); + if (isHavingWayPoints() || isHavingRoutePoints()) { + getSlidingTabLayout().setVisibility(View.VISIBLE); + } return true; } } @@ -265,6 +272,9 @@ public class TrackActivity extends TabActivity { } } getSupportFragmentManager().popBackStack(); + if (isHavingWayPoints() || isHavingRoutePoints()) { + getSlidingTabLayout().setVisibility(View.VISIBLE); + } return; } } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java index b0d52a599f..67314082a6 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SplitSegmentFragment.java @@ -544,7 +544,7 @@ public class SplitSegmentFragment extends OsmAndListFragment { String maxSpeed = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app); String minSpeed = OsmAndFormatter.getFormattedSpeed(analysis.minSpeed, app); - String max_min_speed = maxSpeed.substring(0, maxSpeed.indexOf(" ")).concat("/").concat(minSpeed.substring(0, minSpeed.indexOf(" "))); + String max_min_speed = maxSpeed.substring(0, maxSpeed.indexOf(" ")).concat("/").concat(minSpeed); if (minSpeed.substring(0, minSpeed.indexOf(" ")).equals("0") || minSpeed.substring(0, minSpeed.indexOf(" ")).equals("0.0")) { (convertView.findViewById(R.id.max_speed_value)) .setVisibility(View.VISIBLE); diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java index 0ddbe9373f..bf4587fc83 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackSegmentFragment.java @@ -1477,6 +1477,7 @@ public class TrackSegmentFragment extends OsmAndListFragment { .replace(R.id.track_activity_layout, new SplitSegmentFragment()) .addToBackStack(SplitSegmentFragment.TAG) .commit(); + getMyActivity().getSlidingTabLayout().setVisibility(View.GONE); } private class SplitTrackAsyncTask extends AsyncTask {