Test displaying last segment

This commit is contained in:
PavelRatushny 2017-07-10 10:42:31 +03:00
parent d3c2b5c9fb
commit 7624cd36ec
3 changed files with 12 additions and 0 deletions

View file

@ -521,6 +521,7 @@ public class GPXUtilities {
if (speed > 0) { if (speed > 0) {
totalSpeedSum += speed; totalSpeedSum += speed;
// android.util.Log.d(GPXUtilities.class.getSimpleName(), "metricEnd: " + s.metricEnd + " speed: " + speed);
minSpeed = Math.min(speed, minSpeed); minSpeed = Math.min(speed, minSpeed);
maxSpeed = Math.max(speed, maxSpeed); maxSpeed = Math.max(speed, maxSpeed);
speedCount++; speedCount++;

View file

@ -48,6 +48,10 @@ public class TrackActivity extends TabActivity {
private List<GpxDisplayGroup> originalGroups = new ArrayList<>(); private List<GpxDisplayGroup> originalGroups = new ArrayList<>();
private boolean stopped = false; private boolean stopped = false;
public PagerSlidingTabStrip getSlidingTabLayout() {
return slidingTabLayout;
}
@Override @Override
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
((OsmandApplication) getApplication()).applyTheme(this); ((OsmandApplication) getApplication()).applyTheme(this);
@ -234,6 +238,9 @@ public class TrackActivity extends TabActivity {
((TrackSegmentFragment) frag).updateSplitView(); ((TrackSegmentFragment) frag).updateSplitView();
} }
} }
if (isHavingWayPoints() || isHavingRoutePoints()) {
getSlidingTabLayout().setVisibility(View.VISIBLE);
}
getSupportFragmentManager().popBackStack(); getSupportFragmentManager().popBackStack();
return true; return true;
} }
@ -264,6 +271,9 @@ public class TrackActivity extends TabActivity {
((TrackSegmentFragment) frag).updateSplitView(); ((TrackSegmentFragment) frag).updateSplitView();
} }
} }
if (isHavingWayPoints() || isHavingRoutePoints()) {
getSlidingTabLayout().setVisibility(View.VISIBLE);
}
getSupportFragmentManager().popBackStack(); getSupportFragmentManager().popBackStack();
return; return;
} }

View file

@ -1472,6 +1472,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
} }
void openSplitIntervalScreen() { void openSplitIntervalScreen() {
getMyActivity().getSlidingTabLayout().setVisibility(View.GONE);
getMyActivity().getSupportFragmentManager() getMyActivity().getSupportFragmentManager()
.beginTransaction() .beginTransaction()
.replace(R.id.track_activity_layout, new SplitSegmentFragment()) .replace(R.id.track_activity_layout, new SplitSegmentFragment())