Rename field; remove unnecessary code
This commit is contained in:
parent
70af381956
commit
792f527911
3 changed files with 8 additions and 9 deletions
|
@ -321,7 +321,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
fm.beginTransaction()
|
||||
.remove(planRouteFragment)
|
||||
.commitNowAllowingStateLoss();
|
||||
app.getMapMarkersHelper().getPlanRouteContext().setFragmentShowed(true);
|
||||
app.getMapMarkersHelper().getPlanRouteContext().setFragmentVisible(true);
|
||||
}
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
@ -568,7 +568,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
super.onResume();
|
||||
long tm = System.currentTimeMillis();
|
||||
|
||||
if (app.getMapMarkersHelper().getPlanRouteContext().isFragmentShowed()) {
|
||||
if (app.getMapMarkersHelper().getPlanRouteContext().isFragmentVisible()) {
|
||||
PlanRouteFragment.showInstance(getSupportFragmentManager(), AndroidUiHelper.isOrientationPortrait(this));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MarkersPlanRouteContext {
|
|||
|
||||
private PlanRouteProgressListener listener;
|
||||
private boolean progressBarVisible;
|
||||
private boolean fragmentShowed;
|
||||
private boolean fragmentVisible;
|
||||
|
||||
Map<Pair<WptPt, WptPt>, List<WptPt>> getSnappedToRoadPoints() {
|
||||
return snappedToRoadPoints;
|
||||
|
@ -73,12 +73,12 @@ public class MarkersPlanRouteContext {
|
|||
this.progressBarVisible = progressBarVisible;
|
||||
}
|
||||
|
||||
public boolean isFragmentShowed() {
|
||||
return fragmentShowed;
|
||||
public boolean isFragmentVisible() {
|
||||
return fragmentVisible;
|
||||
}
|
||||
|
||||
public void setFragmentShowed(boolean fragmentShowed) {
|
||||
this.fragmentShowed = fragmentShowed;
|
||||
public void setFragmentVisible(boolean fragmentVisible) {
|
||||
this.fragmentVisible = fragmentVisible;
|
||||
}
|
||||
|
||||
public MarkersPlanRouteContext(OsmandApplication app) {
|
||||
|
|
|
@ -695,14 +695,13 @@ public class PlanRouteFragment extends Fragment {
|
|||
if (portrait && markersListOpened) {
|
||||
hideMarkersList();
|
||||
}
|
||||
planRouteContext.setFragmentShowed(false);
|
||||
planRouteContext.setFragmentVisible(false);
|
||||
activity.getSupportFragmentManager().beginTransaction().remove(this).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
public static boolean showInstance(FragmentManager fragmentManager, boolean portrait) {
|
||||
try {
|
||||
PlanRouteFragment fragment = new PlanRouteFragment();
|
||||
fragment.setRetainInstance(true);
|
||||
fragmentManager.beginTransaction()
|
||||
.add(portrait ? R.id.bottomFragmentContainer : R.id.topFragmentContainer, fragment, PlanRouteFragment.TAG)
|
||||
.commitAllowingStateLoss();
|
||||
|
|
Loading…
Reference in a new issue