- 浏览: 554270 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
0759cxz:
good job!
Android 同时使用多个library时的问题 -
zhouxiaoli521:
lgj452555712 写道cursor 没有关闭,最好加上 ...
Android sqlite中判断某个表是否存在方法 -
lgj452555712:
cursor 没有关闭,最好加上finally 后关上fina ...
Android sqlite中判断某个表是否存在方法 -
zhouxiaoli521:
zhouxiaoli521 写道weinifk 写道publi ...
StringBuffer的setLength -
zhouxiaoli521:
weinifk 写道public static void ma ...
StringBuffer的setLength
android Theme使用总结
- 博客分类:
- Android
今天对api中style下的theme整个摸了一遍。 我将api中theme分为两种类型来实验;一种是api Level为11的,一种是11以下的。level为11的用的是3.0的模拟器,11以下用的是N1,2.3.3的系统。 这里我是统一将theme写在AndroidManifest.xml中定义,如下图: 先总结level为11以下的theme: 1、Theme: 它的意思为默认状态,即如果theme这里不填任何属性的时候,默认为Theme。 api原文为: The default system theme. This is the theme used for activities that have not explicitly set their own theme. You can count on this being a dark background with light text on top, but should try to make no other assumptions about its appearance. In particular, the text inside of widgets using this theme may be completely different, with the widget container being a light color and the text on top of it a dark color. 效果图如下: 1.1、Theme_NoDisplay 它的意思为任何都不显示。比较适用于只是运行了activity,但未显示任何东西。 api原文如下: Default theme for activities that don’t actually display a UI; that is, they finish themselves before being resumed. 效果图如下: 1.2、Theme_NoTitleBar 意思为:背景主题的没有标题栏的样式,默认如果没有设置的话,显示黑背景 api原文: Variant of the default (dark) theme with no title bar 效果图如下: 1.3、Theme_NoTitleBar_Fullscreen 意思为:背景主题的没有标题栏且全屏的样式,默认为黑背景 api原文: Variant of the default (dark) theme that has no title bar and fills the entire screen 效果图如下: 2、Theme_Black: 它的意思为默认状态下黑背景。 api原文如下: Special variation on the default theme that ensures the background is completely black. This is useful for things like image viewers and media players. If you want the normal (dark background) theme do not use this, use 效果图如下: 2.1、Theme_Black_NoTitleBar: 意思为:黑背景主题的没有标题栏的样式 api原文: Variant of the black theme with no title bar 效果图如下: 2.2、Theme_Black_NoTitleBar_Fullscreen 意思为:黑背景主题的没有标题栏且全屏的样式 api原文: Variant of the black theme that has no title bar and fills the entire screen 效果图如下: 3、Theme_Light 意思为:默认状态下亮背景,与上述黑背景Theme_Black相反。 api原文: Theme for a light background with dark text on top. Set your activity to this theme if you would like such an appearance. As with the default theme, you should try to assume little more than that the background will be a light color. 效果图如下: 3.1、Theme_Light_NoTitleBar 意思为:亮背景主题的没有标题栏的样式,与Theme_Black_NoTitleBar相反 api原文: Variant of the light theme with no title bar 效果图如下: 3.2、Theme_Light_NoTitleBar_Fullscreen 意思为:亮背景主题的没有标题栏且全屏显示的样式,与Theme_Black_NoTitleBa_Fullscreenr相反 api原文: Variant of the light theme that has no title bar and fills the entire screen 效果图如下: 4、Theme_Dialog 意思为:对话框样式 将整个activity变成对话框样式出现。 api原文: Default theme for dialog windows and activities, which is used by the 效果图如下:这里需要自定义大小,否则显示不全。 5、Theme_InputMethod 6、Theme_Panel 意思为:删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且此为默认的样式。 api原文: Default dark theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window. 效果图如下:这里需要自定义大小,否则显示不全。 6.1、Theme_Light_Panel 意思为:删除掉所有多余的窗口装饰,在一个空的矩形框中填充内容,作用范围相当于把dialog中的所有元素全部去掉,只是一个空的矩形框,且默认是light的样式。 api原文: Default light theme for panel windows. This removes all extraneous window decorations, so you basically have an empty rectangle in which to place your content. It makes the window floating, with a transparent background, and turns off dimming behind the window. 效果图如下:这里需要自定义大小,否则显示不全。
7、 Theme_Wallpaper 意思为:使用墙纸做主题,默认状态。 api原文: Default theme for windows that want to have the user’s selected wallpaper appear behind them. 效果图如下: 7.1、Theme_WallpaperSettings 意思为:使用墙纸做主题,默认是使用将上一个界面调暗之后作为主题,(这里我很疑惑为什么是上一个界面变暗而不是墙纸主题变暗呢?) api原文: Theme for a wallpaper’s setting activity that is designed to be on top of a dark background. 效果图如下: 7.2、Theme_Light_WallpaperSettings 意思为:使用墙纸做主题,默认Light状态。 api原文: Theme for a wallpaper’s setting activity that is designed to be on top of a light background. 效果图如下: 7.3、Theme_Wallpaper_NoTitleBar 意思为:使用墙纸做主题,且没有标题栏 api原文: Variant of the translucent theme with no title bar 效果图如下: 7.4、Theme_Wallpaper_NoTitleBar_Fullscreen 意思为:使用墙纸做主题,且没有标题栏,且全屏显示 api原文: Variant of the translucent theme that has no title bar and fills the entire screen 效果图如下: 8、Theme_Translucent 意思为:半透明状态下的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。 api原文: Default theme for translucent activities, that is windows that allow you to see through them to the windows behind. This sets up the translucent flag and appropriate animations for your windows. 效果图如下: 8.1、Theme_Translucent_NoTitleBar 意思为:半透明状态下没有标题栏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。 api原文: Variant of the translucent theme with no title bar 效果图如下: 8.2、Theme_Translucent_NoTitleBar_Fullscreen 意思为:半透明状态下没有标题栏且全屏的背景,将运行此activity之前的屏幕作为半透明状态作为此activity运行时的样式。 api原文: Variant of the translucent theme that has no title bar and fills the entire screen 效果图如下: 以上是我对Level 11以下的theme的总结,后续我会对level 11的theme做总结。 Theme
.Dialog
class. This changes the window to be floating (not fill the entire screen), and puts a frame around its contents. You can set this theme on an activity if you would like to make an activity that looks like a Dialog.
发表评论
-
Android NDK开发环境搭建_r8
2014-04-23 16:32 1043本文主内容: 1、 Android NDK 安装 2、 ... -
Android java.lang.VerifyError 异常解决办法
2014-04-01 13:58 4547通常这个异常的问题出现在jar包上 我的情况是 sdk ... -
Android —— 关于ADT 17的BuildConfig.DEBUG
2014-03-21 11:02 1118在日常开发中,我们使用android.util.Lo ... -
Android 让多个Fragment 切换时不重新实例化
2013-12-05 18:48 1426在项目中需要进行Fragment的切换,一直都是用repla ... -
android学习—— context 和 getApplicationContext()
2013-09-22 11:08 1897在android中常常会遇到与context有关的内容 浅 ... -
Android requestFeature() must be called before adding content
2013-07-08 17:18 2316E/AndroidRuntime( 408): androi ... -
Android onActivityResult和横屏
2013-06-20 16:48 1795做一个项目 页面强制横屏 两个activity需要交互 现 ... -
Android 无法加载fragment的问题
2013-06-17 14:42 2403在项目中继承了fragment 重写了构造函数 make ... -
android源码解读一(Context)
2013-04-27 19:16 1728Context类 Context是一个抽象类 publi ... -
Android 4.1 动态加载APK中的资源
2013-04-24 17:29 4152*** is not owned by the curr ... -
Android ADT中增大AVD内存后无法启动:emulator failed to allocate memory 8
2013-04-15 15:45 1752过程中,增大对应AVD的 ... -
Android下面的MD5加密
2013-04-08 12:17 961网上关于android下MD5加密的资料很多,但是测试了下 ... -
Android 调用系统应用程序信息(Application Info)界面
2013-03-15 18:30 1238“Android系统设置->应用程序->管理应用 ... -
Android Dialog背景透明和黑暗度
2013-03-14 18:20 4042设置透明度,主要设置的是dialog自身的透明度 ... -
全局监听SCREEN_ON和SCREEN_OFF的替代方法--监听屏幕解锁事件
2013-03-08 12:17 3010在做一个程序的时候,需要时刻保持某一服务是启动的, ... -
Android 退出应用程序
2013-01-21 10:53 899android.os.Process.killProcess ... -
Android控件WebView(浏览器)常用功能(图片、缩放)例子介绍
2012-11-06 11:03 2506Android系统默认提供WebView控件(view)来在应 ... -
Android ProgressBar使用.9图在部分android手机上显示异常!
2012-11-05 10:18 2109写道 我使用的是progressbar.xml配置文 ... -
Android 同时使用多个library时的问题
2012-10-29 12:40 1556剧情是这样,我的app要使用两个library,如:Li ... -
android圆形进度条ProgressBar颜色设置
2012-07-29 15:14 1309总结的挺全面 http://aichixihongshi.i ...
相关推荐
android_UI进阶之style和theme的总结,供学习交流,谢谢~
一,Theme主题 1.1,Theme主题作用范围 Theme主要是针对应用级别的或者说窗体级别,可以设置应用主题(应用换肤效果)或者Activity的主题;主题是不能应用在某一...Android系统提供的主题在:..\platforms\android-29\
《Android应用开发》个人总结报告 刚开始接触Android感觉到它很有意思,在界面开发上和web也可以形成了相通的架构 ,更加方便,视觉上也是非常的酷,在前期我通过的大量的Android SDK开发范例大全中的例子以及...
总结一下Android中主题(Theme)的正确玩法
<com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget....
Android ActionBarActivity设置全屏无标题实现方法总结 前言: 新建的Activity继承自ActionBarActivity,设置全屏无标题本来很简单的事,但是没想到app竟然无缘无故的挂,要么就是白屏一片,要么就是黑屏。坑了我一...
android 开发隐藏标题栏的方法总结 1. 推荐!(因为现在工程都默认的为AppTheme) 在value/styles.xml里面添加自定义属性 <resources xmlns:android=http://schemas.android.com/apk/res/android> <!-- ...
Android ActionBarActivity设置全屏无标题的方法总结 新建的Activity继承自ActionBarActivity,设置全屏无标题本来很简单的事,但是没想到app竟然无缘无故的挂,要么就是白屏一片,要么就是黑屏。坑了我一个多小时!...
先介绍去掉标题栏的方法: 第一种:也一般入门的时候经常使用的一种方法 requestWindowFeature(Window.FEATURE_NO_TITLE);...android:theme=”@android:style/Theme.NoTitleBar”>可以看出,这样写的话,整个
而对于第二种,则相对复杂一些,由于作为一种线上服务,可能上架新皮肤,且那么多皮肤包放在apk里面实在太占体积了,所以皮肤资源会在选择后再进行下载,也就不能直接使用android的那套theme。 技术方案 内部资源...
Android 状态栏的设置适配问题详解 最近看了很多关于状态栏的问题的处理,总结出处理状态栏分两个方向1>5.0一下2>5.0以上的手机状态栏的设置,,,,,,,,这里说的都是自定义的toolbar,我这里已经把titlebar给隐藏掉了 (1...
1:查看是否有存储卡插入 代码如下: String status=Environment.getExternalStorageState(); if(status.equals(Enviroment.MEDIA_MOUNTED)) { 说明有SD卡插入 ...使用Activity.findViewById来取得