[android] Ui fixes for position chooser.

This commit is contained in:
Dmitry Yunitsky 2016-04-07 15:43:59 +03:00 committed by Alex Zolotarev
parent 21ed23341c
commit 50adfabb3c

View file

@ -398,10 +398,12 @@ public class MwmActivity extends BaseMwmFragmentActivity
public void showPositionChooser(boolean show)
{
Statistics.INSTANCE.trackEditorLaunch(true);
if (show)
Statistics.INSTANCE.trackEditorLaunch(true);
UiUtils.showIf(show, mPositionChooser);
setFullscreen(show);
Framework.nativeTurnChoosePositionMode(show);
closePlacePage();
}
private void initMap()
@ -490,6 +492,17 @@ public class MwmActivity extends BaseMwmFragmentActivity
mMainMenu.close(true, procAfterClose);
}
private boolean closePositionChooser()
{
if (mPositionChooser.getVisibility() == View.VISIBLE)
{
showPositionChooser(false);
return true;
}
return false;
}
private void startLocationToPoint(String statisticsEvent, String alohaEvent, final @Nullable MapObject endPoint)
{
closeMenu(statisticsEvent, alohaEvent, new Runnable()
@ -1029,7 +1042,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
return;
}
if (!closePlacePage() && !closeSidePanel() && !RoutingController.get().cancel())
if (!closePlacePage() && !closeSidePanel() &&
!RoutingController.get().cancel() && !closePositionChooser())
super.onBackPressed();
}