Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. public void animateFAB(FABStates state) {
  2. if (state.equals(FABStates.show)) {
  3. isFABOpen = true;
  4.  
  5. viewPager.animate()
  6. .scaleY(1f)
  7. .setInterpolator(INTERPOLATOR)
  8. .setDuration(500);
  9.  
  10. mapUtilsContainer.animate().scaleY(1f)
  11. .setInterpolator(INTERPOLATOR)
  12. .setDuration(500);
  13.  
  14. MapView mapV = mapFragment.getMapView();
  15. ViewGroup.LayoutParams lps = mapV.getLayoutParams();
  16. lps.height = ViewGroup.LayoutParams.MATCH_PARENT;
  17. mapV.requestLayout();
  18.  
  19. // for (int v = 0; v < FABMenu.length; v++) {
  20. // FABMenu[v].animate().translationX(0).setStartDelay(90 * v);
  21. // }
  22. } else {
  23. isFABOpen = false;
  24. mapUtilsContainer.setPivotY(mapUtilsContainer.getMeasuredHeight());
  25. mapUtilsContainer.setPivotX(0);
  26.  
  27. viewPager.animate()
  28. .scaleY(1.5f)
  29. .setInterpolator(INTERPOLATOR)
  30. .setDuration(500);
  31. mapUtilsContainer.animate()
  32. .scaleY(0f)
  33. .setInterpolator(INTERPOLATOR)
  34. .setDuration(500);
  35. MapView mapV = mapFragment.getMapView();
  36. ViewGroup.LayoutParams lps = mapV.getLayoutParams();
  37. lps.height = ViewGroup.LayoutParams.MATCH_PARENT;
  38. mapV.requestLayout();
  39.  
  40. // for (int v = 0; v < FABMenu.length; v++) {
  41. // FABMenu[v].animate().translationX(10000).setStartDelay(90 * v);
  42. // }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement