I have tried the following code but still it will not work properly for me.
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
You may try the following,
View view = getWindow().getDecorView();
// Hide the Status bar
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
view.setSystemUiVisibility(uiOptions);
// Hide ActionBar
ActionBar actionBar = getActionBar();
actionBar.hide();
or Simply add the style in manifest,
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.