Show points tab always

This commit is contained in:
Alexey Kulish 2018-05-16 15:10:27 +03:00
parent 989b9f6fb1
commit 30b003035b

View file

@ -397,12 +397,10 @@ public class TrackActivity extends TabActivity {
OsmandFragmentPagerAdapter pagerAdapter = (OsmandFragmentPagerAdapter) viewPager.getAdapter(); OsmandFragmentPagerAdapter pagerAdapter = (OsmandFragmentPagerAdapter) viewPager.getAdapter();
if (pagerAdapter != null && pagerAdapter.getCount() == 0) { if (pagerAdapter != null && pagerAdapter.getCount() == 0) {
pagerAdapter.addTab(getTabIndicator(R.string.gpx_track, TrackSegmentFragment.class)); pagerAdapter.addTab(getTabIndicator(R.string.gpx_track, TrackSegmentFragment.class));
if (hasWayPoints() || hasRoutePoints()) {
pagerAdapter.addTab(getTabIndicator(R.string.points, TrackPointFragment.class)); pagerAdapter.addTab(getTabIndicator(R.string.points, TrackPointFragment.class));
if (openPointsTab || !hasTrackPoints()) { if (openPointsTab || !hasTrackPoints()) {
viewPager.setCurrentItem(1, false); viewPager.setCurrentItem(1, false);
} }
}
if (pagerAdapter.getCount() > 1) { if (pagerAdapter.getCount() > 1) {
boolean nightMode = !app.getSettings().isLightContent(); boolean nightMode = !app.getSettings().isLightContent();