您的位置:首页 > 移动开发 > Android开发

Android 5.0以上Button去掉阴影

2017-04-14 11:50 453 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: