Android: can you have a ripple effect whose default state color is transparent?
问题 Something like the following, but it doesn't work. If I switch the drawable color to something like blue, it works. <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <item android:drawable="@android:color/transparent"/> </ripple> 回答1: It's necessary to add a mask: <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <item android:id="@android:id/mask"> <color android