Android 系统自带 Theme(主题)
2014-12-01 15:48
239 查看
系统为我们提供了丰富的系统自带的Theme,当然,你也可以自定义Theme,前提是该Theme必须继承与某个已经存在地Theme,否则编译器会提示错误的。
1、 应用Theme属性两种方式
①、在AndroidManifest.xml文件中在<application/>或者<activity />节点设置android:theme属性.
②、直接在代码中调用方法setTheme()设置该Activity的主题,必须得在第一次调用setContentView()前设置。
常用的系统定义的Theme如下:
默认:
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_thumb.png)
(1):android:theme="@android:style/Theme.Dialog" 将一个Activity显示为能话框模式
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Dialog_thumb.png)
(2):android:theme="@android:style/Theme.NoTitleBar" 不显示应用程序标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_NoTitleBar_thumb.png)
(3):android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不显示应用程序标题栏,并全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_NoTitleBar_Fullscreen_thumb.png)
(4):android:theme="Theme.Light" 背景为白色
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_thumb.png)
(5):android:theme="Theme.Light.NoTitleBar" 白色背景并无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_NoTitleBar_thumb.png)
(6):android:theme="Theme.Light.NoTitleBar.Fullscreen" 白色背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_NoTitleBar_Fullscreen_thumb.png)
(7):android:theme="Theme.Black" 背景黑色
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_thumb.png)
(8):android:theme="Theme.Black.NoTitleBar" 黑色背景并无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_NoTitleBar_thumb.png)
(9):android:theme="Theme.Black.NoTitleBar.Fullscreen" 黑色背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_NoTitleBar_Fullscreen_thumb.png)
(10):android:theme="Theme.Wallpaper" 用系统桌面为应用程序背景
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_thumb.png)
(11):android:theme="Theme.Wallpaper.NoTitleBar" 用系统桌面为应用程序背景,且无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_NoTitleBar_thumb.png)
(12):android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" 用系统桌面为应用程序背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_NoTitleBar_Fullscreen_thumb.png)
(13):android:theme="Translucent" 透明背景
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_thumb.png)
(14):android:theme="Theme.Translucent.NoTitleBar" 透明背景并无标题
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_NoTitleBar_thumb.png)
(15):android:theme="Theme.Translucent.NoTitleBar.Fullscreen" 透明背景并无标题,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_NoTitleBar_Fullscreen_thumb.png)
(16):android:theme="Theme.Panel" 面板风格显示
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Panel_thumb.png)
(17):android:theme="Theme.Light.Panel" 平板风格显示
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_Panel_thumb.png)
参考地址:
http://blog.csdn.net/xiaodongvtion/article/details/7873001 http://blog.chinaunix.net/uid-24448954-id-2846673.html
1、 应用Theme属性两种方式
①、在AndroidManifest.xml文件中在<application/>或者<activity />节点设置android:theme属性.
②、直接在代码中调用方法setTheme()设置该Activity的主题,必须得在第一次调用setContentView()前设置。
常用的系统定义的Theme如下:
默认:
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_thumb.png)
(1):android:theme="@android:style/Theme.Dialog" 将一个Activity显示为能话框模式
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Dialog_thumb.png)
(2):android:theme="@android:style/Theme.NoTitleBar" 不显示应用程序标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_NoTitleBar_thumb.png)
(3):android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不显示应用程序标题栏,并全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_NoTitleBar_Fullscreen_thumb.png)
(4):android:theme="Theme.Light" 背景为白色
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_thumb.png)
(5):android:theme="Theme.Light.NoTitleBar" 白色背景并无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_NoTitleBar_thumb.png)
(6):android:theme="Theme.Light.NoTitleBar.Fullscreen" 白色背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_NoTitleBar_Fullscreen_thumb.png)
(7):android:theme="Theme.Black" 背景黑色
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_thumb.png)
(8):android:theme="Theme.Black.NoTitleBar" 黑色背景并无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_NoTitleBar_thumb.png)
(9):android:theme="Theme.Black.NoTitleBar.Fullscreen" 黑色背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Black_NoTitleBar_Fullscreen_thumb.png)
(10):android:theme="Theme.Wallpaper" 用系统桌面为应用程序背景
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_thumb.png)
(11):android:theme="Theme.Wallpaper.NoTitleBar" 用系统桌面为应用程序背景,且无标题栏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_NoTitleBar_thumb.png)
(12):android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" 用系统桌面为应用程序背景,无标题栏,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Wallpaper_NoTitleBar_Fullscreen_thumb.png)
(13):android:theme="Translucent" 透明背景
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_thumb.png)
(14):android:theme="Theme.Translucent.NoTitleBar" 透明背景并无标题
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_NoTitleBar_thumb.png)
(15):android:theme="Theme.Translucent.NoTitleBar.Fullscreen" 透明背景并无标题,全屏
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Translucent_NoTitleBar_Fullscreen_thumb.png)
(16):android:theme="Theme.Panel" 面板风格显示
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Panel_thumb.png)
(17):android:theme="Theme.Light.Panel" 平板风格显示
![](http://henzil.easymorse.com/wp-content/uploads/2011/04/Theme_Light_Panel_thumb.png)
参考地址:
http://blog.csdn.net/xiaodongvtion/article/details/7873001 http://blog.chinaunix.net/uid-24448954-id-2846673.html
相关文章推荐
- Android系统自带主题样式(android:theme),Android Dialog 系统样式
- 【android开发】修改主题theme(系统自带样式总结)
- android 系统自带主题theme
- android系统自带主题样式(android:theme)
- Android系统自带样式(android:theme)(stephen830的博客)
- Android应用开发——系统自带样式Android:theme
- Android应用开发——系统自带样式Android:theme
- Android应用开发——系统自带样式Android:theme
- android系统自带的主题与样式(theme and style)
- Android系统自带样式(android:theme)
- Android开发之系统自带样式Android:theme
- Android 系统自带样式Android:theme
- Android 系统自带样式Android:theme
- Android系统自带样式Android:theme
- Android系统自带样式(android:theme)
- Android应用开发——系统自带样式Android:theme
- Android应用开发——系统自带样式Android:theme
- android 中系统自带的主题与样式(theme and style)
- android 自带的主题 theme 的使用
- Android应用开发——系统自带样式Android:theme