I don't know why ripple does not work in your app but when I tested it, It is working properly. I think you didn't give padding to your ImageButton
. You can see my XML code that how my code shows the Ripple effect.
<ImageButton
android:id="@+id/imageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
app:srcCompat="@drawable/note"
tools:ignore="ContentDescription" />
<!-- Make sure that you have added padding to show ripple effect. Otherwise ripple effect not show-->
* Be the first to Make Comment