Android系统自带样式(@android:style/)
在AndroidManifest.xml文件的activity中配置 ? (API 18中Manifest文件中,<activity />要有android:theme="@android:style/Theme",否則報(bào)錯(cuò))
1、android:theme="@android:style/Theme"
默認(rèn)狀態(tài),即如果theme這里不填任何屬性的時(shí)候,默認(rèn)為Theme(最常用)
2、android:theme="@android:style/Theme.NoDisplay"
任何都不顯示。比較適用于只是運(yùn)行了activity,但未顯示任何東西
3、android:theme="@android:style/Theme.NoTitleBar“
背景主題的沒(méi)有標(biāo)題欄的樣式,默認(rèn)如果沒(méi)有設(shè)置的話,顯示黑背景
4、android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
背景主題的沒(méi)有標(biāo)題欄且全屏的樣式,默認(rèn)為黑背景
5、android:theme="@android:style/Theme.Black"
默認(rèn)狀態(tài)下黑背景
6、android:theme="@android:style/Theme.Black.NoTitleBar"
黑背景主題的沒(méi)有標(biāo)題欄的樣式
7、android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
黑背景主題的沒(méi)有標(biāo)題欄且全屏的樣式
8、android:theme="@android:style/Theme.Light"
默認(rèn)狀態(tài)下亮背景,與上述黑背景Theme.Black相反
9、android:theme="@android:style/Theme.Light.NoTitleBar"
亮背景主題的沒(méi)有標(biāo)題欄的樣式,與Theme.Black.NoTitleBar相反
10、android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
亮背景主題的沒(méi)有標(biāo)題欄且全屏顯示的樣式,與Theme.Black.NoTitleBa.Fullscreenr相反
11、android:theme="@android:style/Theme.Dialog"
對(duì)話框樣式將整個(gè)activity變成對(duì)話框樣式出現(xiàn)
12、android:theme="@android:style/Theme.InputMethod"
Windowanimations that are applied to input method overlay windows
13、android:theme="@android:style/Theme.Panel"
刪除掉所有多余的窗口裝飾,在一個(gè)空的矩形框中填充內(nèi)容,作用范圍相當(dāng)于把dialog中的所有元素全部去掉,只是一個(gè)空的矩形框,且此為默認(rèn)的樣式
14、android:theme="@android:style/Theme.Light.Panel"
刪除掉所有多余的窗口裝飾,在一個(gè)空的矩形框中填充內(nèi)容,作用范圍相當(dāng)于把dialog中的所有元素全部去掉,只是一個(gè)空的矩形框,且默認(rèn)是light的樣式
15、android:theme="@android:style/Theme.Wallpaper"
使用墻紙做主題,默認(rèn)狀態(tài)。
16、android:theme="@android:style/Theme.WallpaperSettings"
使用墻紙做主題,默認(rèn)是使用將上一個(gè)界面調(diào)暗之后作為主題
17、android:theme="@android:style/Theme.Light.WallpaperSettings"
使用墻紙做主題,默認(rèn)Light狀態(tài)
18、android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
使用墻紙做主題,且沒(méi)有標(biāo)題欄
19、android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
使用墻紙做主題,且沒(méi)有標(biāo)題欄,且全屏顯示
20、android:theme="@android:style/Theme.Translucent"
半透明狀態(tài)下的背景,將運(yùn)行此activity之前的屏幕作為半透明狀態(tài)作為此activity運(yùn)行時(shí)的樣式。
21、android:theme="@android:style/Theme.Translucent.NoTitleBar"
半透明狀態(tài)下沒(méi)有標(biāo)題欄的背景,將運(yùn)行此activity之前的屏幕作為半透明狀態(tài)作為此activity運(yùn)行時(shí)的樣式。
22、android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
半透明狀態(tài)下沒(méi)有標(biāo)題欄且全屏的背景,將運(yùn)行此activity之前的屏幕作為半透明狀態(tài)作為此activity運(yùn)行時(shí)的樣式。
?
總結(jié)
以上是生活随笔為你收集整理的Android系统自带样式(@android:style/)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Android传感器-开发指南
- 下一篇: android错误-android.ut