I added a ripple effect on a ImageButton
, however it is hidden by an ImageView
used as a background for the parent view RelativeLayout
I had exactly the same issue and solved it using this thread: https://code.google.com/p/android/issues/detail?id=155880
Issue preview:
Before solved:
After solved:
Explanation:
"Borderless buttons draw their content on the closest background. Your button might not be having background between itself and the ImageView
, so it draws underneath the ImageView
."
Solution:
"Use a transparent background (android:background="@android:color/transparent"
) on some layout containing the button (beneath the ImageView
). This will dictate what the maximum bounds of the ripple effect is."
Hope it helps.