小编Efr*_*vAV的帖子

AppCompatActivity的按钮文本的字体样式已更改

将我的活动的父级更改ActivityAppCompatActivity,更改按钮上的字体.例如,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)

fonts android button

5
推荐指数
1
解决办法
825
查看次数

标签 统计

android ×1

button ×1

fonts ×1