Attr、Style和Theme

来源:互联网 发布:js怎么判断日期相等 编辑:程序博客网 时间:2024/06/06 07:26

这篇写的还可以

http://www.jianshu.com/p/dd79220b47dd

不过漏掉一个问题

Android 中declare-styleable 和style 的不同

<resources>    <style name="dsf">        <item name="dd" >ddd</item>    </style>    <declare-styleable name="dsaf">        <attr name="ss"/>    </declare-styleable></resources>
style 中只能定义item,declare-styleable中只能定义attr,也就是说style是使用attr,declare-styleable是定义attr
此问题参考:

http://www.cnblogs.com/wangfenjin/archive/2012/09/05/2672007.html

原创粉丝点击