I am trying to rotate this image by using a thread. what should I do?
public class Start extends Activity {
View base;
Bitmap
You can create an extension in Kotlin :
fun ImageView.rotate(){
val rotateAnimation = RotateAnimation(
0f, 359f,
Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f
)
rotateAnimation.duration = 300
rotateAnimation.setAnimationListener(object : Animation.AnimationListener {
override fun onAnimationStart(animation: Animation?) {}
override fun onAnimationRepeat(animation: Animation?) {}
override fun onAnimationEnd(animation: Animation?) {}
})
this.startAnimation(rotateAnimation)
}