0

I am new to android, and I was learning animation. I figured out that we could use items in the selector and apply as a background. How do I rotate an ImageView using animation?

Azhagthott
  • 492
  • 5
  • 13
  • Does this answer your question? [Rotating a view in Android](https://stackoverflow.com/questions/1930963/rotating-a-view-in-android) – JKD Sep 24 '20 at 07:56
  • Hello, It's very close to my question but it's not exactly that. –  Sep 24 '20 at 08:05

1 Answers1

0

In a view (xml) you can use:

android:rotation="15" // that’s means 15 degrees

Programmatically: you can use rotation, for example a TextView

my_textview.rotation = 15F

//Animation:
my_textview.animate()
        .setDuration(600)
        .rotation(15f)
        .start()
Azhagthott
  • 492
  • 5
  • 13
  • Hello Azhagthott, It did change the rotation, But this does not show an animation. –  Sep 24 '20 at 07:53
  • Ahh ok I think was my bad, I didn’t read that you want to create an animation, let me edit my answer – Azhagthott Sep 24 '20 at 07:55