Lock the screen direction XML Code when the activity is running <activity Android: Name = ". ex01 "Android: Label =" @ string/app_name "Android: screenorientation =" portrait "// portrait screen, landscape screen when the value is landscape ............ </Activity>
Full Screen Activity
To make an activity run in full screen mode, you can add the following code implementation in its oncreate () method: Java code // set the full screen mode getwindow (). setflags (windowmanager. layoutparams. flag_fullscreen, windowmanager. layoutparams. flag_fullscreen); // remove the title bar requestwindowfeature (window. feature_no_title); add progress bar to Activity title: implementation code: Java code // unknown progress bar requestwindowfeature (window. feature_indeterminate_progress); setcontentview (R. layout. main); setprogressbarindeterminatevisibility (true); // call it at the position where the load is completed to make the progressbar on the title disappear
Setprogressbarindeterminatevisibility (false );
// Specify the progress bar requestwindowfeature (window. feature_progress); setcontentview (R. layout. Main); setprogress (5000 );
During use, we first need to declare before setcontentview: requestwindowfeature (window. feature_indeterminate_progress); call progress (true) when you need to display the progress; then call setprogressbarindeterminatevisibility (false) when you stop );