【发布时间】:2015-03-28 17:31:53
【问题描述】:
styles.xml
<style name="Red" parent="android:TextAppearance.DeviceDefault.Medium.Inverse">
<item name="android:textColor">#f00</item>
</style>
<style name="Red.LARGE">
<item name="android:textSize">30sp</item>
</style>
当我使用这个时;
<Button
android:id="@+id/save"
android:text="@string/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/save_marginTop"
android:gravity="center"
style="@style/Red.LARGE"/>
此按钮仅将“大”和“点画”属性设置为“红色”。为什么?
【问题讨论】:
标签: android inheritance styles