//全屏
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.systemUiVisibility = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
getWindow().setAttributes(attributes);
}
//常亮
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
Android设置全屏/屏幕常亮
最新推荐文章于 2023-07-21 16:20:06 发布