Using libraries. This is one of them. Just add its dependency and put below code in xml before each elements that needs ripple effect:
<com.balysv.materialripple.MaterialRippleLayout
android:id="@+id/ripple"
android:layout_width="match_parent"
android:layout_height="wrap_content">