Android screenorientation screen orientation settings and controls

Source: Internet
Author: User


Set value in Activity tab in Androidmanifest.xml:

android:screenorientation= "Landscape" for 90 degrees (horizontal screen)

Android:screenorientation= "Reverselandscape" is 270 degrees (anti-Shang)

Android:screenorientation= "Sensorlandscape" for 90 degrees and 270 degrees according to g-sensor switching (horizontal screen switching)


android:screenorientation= "Portrait" For 0 degrees (vertical screen)

Android:screenorientation= "reverseportrait" is 180 degrees (reverse vertical screen)

Android:screenorientation= "sensorportrait" for switching between 0 and 180 degrees (vertical toggle)




android:screenorientation="Nosensor"

When setting the activity screen orientation to not follow the sensor nosensor , theactivity page does not turn to the screen, regardless of whether the system is set to auto-turn.

android:screenorientation="Sensor"

When you set the activity screen orientation to follow sensor sensors , theactivity page will follow the sensor to the screen, regardless of whether the system is set to auto-turn the screen.

In summary, the screenorientation set in the activity will take precedence over the system's auto-turn screen settings.


More commonly used, we hope to help!




Android screenorientation screen orientation settings and controls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.