button点击时 ,在5.0以上的系统还有涟漪的效果,在需要修改的Button中添加android:theme属性,引用新建的Style即可。
使用方式如下:
<Button
...
android:theme="@style/Button"
/>
<style name="Button" parent="Theme.AppCompat">
<item name="colorControlHighlight">@color/indigo_500</item>
<item name="colorButtonNormal">@color/pink_200</item>
</style>
或者另一种 设置
直接在button控件中设置 如下属性
android:background="?android:listChoiceBackgroundIndicator"