Ext.: http://blog.csdn.net/nmgchfzhzhg/article/details/8077133
In the development of Android applications, it is sometimes necessary to limit the screen shift. You only need to include the Android:screenorientation attribute limit in the Androidmanifest.xml file.
android:screenorientation= "Landscape" is to limit the horizontal display of this page, android:screenorientation= "Portrait" is to limit the number of pages on the vertical screen.
[HTML]View Plaincopy
android:screenorientation= "Landscape" is to limit the horizontal display of this page, android:screenorientation= "Portrait" is to limit the number of pages on the vertical screen.
Android:screenorientation sets the direction of the activity, which can be any one of the following strings:
"Unspecified"
-Implied value. The system chooses the direction of the display. In different settings may vary.
"Landscape"
-Horizontal direction
"Portrait"
-To
"User"
-User's first choice direction
"Behind"
-In the same direction as the activity in the live heap
"Sensor"
-the direction of the sensor is determined by the physical direction of the transmitter. Depending on the direction the user is holding, when the user spins the equipment, it changes.
"Nosensor"
-Do not physically direction the transmitter to set the direction. The transmitter is ignored, so when the user spins the device, it does not change. In addition to this area, the system chooses to use the same policy orientation for "unspecified" setup. The system chooses the same display direction according to "unspecified" ("unspecified").
If you want the activity's view interface to be full-screen, simply hide the top signal bar and the activity's title bar and hide the code from the title bar:
Requestwindowfeature (Window.feature_no_title);
The code in the config file: android:theme= "@android: Style/theme.notitlebar" hides the code of the signal bar: GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); Other uses: GetWindow (). SetFlags (WindowManager.LayoutParams.TYPE_STATUS_BAR, WindowManager.LayoutParams.TYPE_ Status_bar);
Android:screenorientation Property--limit screen to toggle