将我的活动的父级更改Activity为AppCompatActivity,更改按钮上的字体.例如,Remove- > REMOVE.对于其他Vews,字体没有改变.
为什么按钮上的字体会发生变化?如何恢复原始字体?
按钮:
<Button
android:id="@+id/buttonAddProduct"
tools:text="Remove"
android:layout_width="match_parent"
android:textSize="13dp"
android:layout_weight="1"
style="@style/btns_blue_big" />
Run Code Online (Sandbox Code Playgroud)
样式:
<style name="btns_text_big">
<item name="android:textSize">@dimen/text_size_big</item>
<item name="android:textColor">@color/colorMainWhite</item>
</style>
<style name="btns_lo_big" parent="btns_text_big">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">48dp</item>
</style>
<style name="btns_blue_big" parent="btns_lo_big">
<item name="android:background">@drawable/button_dialog_positive_shape</item>
</style>
Run Code Online (Sandbox Code Playgroud)