目的
Android系統(tǒng)5.0之后系統(tǒng)的默認(rèn)button控件都會有一個陰影,UI設(shè)計(jì)上一般都不會有這個效果亦歉,所以只能想辦法去掉。
使用方法
去掉整個App中所有button的陰影效果
在Application使用的主題中加入以下屬性即可
<item name="buttonStyle">@style/Widget.AppCompat.Button.Borderless</item>
去掉指定Activity中所有button的陰影效果
在Activity使用的Theme中加入以下屬性即可
<item name="buttonStyle">@style/Widget.AppCompat.Button.Borderless</item>
去掉指定button的陰影效果
可以參考