http://blog.csdn.net/insist_hui/article/details/51840481
http://www.jb51.net/article/90646.htm
http://www.2cto.com/kf/201608/542438.html
drawable
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/white" android:state_pressed="false"/>
<item android:drawable="@color/litter_pink" android:state_pressed="true"/>
</selector>
drawable-v21
有界水波纹需要我们在ripple节点中定义item,item的id要为系统id mask,然后还要定义drawable,drawable中的颜色并没有什么卵用,水波纹的颜色是由ripple节点中的颜色来控制的
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/litter_pink"><!-- 按压的颜色 -->
<!-- 底部背景的drawable/color/bitmap -->
<!--<item android:drawable="@color/red" />-->
设置有界
<item android:drawable="@color/white" android:id="@android:id/mask"/>
</ripple>