1

In certain apps like Google Play, quickly tapping / clicking views do not show a ripple effect.

If you long press an element the ripple is shown.

How is this effect achieved?

Thanks

Mahozad
  • 18,032
  • 13
  • 118
  • 133
Ljdawson
  • 12,091
  • 11
  • 45
  • 60

3 Answers3

0

Try set properties view in layout: android:clickable="false"

cheng
  • 1,196
  • 2
  • 12
  • 16
0

AFAIK You need to set other selector on that view. Ripple effect uses sectors which have "ripple" node in the xml. Just use old type of selectors for Android <21 and it should work tag you want.

radzio
  • 2,862
  • 4
  • 26
  • 35
0

I think what you are looking for is app:rippleColor attribute (if Material design library is used). So if you want to disable the ripple effect on a Button for example, set its ripple color to transparent:

<com.google.android.material.button.MaterialButton
    ...
    app:rippleColor="@android:color/transparent" />

I've already answered anther similar question.

Mahozad
  • 18,032
  • 13
  • 118
  • 133