android中的style屬性值,平時沒怎麼在意,這次積累下吧。
Android平臺定義的主題樣式:
android:theme=”@android:style/Theme.Dialog” // 將一個Activity顯示爲對話框模式
android:theme=”@android:style/Theme.NoTitleBar” // 不顯示應用程序標題欄
android:theme=”@android:style/Theme.NoTitleBar.Fullscreen” // 不顯示應用程序標題欄,並全屏
android:theme=”@android:style/Theme.Light” // 背景爲白色
android:theme=”@android:style/Theme.Light.NoTitleBar” // 白色背景並無標題欄
android:theme=”@android:style/Theme.Light.NoTitleBar.Fullscreen” // 白色背景,無標題欄,全屏
android:theme=”@android:style/Theme.Black” // 背景黑色
android:theme=”@android:style/Theme.Black.NoTitleBar” // 黑色背景並無標題欄
android:theme=”@android:style/Theme.Black.NoTitleBar.Fullscreen” // 黑色背景,無標題欄,全屏
android:theme=”@android:style/Theme.Wallpaper” // 用系統桌面爲應用程序背景
android:theme=”@android:style/Theme.Wallpaper.NoTitleBar” // 用系統桌面爲應用程序背景,且無標題欄
android:theme=”@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen” // 用系統桌面爲應用程序背景,無標題欄,全屏
android:theme=”@android:style/Translucent” // 半透明效果
android:theme=”@android:style/Theme.Translucent.NoTitleBar” // 半透明並無標題欄
android:theme=”@android:style/Theme.Translucent.NoTitleBar.Fullscreen” // 半透明效果,無標題欄,全屏
window 屬性
<item name="android:windowFrame">@null</item> :Dialog的windowFrame框爲無
<item name="android:windowIsFloating">true</item>:是否浮現在activity之上
<item name="android:windowIsTranslucent">false</item>:是否半透明
<item name="android:windowNoTitle">true</item>:是否顯示title
<item name="android:windowBackground">@drawable/dia_bg</item>:設置dialog的背景
<item name="android:backgroundDimEnabled">false</item>: 背景是否模糊顯示