这两种语法有什么区别?
What is the difference between the two syntaxes?
android:textAppearance="@android:style/TextAppearance.Small"
android:textAppearance="?android:textAppearanceSmall"
两者都给出相同的结果。编译效率有什么区别吗
android:textAppearance="@android:style/TextAppearance.Small"
是直接设置文字样式
android:textAppearance="?android:textAppearanceSmall"
是在此Activity或此TextView Theme上设置值的参考文本样式。像这样:
<style name="MyStyle">
<item name="textAppearanceSmall">@style/textStyle</item>
</style>
android:textAppearance="@android:style/TextAppearance.Small"
android:textAppearance="?android:textAppearanceSmall"
两者都给出相同的结果。编译效率有什么区别吗
android:textAppearance="@android:style/TextAppearance.Small"
是直接设置文字样式
android:textAppearance="?android:textAppearanceSmall"
是在此Activity或此TextView Theme上设置值的参考文本样式。像这样:
<style name="MyStyle">
<item name="textAppearanceSmall">@style/textStyle</item>
</style>