【发布时间】:2017-04-26 11:32:35
【问题描述】:
如果我想设置全局 textViewStyle 并保持与 AppCompat 的向后兼容性,我应该使用什么父样式?我找不到像 Widget.AppCompat.TextView 之类的东西:
<style name="Base_AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textViewStyle">@style/GlobalTextViewStyle</item>
</style>
<style name="GlobalTextViewStyle" parent="?????">
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Medium</item>
</style>
【问题讨论】:
-
你试过不设置父母吗?就是这个:
<style name="GlobalTextViewStyle">。或者设置parent属性的值很重要?我现在也有同样的问题,但没有任何合适的决定。 如果您使用 AppCompat,我认为使用android:...作为父级是不好的。
标签: android textview android-support-library android-appcompat android-styles