Thursday, February 21, 2019

Rotate view an angle

We want a view like TextView, Image, Button rotate an angle, copy this line to below findViewById.
view.setRotation(deegree);    
For example, we rotate a TextView 45°.
TextView.setRotation(45);

Rotate to right angle, change to 90°.

To rotate upside down, change to 180°.


No comments:

Post a Comment