You know, a theme can derive from other theme in two ways: xx.xxx implicit way and parent="xxx" explicit way.

But, what will hapen if we define a theme together with two ways. We demonstrate in the following code fragment:

    <style name="baseColor">
<item name="android:textColor">#FF0000</item>
<item name="android:textSize">40sp</item>
</style> <style name="secondColor">
<item name="android:textColor">#0080ff</item>
</style> <style name="baseColor.text" parent="secondColor">
</style>

If you apply the style  "basecolo.text" to a TextView, you will find the fact that "baseColor.text" derived from "secondColor", no attr in "baseColor" is derived. That is, if both implicit and explicit way exist, explicit way work.

But, if you remove the parent sequence, the "baseColor.text" will derive from "baseColor", like following,  implicit way work.

<style name="baseColor.text">
</style>

What is the relation of theme and it's derived theme.的更多相关文章

  1. Android Dialogs(6)Dialog类使用示例:用系统theme和用自定义的theme

    使用dialog时有很多 方法,其中一个就是直接 使用基类Dialog,可用来作一个没有按钮的非模态提示框,它可以直接从系统的主题构造也可从自定义的主题构造. 基本步骤: a,构造 b,调用dialo ...

  2. How to Change the Default Theme Appearance [editing with no theme]

    Windows Live Writer has the ability to allow users to see their blog as it'd be posted as they are c ...

  3. Android 样式 (style) 和主题(theme)

    转载:https://gold.xitu.io/post/58441c48c59e0d0056a30bc2 样式和主题 样式是指为 View 或窗口指定外观和格式的属性集合.样式可以指定高度.填充.字 ...

  4. 总结一下Android中主题(Theme)的正确玩法

    在AndroidManifest.xml文件中有<application android:theme="@style/AppTheme">,其中的@style/AppT ...

  5. 在Visual Studio 2012 Blue theme下使用Dark theme的文本编辑器颜色设置

    Visual Studio 2012 默认提供了3种color theme: blue,light,和dark.其中dark的文本编辑器颜色设定很爽,可是整个菜单项加上一些小的窗口如Find Resu ...

  6. 如何为Eclipse安装主题(Color Theme)

    Eclipse开发环境默认都是白底黑字的,看到同事的Xcode中设置的黑灰色背景挺好看的,就去网上查了一下.发现Eclipse也可以设置主题. 方法1:你可以从Eclipse Marketplace中 ...

  7. Android自带的theme

    android:theme="@android:style/Theme.Dialog" 将一个Activity显示为能话框模式 android:theme="@andro ...

  8. Android系统自带样式(android:theme)详解-(转)

    android:theme="@android:style/Theme.Dialog" : Activity显示为对话框模式 android:theme="@androi ...

  9. android xml 布局错误(黑掉了)Missing styles. Is the correct theme chosen for this layout?

    发现在调整页面的时候 ,老是报以下错误,导致无法静态显示ui效果. Missing styles. Is the correct theme chosen for this layout? Use t ...

随机推荐

  1. python 导入模块与使用

    学习python之前一定要了解导入模块是怎么导入的,至少在看代码时不知道能很快的了解别人写的东西是哪里来. Python默认仅安装部分基础或核心模块,启动时也仅加载了基础模块,在需要是再显式的加载其他 ...

  2. Angular2 内置指令 NgFor 和 NgIf 详解

    http://www.jb51.net/article/89781.htm 在这一章节中,我们来学习如何使用Angular2来展示数据,以及如何使用它的内置指令NgFor和NgIf 首先要确保你有一个 ...

  3. python3之if与语句

    获得更多资料欢迎进入我的网站或者 csdn或者博客园 本节主要介绍python,if条件语句,以及用法.下面附有之前的文章: 语句快介绍 语句快并非一种语句,是通过缩进形成的语句集合: 可以使用的缩进 ...

  4. 用API爬取天气预报数据

    1.注册免费API和阅读技术文档: 注册地址:https://console.heweather.com 文档地址:https://www.heweather.com/documents/api-ur ...

  5. Windows/Ubuntu下,将所有文件名字列举出来并保存到txt文件中

    Windows下 使用如下的DOS命令来实现: dir /s /b > lists.txt 可以将当前路径下的所有文件的"文件路径+文件名"存储在lists.txt中. 其中 ...

  6. java FastJSON的使用

    1.JSON介绍 JSON(javaScript Object Notation)是一种轻量级的数据交换格式.主要采用键值对({"name": "json"}) ...

  7. 自己动手——快速搭建Android应用服务器

    1.服务器搭建方案选择 我们用:MySQL + Java Web + Tomcat + Volley 来实现我们的服务器. 其中:①MySQL是开源的数据库软件:②Java Web是遵循Java语言风 ...

  8. springMVC的一些入门配置

    1.springMVC的描述 1.1.SpringMVC是Spring框架内置的MVC的实现.SpringMVC就是一个Spring内置的MVC子框架. 1.2.SpringMVC的作用是实现页面和后 ...

  9. idea没有tomcat选项在setting也没有Application Servers

    原因:dea未正常关闭,重启后发现,Tomcat的选项不见了,File->Setting->Build,Excution,Deployment里面Application Servers也不 ...

  10. Idea maven编译报错 javacTask: 源发行版 1.8 需要目标发行版 1.8

    javacTask: 源发行版 1.8 需要目标发行版 1.8 [INFO] ------------------------------------------------------------- ...