Android Setting horizontal screen vertical screen

Source: Internet
Author: User

GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // Set up screen mode   Setrequestedorientation (Activityinfo.screen_orientation_landscape); // Force for horizontal screen   Setrequestedorientation (activityinfo.screen_orientation_portrait); // Vertical Screen  

set the value of android:screenorientation in activity.
the android:screenorientation property has the following values:
unspecified(default, automatically switched by system-determined state), the default value. The system chooses the orientation. The policy it uses, and therefore the choices made in specific contexts, could differ from device to device.
Landscape, horizontal screen
Portrait, vertical screen
User (the orientation value that is currently set by users), the user's current preferred orientation.
behind(the orientation value of the activity to be displayed next), the same orientation as the activity that's immediately beneath it in t He activity stack.
sensor (direction of transducer), the orientation determined by a physical orientation sensor. The orientation of the display depends on what the user is holding the device; It changes when the user rotates the device.
nosensor(without the use of a sensor, this effect is almost equal to unspecified). An orientation determined without reference to a physical orientation sensor. The sensor is ignored, so the display would not be rotate based on how the user moves the device. Except for this distinction, the system chooses the orientation using the same policy as for the "unspecified" setting.

Android Setting horizontal screen vertical screen

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.