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. Java面向对象之异常(throw与throws)

    一.基础概念 1.throw和throws的区别: 位置不同:throws用在函数上,后面跟的是异常类,可以跟多个. throw用在函数内,后面跟的是异常对象. 功能不同:throws用来声明异常,让 ...

  2. JavaScript高性能开发的十条建议

    JavaScript高性能开发的十条建议 文/开发部 Dimmacro 编者按:javascript开发大部分程序员都做过,写出来的代码质量也千差万别,现在浏览器内嵌的解释器虽然效率已经很高了,但在客 ...

  3. Tomcat安装与使用

    主要讲解Tomcat的 安装与使用,讲解ubuntu版本和windows. 下载与安装: 1)到apache官网.www.apache.org http://jakarta.apache.org(产品 ...

  4. 【UVA10816】Travel in Desert (最小瓶颈路+最短路)

    UVA10816 Travel in Desert 题目大意 沙漠中有一些道路,每个道路有一个温度和距离,要求s,t两点间的一条路径,满足温度最大值最小,并且长度最短 输入格式 输入包含多组数据. 每 ...

  5. win7 设置docker加速器

    本来专门已经有了一个源于docker加速器的了,公司的电脑是mac,配置很简单,但是我自己的电脑是win7,在实际操作的时候还真是累啊,官网的教程不知道为什么没起效果,所以最终还是找了其他人发的帖,可 ...

  6. pip安装本地文件

    I do a lot of development without an internet connection1, so being able to install packages into a ...

  7. Java的定时调度

    一般在web开发中定时调度比较有用,因为要维护一个容器不关闭才可以一直定时操作下去. 定时调度:每当一段时间之后,程序就会自动执行,就称为定时调度.如果要使用定时调动,则必须要保证程序要始终运行着,也 ...

  8. 【转】JavaWeb之Session的序列化和反序列化 && Session的活化和钝化

    应用场景: 1.一般来说,服务器启动后,就不会再关闭了,但是如果逼不得已需要重启,而用户会话还在进行相应的操作,这时就需要使用序列化将session信息保存起来放在硬盘,服务器重启后,又重新加载.这样 ...

  9. Django中的CSRF(跨站请求伪造)

    Django中的CSRF(跨站请求伪造) Django CSRF  什么是CSFR 即跨站请求伪装,就是通常所说的钓鱼网站. 钓鱼网站的页面和正经网站的页面对浏览器来说有什么区别? (页面是怎么来的? ...

  10. 神奇的树上启发式合并 (dsu on tree)

    参考资料 https://www.cnblogs.com/zhoushuyu/p/9069164.html https://www.cnblogs.com/candy99/p/dsuontree.ht ...