android的主题和样式
来源:互联网 发布:映射软件 编辑:程序博客网 时间:2024/06/05 10:34
在AndroidManifest.xml文件的activity中配置
1、android:theme="@android:style/Theme"
默认状态,即如果theme这里不填任何属性的时候,默认为Theme
2、android:theme="@android:style/Theme.NoDisplay"
任何都不显示。比较适用于只是运行了activity,但未显示任何东西
3、android:theme="@android:style/Theme.NoTitleBar“
背景主题的没有标题栏的样式,默认如果没有设置的话,显示黑背景
4、android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
背景主题的没有标题栏且全屏的样式,默认为黑背景
5、android:theme="@android:style/Theme.Black"
默认状态下黑背景
6、android:theme="@android:style/Theme.Black.NoTitleBar"
黑背景主题的没有标题栏的样式
7、android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
黑背景主题的没有标题栏且全屏的样式
8、android:theme="@android:style/Theme.Light"
默认状态下亮背景,与上述黑背景Theme.Black相反
9、android:theme="@android:style/Theme.Light.NoTitleBar"
亮背景主题的没有标题栏的样式,与Theme.Black.NoTitleBar相反
10、android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
亮背景主题的没有标题栏且全屏显示的样式,与Theme.Black.NoTitleBa.Fullscreenr相反
11、android:theme="@android:style/Theme.Dialog"
对话框样式 将整个activity变成对话框样式出现
12、android:theme="@android:style/Theme.InputMethod"
Window animations that are applied to input method overlay windows
13、android:theme="@android:style/Theme.Panel"
删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且此为默认的样式
14、android:theme="@android:style/Theme.Light.Panel"
删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且默认是light的样式
15、android:theme="@android:style/Theme.Wallpaper"
使用墙纸做主题,默认状态。
16、android:theme="@android:style/Theme.WallpaperSettings"
使用墙纸做主题,默认是使用将上一个界面调暗之后作为主题
17、android:theme="@android:style/Theme.Light.WallpaperSettings"
使用墙纸做主题,默认Light状态
18、android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
使用墙纸做主题,且没有标题栏
19、android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
使用墙纸做主题,且没有标题栏,且全屏显示
20、android:theme="@android:style/Theme.Translucent"
半透明状态下的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。
21、android:theme="@android:style/Theme.Translucent.NoTitleBar"
半透明状态下没有标题栏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。
22、android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
半透明状态下没有标题栏且全屏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。
在android的sdk 安装目录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]
- android的主题和样式
- android的主题和样式
- Android 的样式和主题
- android 样式和主题
- android样式和主题
- android样式和主题
- Android样式和主题
- Android 样式和主题
- android 样式和主题
- android样式和主题
- android样式和主题
- android主题和样式
- android 主题和样式
- Android主题和样式
- android样式和主题
- Android:样式和主题
- Android 主题和样式
- Android样式和主题
- SQLite的SQL语法
- 回收站删除清空了怎么数据恢复
- Linux C/C++编程Shell命令大杂烩(1)
- ssh 免密码登录设置后还是提示需要输入密码
- hdu 1452 Happy 2004(数论:积性函数+快速幂+同余方程+扩展欧几里得算法)
- android的主题和样式
- Android fill_parent、wrap_content和match_parent的区别
- WIN7系统下将本机作为WIFI热点共享网络
- 袄坦永拐彩酚位纶诚品颐谇幽驶路
- Eclipse基础--Eclipse启动过程
- 灰度共生矩阵
- 将屏幕缩放到所选择的对象
- tpcc-mysql 中tpcc_start进行基准测试的执行结果
- 程序员的“心”