Android開發如何去除標題欄title

2021-06-21 12:27:21 字數 326 閱讀 8174

去除標題欄title其實非常簡單,他有兩種方法,一種是在**中新增,另一種是在androidmanifest.xml中新增:

1、在**中實現:

在此方法setcontentview(r.layout.main)之前加入:

requestwindowfeature(window.feature_no_title);標題欄就沒有了。

2、在androidmanifest.xml中實現:

註冊activity時加上如下的一句配置就可以實現。

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

>

Android開發如何去除標題欄title

去除標題欄title其實非常簡單,他有兩種方法,一種是在 中新增,另一種是在androidmanifest.xml中新增 1 在 中實現 在此方法setcontentview r.layout.main 之前加入 requestwindowfeature window.feature no titl...

Android開發去除標題欄title

android開發去除標題欄title android開發去除標題欄title其實非常簡單,他有兩種方法,一種是在 中新增,另一種是在androidmanifest.xml中新增 1 在 中實現 在此方法setcontentview r.layout.main 之前加入 requestwindowf...

Android開發去除標題欄title

一 android開發去除標題欄title其實非常簡單,他有兩種方法,一種是在 中新增,另一種是在androidmanifest.xml中新增 1 在 中實現 在此方法setcontentview r.layout.main 之前加入 requestwindowfeature window.feat...