I want to add a ripple effect to ImageView / ImageButton in the notification on Android Lollipop. I saw that this is possible on Google Play Music. However, the solution I used with other views does not work with notifications.
I created RippleDrawable in drawable-v21
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#33000000"> </ripple>
And set this drawing as ImageView background
<ImageView android:id="@+id/notification_play_button" tools:src="@drawable/av_play_over_video" android:layout_width="32dp" android:layout_height="32dp" android:background="@drawable/button_selector_semi_black" />
But that just doesn't work. Do you have any ideas on how to achieve this effect?
source share