Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <scale
  2. android:fromXScale="1.0"
  3. android:fromYScale="1.0"
  4. android:pivotX="50%"
  5. android:pivotY="50%"
  6. android:toXScale="1.3"
  7. android:toYScale="1.3"
  8. android:duration="1000"
  9. />
  10.  
  11. scale.setAnimationListener(new Animation.AnimationListener() {
  12.  
  13. @Override
  14. public void onAnimationEnd(Animation animation) {
  15. start1_value=1;
  16. Start1.setScaleX((float) 1.3);
  17. Start1.setScaleY((float) 1.3);
  18.  
  19. }
  20.  
  21. });
  22.  
  23. ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 1.3f);
  24. ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 1.3f);
  25. AnimatorSet scale = new AnimatorSet();
  26.  
  27. scaleX.setDuration(1000);
  28. scaleY.setDuration(1000);
  29. scale.play(scaleX).with(scaleY);
  30.  
  31. scale.start();
  32.  
  33. imageView.animate().scaleX(toX).scaleY(toY).setDuration(1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement