android 自帶的主題 theme 的使用

androidsdk  安裝目錄data\res\values\themes.xml 裏系統定義好的主題,可以直接使用,在AndroidManifest.xml中定義。如果整個工程用一個主題就在application 標籤中定義。

<application android:icon="@drawable/icon"

android:label="@string/app_name" android:theme="@android:style/Theme.Wallpaper" >    

如果在單個activety中用不同主題

 <activity android:name=".secondActive"              

android:label="第二頁"

        android:theme="@android:style/Theme.Black" >

•android:theme="@android:style/Theme.Dialog"   將一個Activity顯示爲能話框模式 
•android:theme="@android:style/Theme.NoTitleBar"  不顯示應用程序標題欄 

•android:theme="@android:style/Theme.NoTitleBar.Fullscreen"  不顯示應用程序標題欄,並全屏 

•android:theme="Theme.Light"  背景爲白色 

•android:theme="Theme.Light.NoTitleBar"  白色背景並無標題欄 

•android:theme="Theme.Light.NoTitleBar.Fullscreen"  白色背景,無標題欄,全屏 

•android:theme="Theme.Black"  背景黑色 

•android:theme="Theme.Black.NoTitleBar"  黑色背景並無標題欄 

•android:theme="Theme.Black.NoTitleBar.Fullscreen"    黑色背景,無標題欄,全屏 //我們        經常用的。 

•android:theme="Theme.Wallpaper"  用系統桌面爲應用程序背景 

•android:theme="Theme.Wallpape r.NoTitleBar"  用系統桌面爲應用程序背景,且無標題欄 

•android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen"  用系統桌面爲應用程序背景,無標題欄,全屏 

•android:theme="Translucent" 
•android:theme="Theme.Translucent.NoTitleBar" 
•android:theme="Theme.Translucent.NoTitleBar.Fullscreen" 
•android:theme="Theme.Panel" 
•android:theme="Theme.Light.Panel"[size=medium][/size]

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章