android api21及以上引入了控件点击的水波纹效果
xml中设置
android:background="?android:attr/selectableItemBackground"
代码中设置
TypedValue typedValue = new TypedValue();
getTheme().resolveAttribute(R.attr.selectableItemBackground, typedValue, true);
view.setBackgroundResource(typedValue.resourceId);