Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4de519c7a0
2 changed files with 16 additions and 8 deletions
|
@ -913,7 +913,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
|||
Animator circleAnimator = ViewAnimationUtils.createCircularReveal(content, centerX, centerY, initialRadius, finalRadius);
|
||||
animators.add(circleAnimator);
|
||||
}
|
||||
float initialValueScale = show ? 0f : 1f;
|
||||
final float initialValueScale = show ? 0f : 1f;
|
||||
float finalValueScale = show ? 1f : 0f;
|
||||
animators.add(ObjectAnimator.ofFloat(content, View.SCALE_X, initialValueScale, finalValueScale));
|
||||
animators.add(ObjectAnimator.ofFloat(content, View.SCALE_Y, initialValueScale, finalValueScale));
|
||||
|
@ -946,6 +946,8 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
|||
content.setTranslationX(0);
|
||||
content.setTranslationY(0);
|
||||
toolbar.setTranslationY(0);
|
||||
content.setScaleX(initialValueScale);
|
||||
content.setScaleY(initialValueScale);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -639,16 +639,19 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
private void animateMapControls(final boolean show) {
|
||||
final View mapHudButtonsOverlay = mapActivity.findViewById(R.id.MapHudButtonsOverlay);
|
||||
View mapHudButtonsTop = mapActivity.findViewById(R.id.MapHudButtonsOverlayTop);
|
||||
View mapHudButtonsBottom = mapActivity.findViewById(R.id.MapHudButtonsOverlayBottom);
|
||||
View mapHudButtonsQuickActions = mapActivity.findViewById(R.id.MapHudButtonsOverlayQuickActions);
|
||||
AnimatorSet set = new AnimatorSet();
|
||||
float transTopInitial = show ? -mapHudButtonsTop.getHeight() : 0;
|
||||
final View mapHudButtonsTop = mapActivity.findViewById(R.id.MapHudButtonsOverlayTop);
|
||||
final View mapHudButtonsBottom = mapActivity.findViewById(R.id.MapHudButtonsOverlayBottom);
|
||||
final View mapHudButtonsQuickActions = mapActivity.findViewById(R.id.MapHudButtonsOverlayQuickActions);
|
||||
|
||||
final float transTopInitial = show ? -mapHudButtonsTop.getHeight() : 0;
|
||||
final float transBottomInitial = show ? mapHudButtonsBottom.getHeight() : 0;
|
||||
final float alphaInitial = show ? 0f : 1f;
|
||||
|
||||
float transTopFinal = show ? 0 : -mapHudButtonsTop.getHeight();
|
||||
float transBottomInitial = show ? mapHudButtonsBottom.getHeight() : 0;
|
||||
float transBottomFinal = show ? 0 : mapHudButtonsBottom.getHeight();
|
||||
float alphaInitial = show ? 0f : 1f;
|
||||
float alphaFinal = show ? 1f : 0f;
|
||||
|
||||
AnimatorSet set = new AnimatorSet();
|
||||
set.setDuration(300).playTogether(
|
||||
ObjectAnimator.ofFloat(mapHudButtonsTop, View.TRANSLATION_Y, transTopInitial, transTopFinal),
|
||||
ObjectAnimator.ofFloat(mapHudButtonsBottom, View.TRANSLATION_Y, transBottomInitial, transBottomFinal),
|
||||
|
@ -668,6 +671,9 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
super.onAnimationEnd(animation);
|
||||
if (!show) {
|
||||
mapHudButtonsOverlay.setVisibility(View.INVISIBLE);
|
||||
mapHudButtonsTop.setTranslationY(transTopInitial);
|
||||
mapHudButtonsBottom.setTranslationY(transBottomInitial);
|
||||
mapHudButtonsQuickActions.setAlpha(alphaInitial);
|
||||
}
|
||||
mapActivity.updateStatusBarColor();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue