Set the activity screen to full screen in code and set the status of the screen
GetWindow (). SetFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // go to the status bar, full screen display setrequestedorientation (activityinfo.screen_orientation_landscape); // Force screen for horizontal screen setrequestedorientation (activityinfo.screen_orientation_portrait); // Force screen as vertical screen
Settings in the manifest file
<activity android:name=". Test" android:label="@string/app_name" Android : screenorientation="landscape" />
The horizontal screen property is "landscape" and the vertical screen property is "portrait". Other properties: "User", "behind" (the direction of the next activity), "sensor" (transducer direction), "Nosensor" (without sensor orientation), "unspecified" (default state, controlled by system).
Just remove the manifest setting from the title bar
Android:theme= "@android/theme.notitlebar"
Just remove the code from the title bar
Requestwindowfeatrue (Window.featrue_no_title);
Android Screen control