How to automatically screen orientation android
Screen Orientation Android
The screenOrientation is the attribute of activity element. The orientation of android activity can be portrait, landscape, sensor, unspecified etc..
Being the attribute of the activity element, the screen Orientation allows the orientation of an android activity.
The orientation type is defined in the AndroidManifest.xml
Common values for screenOrientation attribute:
|unspecified||Being the default value, the system chooses the orientation.|
|portrait||The orientation is taller not wider.|
|landscape||The orientation is wider, not taller.|
|sensor||The orientation is specified by the device orientation sensor.|
Android Portrait and Landscape mode screen orientation example:
Here we are going to create two activities with different screen orientations.