?attr/
?attr
属于自定义style属性 在attr.xml中定义
<declare-styleable name="Theme">
<attr name="customAttributeSize" format="reference|dimension">
</declare-styleable>
然后可以在style.xml中使用
<style name="MyAppTheme" parent="android:Theme.Holo">
...
<item name="customAttributeSize">24dp</item>
...
</style>
<style name="TextAppearance.Custom" parent="TextAppearance">
<item name="android:textSize">?customAttributeSize</item>
</style>
?android:attr/
android
的定义就是build-in的style属性
@[type]/
和@[type]/引用类型相比, 上面所说的时引用自定义的style属性,而@[type]/是引用已知的属性,如drawable, layout, xml之类的