![](/img/trans.png)
[英]how to disable status bar or notification bar but not disable title bar in android?
[英]How to disable notification bar and status bar on lock screen?
我已經嘗試了以下代碼,但仍然無法正常工作。
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
您可以嘗試以下方法,
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();
或只需在清單中添加樣式,
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.