What is the relation of theme and it's derived theme.
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.的更多相关文章
- Android Dialogs(6)Dialog类使用示例:用系统theme和用自定义的theme
使用dialog时有很多 方法,其中一个就是直接 使用基类Dialog,可用来作一个没有按钮的非模态提示框,它可以直接从系统的主题构造也可从自定义的主题构造. 基本步骤: a,构造 b,调用dialo ...
- 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 ...
- Android 样式 (style) 和主题(theme)
转载:https://gold.xitu.io/post/58441c48c59e0d0056a30bc2 样式和主题 样式是指为 View 或窗口指定外观和格式的属性集合.样式可以指定高度.填充.字 ...
- 总结一下Android中主题(Theme)的正确玩法
在AndroidManifest.xml文件中有<application android:theme="@style/AppTheme">,其中的@style/AppT ...
- 在Visual Studio 2012 Blue theme下使用Dark theme的文本编辑器颜色设置
Visual Studio 2012 默认提供了3种color theme: blue,light,和dark.其中dark的文本编辑器颜色设定很爽,可是整个菜单项加上一些小的窗口如Find Resu ...
- 如何为Eclipse安装主题(Color Theme)
Eclipse开发环境默认都是白底黑字的,看到同事的Xcode中设置的黑灰色背景挺好看的,就去网上查了一下.发现Eclipse也可以设置主题. 方法1:你可以从Eclipse Marketplace中 ...
- Android自带的theme
android:theme="@android:style/Theme.Dialog" 将一个Activity显示为能话框模式 android:theme="@andro ...
- Android系统自带样式(android:theme)详解-(转)
android:theme="@android:style/Theme.Dialog" : Activity显示为对话框模式 android:theme="@androi ...
- 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 ...
随机推荐
- threading.local()方法;线程池
一,threading.local() import time import threading v = threading.local() def func(arg): # 内部会为当前线程创建一个 ...
- CentOS 安装系统侦察工具
Nessus setup: rpm -ivh http://downloads.nessus.org/nessus3dl.php\?file\=Nessus-6.10.2-es6.x86_64.rpm ...
- 题目1042:Coincidence(最长公共子序列)
问题来源 http://ac.jobdu.com/problem.php?pid=1042 问题描述 给定两个字符串,求其最长公共子序列(LCS). 问题分析 网上是在是太多这类问题的文章了,随便贴一 ...
- 27.Next Permutation(下一个字典序列)
Level: Medium 题目描述: Implement next permutation, which rearranges numbers into the lexicographicall ...
- POJ - 1821 单调队列优化DP + 部分笔记
题意:n个墙壁m个粉刷匠,每个墙壁至多能被刷一次,每个粉刷匠要么不刷,要么就粉刷包含第Si块的长度不超过Li的连续墙壁(中间可不刷),每一块被刷的墙壁都可获得Pi的利润,求最大利润 避免重复粉刷: 首 ...
- 剑指offer——链表
#include"stdio.h" #include"stdlib.h" #include"iostream" using namespac ...
- Javascript 定时器的使用陷阱 (setInterval)
setTimeout(function(){ // 其他代码 setTimeout(arguments.callee, interval); }, interval); setInterval会产生回 ...
- nodejs之socket.io 聊天实现
写在前面:最近很火的“996”话题,可谓是引起一片热议,马老师说:能够996应该是幸运的,996是对奋斗者的一种机遇(记得不是很清楚).996缺少的是自己的空闲时间了,当我是空闲的时候偶尔996挺好的 ...
- 关于DES加密
数据加密算法(Data Encryption Algorithm,DEA)是一种对称加密算法,很可能是使用最广泛的密钥系统,特别是在保护金融数据的安全中,最初开发的DEA是嵌入硬件中的.通常,自动取款 ...
- Unix_JDK安装及配置
CentOS 下过程 JDK 在 CentOS 和 Ubuntu 下安装过程是一样的,所以这里不再讲 Ubuntu 系统下的安装 JDK 1.8 下载 此时(20170906)最新版本:jdk-8u1 ...