Issue
Setting a same Drawable
to multiple buttons/views as backgrounds (using setBackground(Drawable)
has problem with ripple effect, when I click Button A, the ripple effect of Button B would be shown.
Note: I tested mutate()
but nothing worked
Solution
Try
Drawable newDrawable = oldDrawable.getConstantState().newDrawable().mutate();
Answered By - Nikolay Kucheriaviy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.