android 沉浸式状态栏如何不显示里面的文字
论文问答
1
使用的是如下代码:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
decorView.setSystemUiVisibility(uiOptions);
getWindow().setStatusBarColor(Color.TRANSPARENT);
}
请问如何删除里面状态栏里面的文字与与图标
-
//5.0及以上 WindowManager.LayoutParams localLayoutParams = aty.getWindow().getAttributes(); localLayoutParams.flags = WindowManager.LayoutParams.FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; AndroidManifest里面Activity的Theme使用: Theme.AppCompat.NoActionBar
-
代码中设置:在setContentView 之前调用
requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
发表回复