Remove title bar title
Before setcontentview (R. layout. Main) in this method, add:
Requestwindowfeature (window. feature_no_title); the title bar is gone.
2. Implementation in androidmanifest. xml:
You can add the following configuration when registering an activity.
<Activity Android: Name = ". Activity"
Android: theme = "@ Android: style/theme. notitlebar"
> </Activity>
**************************************** ************************************
Set full screen
Requestwindowfeature (window. feature_no_title );
Getwindow (). setflags (windowmanager. layoutparams. flag_fullscreen,
Windowmanager. layoutparams. flag_fullscreen );
**************************************** ************************************
Get Mobile Phone resolution
Displaymetrics dm = new displaymetrics ();
This. getwindowmanager (). getdefaultdisplay (). getmetrics (DM );
Int width = DM. widthpixels;
Int Height = DM. heightpixels;
Horizontal and vertical screen display
private void changedScreen() {int request = this.getRequestedOrientation();if (request == -1) {Toast.makeText(getApplicationContext(), "None 1",Toast.LENGTH_SHORT).show();} else {if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);} else if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);}}}}