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
精彩评论