設定無標題 不顯示狀態列

2021-07-26 22:10:24 字數 962 閱讀 9113

注意!寫requestwindowfeature時要放在setcontentview(r.layout.activity_main);前面

requestwindowfeature(window.feature_no_title);
//標題欄顯示進度條

requestwindowfeature(window.feature_progress);

requestwindowfeature(window.feature_indeterminate_proress);

setprogressbarvisibility(true);

setprogressbarindeterminate(true);

在style檔案中的style下加入

name="android:windownotitle">true

item>

不顯示標題欄(在androidmanifest.xml檔案中設定)

android:theme="@android:style/theme.notitlebar"
全屏

android:theme="@android:style/theme.notitlebar.fullscreen"
不顯示狀態列: 

//去掉activity上面的狀態列

getwindow().setflags(windowmanager.layoutparams. flag_fullscreen ,  

windowmanager.layoutparams. flag_fullscreen);

另一種方法(推薦):

android:theme="@android:style/theme.notitlebar.fullscreen"

設定無標題 不顯示狀態列

注意!寫requestwindowfeature時要放在setcontentview r.layout.activity main 前面 requestwindowfeature window.feature no title 標題欄顯示進度條 requestwindowfeature window...

設定無標題 設定不顯示狀態列

requestwindowfeature window.feature no title 在style檔案中的style下加入 true 不顯示標題欄 在androidmanifest.xml檔案中設定 android theme android style theme.notitlebar 全屏 ...

ubuntu 14 04狀態列不顯示時間

有時候我們會看到我們電腦的狀態列那裡並沒有顯示時間,乙個原因是日期時間指示器沒有工作,另乙個可能的原因是使用者禁用了時間顯示。當你想顯示它的時候,你可能會發現system settings time date clock這裡已經變成灰色,不可以選擇,那如何來解決它呢?方法一 首先我們用下面的命令來確...