Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void animateFAB(FABStates state) {
- if (state.equals(FABStates.show)) {
- isFABOpen = true;
- viewPager.animate()
- .scaleY(1f)
- .setInterpolator(INTERPOLATOR)
- .setDuration(500);
- mapUtilsContainer.animate().scaleY(1f)
- .setInterpolator(INTERPOLATOR)
- .setDuration(500);
- MapView mapV = mapFragment.getMapView();
- ViewGroup.LayoutParams lps = mapV.getLayoutParams();
- lps.height = ViewGroup.LayoutParams.MATCH_PARENT;
- mapV.requestLayout();
- // for (int v = 0; v < FABMenu.length; v++) {
- // FABMenu[v].animate().translationX(0).setStartDelay(90 * v);
- // }
- } else {
- isFABOpen = false;
- mapUtilsContainer.setPivotY(mapUtilsContainer.getMeasuredHeight());
- mapUtilsContainer.setPivotX(0);
- viewPager.animate()
- .scaleY(1.5f)
- .setInterpolator(INTERPOLATOR)
- .setDuration(500);
- mapUtilsContainer.animate()
- .scaleY(0f)
- .setInterpolator(INTERPOLATOR)
- .setDuration(500);
- MapView mapV = mapFragment.getMapView();
- ViewGroup.LayoutParams lps = mapV.getLayoutParams();
- lps.height = ViewGroup.LayoutParams.MATCH_PARENT;
- mapV.requestLayout();
- // for (int v = 0; v < FABMenu.length; v++) {
- // FABMenu[v].animate().translationX(10000).setStartDelay(90 * v);
- // }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement