很多时候直接background添加那三种:
1.android:background=“?android:attr/selectableItemBackground”波纹有边界
2.android:background=“?android:attr/selectableItemBackgroundBorderless”波纹超出边界,就是一个圆型
还有一种就是button默认的。
可能一时无法改变背景,一种方法是外面套一个LinearLayout等设置背景色,还有个方法就是在drawer里面建 ripple。
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/colorPrimary">
<item >
<shape>