When a button has a background from a painted object, we can add a ripple effect to the foreground parameter. Check below code if it works for my button with a different background
<Button android:layout_width="wrap_content" android:layout_height="40dp" android:gravity="center" android:layout_centerHorizontal="true" android:background="@drawable/shape_login_button" android:foreground="?attr/selectableItemBackgroundBorderless" android:clickable="true" android:text="@string/action_button_login" />
Add below parameter for ripple effect.
android:foreground="?attr/selectableItemBackgroundBorderless" android:clickable="true" android:focusable="true"
source share