I want to rotate an Image pivoting in the center. I want to use this when i rotate the image I need to load dynamic Text as menu. Like a Jog. Any one pls help me for rotating an image
To rotate an image you can do this:
RotateAnimation rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
ImageView image = findViewById(my image);
image.setAnimation(rotate);
rotate.start();
This will rotate the image one round from 0 to 360 degrees. You can set the duration too:
rotate.setDuration( 500 ); // milliseconds
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With