Android 标签的主题样式
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" 半透明效果,无标题栏,全屏
•android:theme="@android:style/Theme.Panel"
Android平台定义了三种字体大小:
"?android:attr/textAppearanceLarge"
"?android:attr/textAppearanceMedium"
"?android:attr/textAppearanceSmall"
Android字体颜色:
android:textColor="?android:attr/textColorPrimary"
android:textColor="?android:attr/textColorSecondary"
android:textColor="?android:attr/textColorTertiary"
android:textColor="?android:attr/textColorPrimaryInverse"
android:textColor="?android:attr/textColorSecondaryInverse"
Android的ProgressBar样式:
style="?android:attr/progressBarStyleHorizontal"
style="?android:attr/progressBarStyleLarge"
style="?android:attr/progressBarStyleSmall"
style="?android:attr/progressBarStyleSmallTitle"
分隔符
横向:
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
纵向:
<View android:layout_width="1dip"
android:layout_height="fill_parent"
android:background="?android:attr/listDivider" />
CheckBox样式
style="?android:attr/starStyle"
类似标题栏效果的TextView
style="?android:attr/listSeparatorTextViewStyle"
其它有用的样式
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingRight="?android:attr/scrollbarSize"
style="?android:attr/windowTitleBackgroundStyle"
style="?android:attr/windowTitleStyle"
android:layout_height="?android:attr/windowTitleSize"
android:background="?android:attr/windowBackground"
修改Activity的标题栏样式
如在styles.xml中增加
<resources>
<style name="AutoWindowTitleBackground">
<item name="android:background">#778899</item>
</style>
<style name="autoWindowTitlebar" parent="android:Theme">
<item name="android:windowTitleSize">32dp</item>
<item name="android:windowTitleBackgroundStyle">@style/AutoWindowTitleBackground</item>
</style>
</resources>
接着再修改AndroidManifest.xml文件,找到要自定义标题栏的Activity,添加上android:theme值,比如:<activity android:name=".MainActivity" android:theme="@style/autoWindowTitlebar">
去掉所有Activity界面的标题栏
修改AndroidManifest.xml
在application 标签中添加android:theme=”@android:style/Theme.NoTitleBar”
原文地址:http://blog.sina.com.cn/s/blog_70c759fd01013phv.html
Android 标签的主题样式的更多相关文章
- android studio 导入主题设置,代码风格(附带eclipse 主题代码样式)
在这里我最想说的,android studio默认主题样式,太low.不适合长时间写代码,看代码颜色不好识别,相对于背景的代码样式,我都不想吐槽了.还是网上下载主题代码样式导入样式.在这里我推荐 Su ...
- Android Material Design系列之主题样式介绍说明
今天这篇文章应该算是Material Design系列的补充篇,因为这篇文章本来应该放到前面讲的,因为讲的是主题嘛,对于一些状态和颜色的介绍,因为我们一新建一个项目时,系统自带了三个属性的颜色,现在就 ...
- Android 自定义属性(attrs)、样式(Style)、主题(Theme)
Android 自定义属性(attrs).样式(Style).主题(Theme) https://www.cnblogs.com/dandre/p/4507024.html https://blog. ...
- android 5.0 -- 主题
系统提供默认的三种主题样式 @android:style/Theme.Material (dark version) @android:style/Theme.Material.Light (ligh ...
- 2.4、Android Studio使用主题编辑器设计主题
Android Studio包含一个叫主题编辑器的可视的助手,可以提供以下功能: 1. 创建和更改你的app主题 2. 为不同的资源适应主题 3. 普通的UI颜色更改的实时显示 主题编辑器 这一节描述 ...
- struts2 UI标签 和 主题
四.Struts2的UI标签和主题 1.Struts2中UI标签的优势 自动的数据回显和错误提示功能 自带的简单样式和排版 2.表单标签的通用属性 说明:UI标签中value的取值一般都是字符串. 2 ...
- sencha touch 扩展篇之使用sass自定义主题样式 (上)使用官方的api修改主题样式
大家知道,sencha touch是通过我们写的js代码来动态渲染单页面生成一个个div+css的html页面来模拟app应用,那么既然是div+css结构的,我们就可以通过修改css样式来自定义我们 ...
- Android按钮的各个样式设置
安卓开发学习之014 Button应用详解(样式.背景.按钮单击.长按.双击.多击事件) 一.Button简介 按钮也是继承自TextView 二.XML定义方法 <Button android ...
- [js开源组件开发]html5标签audio的样式更改
html5标签audio的样式更改 由于html5的流行,现在移动端大多数的需求都可以使用audio来播放音频,但您可能只是需要很简单的播放/停止效果,但不同的浏览器上的audio样式却不尽人意,所以 ...
随机推荐
- 禁用ipv6
禁用ipv6 1.在/etc/sysctl.conf 添加一行:net.ipv6.conf.all.disable_ipv6=1 2.在/etc/sysconfig/network 添加一行:NETW ...
- DAC重置max server memory
15:44 2014-01-24 08R2,一次通过GUI更改'最大服务器内存(MB)'为16MB,errorlog显示信息如下 :: . Run the RECONFIGURE statement ...
- javascript设计模式学习之十五——装饰者模式
一.装饰者模式定义 装饰者模式可以动态地给某个对象添加一些额外的职责,而不会影响从这个类中派生的其他对象.这种为对象动态添加职责的方式就称为装饰者模式.装饰者对象和它所装饰的对象拥有一致的接口,对于用 ...
- iOS 自定义UIButton(图片和文字混合)
// UIApplicationDelegate .h文件 #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder &l ...
- mysql高负载的问题排查
http://dngood.blog.51cto.com/446195/1150031 log_slow_queries = /usr/local/mysql/var/slow_queries.log ...
- Oracle sqlldr导入导出txt数据文件详解
一.sqlldr导入txt 1.预备 a).txt文件 这里要保存成无签名的UTF-8 b).oracle建表 2.编写控制文件input_test.ctl LOAD DATA CHARACTERSE ...
- JQuery实现页面企业广告图片切换和新闻列表滚动效果
最近用到一个页面上图片左右切换和新闻列表滚动呈现的效果,整理如下: 前段代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transit ...
- [c++基本语法]——构造函数初始化列表
c++构造函数初始化成员变量列表: #pragma once class Node { public: int data; // 权值 Node *parent; // 父节点 Node *left; ...
- poj: 3094
简单题 #include <iostream> #include <stdio.h> #include <string> #include <stack> ...
- C语言 类型
int 2个字节或4个字节 根据平台而定, -32,768 到 32,767 或 -2,147,483,648 到 2,147,483,647 unsigned int 2或4个字节 0到655 ...