Rotate Animation Android From Top Right,bottom Left, Bottom Right In Android?
The below code helps me to rotate through left top edge of screen when swipe. can any one helps me how to rotate through remaining edges of the screen like top right edge, bottom r
Solution 1:
You may use this code:
RotateAnimation r=newRotateAnimation(0,90);
RotateAnimation r=newRotateAnimation(180,270);
RotateAnimation r=newRotateAnimation(270,360);
Solution 2:
If you need coordinates of imageview to rotate on particular edge you can get by using
Rectrect=newRect();
imageview.getLocalVisibleRect(rect);
intbottomimagevalue= rect.bottom;
intrightimagevalue= rect.right;
Using this coordinated you can rotate image
RotateAnimation r=newRotateAnimation(130,0,bottomimagevalue,rightimagevalue);
the above is example for rotating image from bottom right corner
Post a Comment for "Rotate Animation Android From Top Right,bottom Left, Bottom Right In Android?"