LoginSignup
0
1

More than 5 years have passed since last update.

View に Ripple をつける

Last updated at Posted at 2016-09-19

現象

ViewHolder の layout にある RelativeLayout に Ripple がつかなかったので、対処法

対処法

android:foreground を使う

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:foreground="?android:attr/selectableItemBackground"
    android:background="@color/white" />
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1