0

I'm trying to make it so that one of the ImageViews in my activity undergoes a spinning animation where it accelerates quickly and slowly spins to a stop, as if friction is causing it to slow to a stop. I have a good function for this, but I do not know how to make it so that AccelerateDecelerateInterpolator uses this function.

So far my code for this is:

AccelerateDecelerateInterpolator anim = new AccelerateDecelerateInterpolator();

float deg = image.getRotation() + 360F;
image.animate().rotation(deg).setInterpolator(anim);

I have seen another thread for this, but I am not quite sure how to implement the code in the solutions as I am still fairly new. Thanks!

shroomz
  • 13
  • 6
  • Maybe this can help you. [Customize it according to your need & then use it directly by just making an object & setting with any view.](https://stackoverflow.com/a/23015656/10357086) – Dev4Life Jul 31 '21 at 17:25
  • @SweetD3v I had a couple of questions about this actually. Where do I actually add this code? what is getInterpolation? – shroomz Jul 31 '21 at 21:07

0 Answers0