duanhong169 / DrawableToolbox

🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files.
Apache License 2.0
1.14k stars 98 forks source link

ripple issue when setting drawable #3

Open ashkanpower opened 5 years ago

ashkanpower commented 5 years ago

On Samsung j7 android 6.1 when changing background drawable with ripple effect, ripple plays without touching.

even setting clickable to false wont fix the problem, but fixed problem for my other devices

this.setClickable(false);
this.setBackground(offRipple);
this.setClickable(true);

hivabutton

duanhong169 commented 5 years ago

Could you please provide a runnable project which can reproduce the issue?

ashkanpower commented 5 years ago

https://github.com/meysamhadigheh/HivaTecTools

HivaTecTools/app/src/main/java/hivatec/ir/hivatectoolstest/activities/ButtonActivity.java

there is a sample of multiselect buttons.

everything happens inside a view I created as button : HivaTecTools/hivatectools/src/main/java/hivatec/ir/hivatectools/views/HivaButton.java