0
iv_button
のリップルエフェクトは、ImageViewがwrapper
ImageViewにバックグラウンドを設定するまで正常に動作します。これを修正するには?ImageViewがsetBackgroundを持つ別のImageViewをオーバーレイするとリップル効果が失われる
ご協力いただければ幸いです。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/wrapper"
android:background="@color/green" //the ripple effect works without this line
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ImageView
android:id="@+id/iv_button"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:src="@android:drawable/ic_delete" />
</RelativeLayout>
この参照先https://stackoverflow.com/questions/31393684/set-ripple-effect-on-image-view – R2R