网友通过本文主要向大家介绍了应用程序全屏,ipad应用不能全屏,三星s8应用全屏,win10应用全屏,应用全屏等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
应用的全屏和非全屏,应用全屏全屏
/** * 全屏显示 */ private void setFullSreen() { WindowManager.LayoutParams params = getWindow().getAttributes(); params.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; getWindow().setAttributes(params); getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); //getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN); // Activity全屏显示,且状态栏被覆盖掉 } /** * 退出全屏 */ private void exitFullSreen() { WindowManager.LayoutParams params = getWindow().getAttributes(); params.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setAttributes(params); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); //getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN); // Activity全屏显示,但是状态栏不会被覆盖掉,而是正常显示,只是Activity顶端布局会被覆盖住 }