Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable ripple effect on long press of a button in lollipop?

How to disable ripple effect on long press of a button in lollipop?

When using sherlock long press of a button is not showing ripple effect but when i use appcompat it is showing a ripple effect on click and also on long click of a button . I do not want any ripple effect on the press of a button

like image 762
ravi pradeep Avatar asked Sep 27 '22 10:09

ravi pradeep


1 Answers

If you are using MaterialButton, then set app:rippleColor:

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

Thanks to this and this answer for their help.

like image 169
Mahozad Avatar answered Oct 03 '22 02:10

Mahozad