Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. ivIcon = findViewById(R.id.ivIcon);
  2. tvIcon = findViewById(R.id.tvIcon);
  3.  
  4. ObjectAnimator scaleX = ObjectAnimator.ofFloat(ivIcon, "scaleX", 1.3F);
  5. scaleX.setRepeatCount(0);
  6. scaleX.setDuration(1000);
  7.  
  8. ObjectAnimator scaleY = ObjectAnimator.ofFloat(ivIcon, "scaleY", 1.3F);
  9. scaleY.setRepeatCount(0);
  10. scaleY.setDuration(1000);
  11.  
  12. ObjectAnimator alpha = ObjectAnimator.ofFloat(ivIcon, "alpha", 0F,1F);
  13. alpha.setRepeatCount(0);
  14. alpha.setDuration(1000);
  15.  
  16. ObjectAnimator scaleX2 = ObjectAnimator.ofFloat(ivIcon, "scaleX", 1F);
  17. scaleX2.setRepeatCount(0);
  18. scaleX2.setDuration(1000);
  19.  
  20. ObjectAnimator scaleY2 = ObjectAnimator.ofFloat(ivIcon, "scaleY", 1F);
  21. scaleY2.setRepeatCount(0);
  22. scaleY2.setDuration(1000);
  23.  
  24. ObjectAnimator translationY = ObjectAnimator.ofFloat(tvIcon, "translationY", 0F);
  25. translationY.setRepeatCount(0);
  26. translationY.setDuration(1000);
  27.  
  28. ObjectAnimator alpha2 = ObjectAnimator.ofFloat(tvIcon, "alpha", 0F,1F);
  29. alpha2.setRepeatCount(0);
  30. alpha2.setDuration(1000);
  31.  
  32. AnimatorSet set = new AnimatorSet();
  33. set.play(scaleX2).after(scaleX);
  34. set.play(scaleY2).after(scaleY);
  35. set.play(translationY).after(scaleX);
  36. set.play(alpha2).after(scaleX);
  37. set.play(scaleX);
  38. set.play(scaleY);
  39. set.play(alpha);
  40. set.start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement