Android 5.0以上Button去掉阴影

    xiaoxiao2021-04-17  40

    1,在Button标签中直接添加以下属性

    style=”?Android:attr/borderlessButtonStyle”

    2,有的Button的属性已经抽成style,此时直接在style时添加上parent:

    <style name="btn_right_angle_bg_text" parent="@style/Widget.AppCompat.Button.Borderless"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">48dp</item> <item name="android:background">@drawable/btn_right_angle_selector</item> <item name="android:textSize">16sp</item> <item name="android:textColor">@color/white</item> </style>
    转载请注明原文地址: https://ju.6miu.com/read-673610.html

    最新回复(0)