Rotate Animation to ImageView

Rotate the image at center axis, by using Rotate Animation.

RotateAnimation anim = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f,Animation.RELATIVE_TO_SELF, 0.5f);
        anim.setInterpolator(new LinearInterpolator());
        anim.setRepeatCount(Animation.INFINITE);
        anim.setDuration(1500);

and set into image like this

imageView.startAnimation(anim);

Comments

Popular posts from this blog

Mastering API Development: Why Postman Reigns Supreme Over Swagger

Email Address Validation

Flutter web view