[英]Android hide status bar, compatibility
我有以下代碼隱藏來自http://developer.android.com/training/system-ui/status.html的狀態欄和“ 隱藏狀態欄android”
//hide statut bar
if (Build.VERSION.SDK_INT < 16) { //ye olde method
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else { // Jellybean and up, new hotness
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();
}
我在View.SYSTEM_UI_FLAG_FULLSCREEN
上收到錯誤;
在View中似乎不再存在SYSTEM_UI_FLAG_FULLSCREEN
。
如何解決? 請謝謝你
自API16開始存在。 您必須根據API16(或更高版本)構建應用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.