[英]Android status bar stays
在我的onCreate()方法中,我使用此代碼刪除狀態欄:
// Remove the status bar from the top
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
然而,當我啟動應用程序時,我仍然可以看到狀態欄。 我怎么能阻止這個?
將以下屬性添加到清單中的活動:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
您必須在設置內容視圖之前使用requestWindowFeature
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.