forked from organicmaps/organicmaps
[android] Fixed the "crown" behaviour - too many appearances
This commit is contained in:
parent
ad6e632d65
commit
18d06b4a7a
2 changed files with 9 additions and 5 deletions
|
@ -719,11 +719,15 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
initToggleMapLayerController(frame);
|
||||
View openSubsScreenBtn = frame.findViewById(R.id.subs_screen_btn);
|
||||
mNavAnimationController = new NavigationButtonsAnimationController(
|
||||
zoomIn, zoomOut, myPosition, getWindow().getDecorView().getRootView(), this, openSubsScreenBtn);
|
||||
boolean hasCrownView = Framework.nativeNeedToShowCrown();
|
||||
|
||||
openSubsScreenBtn.setOnClickListener(v -> onCrownClicked());
|
||||
UiUtils.showIf(Framework.nativeNeedToShowCrown(), openSubsScreenBtn);
|
||||
mNavAnimationController = new NavigationButtonsAnimationController(
|
||||
zoomIn, zoomOut, myPosition, getWindow().getDecorView().getRootView(), this,
|
||||
hasCrownView ? openSubsScreenBtn : null);
|
||||
|
||||
UiUtils.showIf(hasCrownView, openSubsScreenBtn);
|
||||
if (hasCrownView)
|
||||
openSubsScreenBtn.setOnClickListener(v -> onCrownClicked());
|
||||
}
|
||||
|
||||
private void onCrownClicked()
|
||||
|
|
|
@ -37,7 +37,7 @@ class NavigationButtonsAnimationController
|
|||
NavigationButtonsAnimationController(@NonNull View zoomIn, @NonNull View zoomOut,
|
||||
@NonNull View myPosition, @NonNull final View contentView,
|
||||
@Nullable OnTranslationChangedListener translationListener,
|
||||
@NonNull View crownView)
|
||||
@Nullable View crownView)
|
||||
{
|
||||
mZoomIn = zoomIn;
|
||||
mZoomOut = zoomOut;
|
||||
|
|
Loading…
Add table
Reference in a new issue