This is a button selector such that when normal it appears red, when pressed it appears grey.
I would like to ask how could the code be further directly modified suc
You just need to set selector
of button
in your layout file.
and done.
Edit
Following is button_effect.xml
file in drawable
directory
In this, you can see that there are 3 drawables, you just need to place this button_effect
style to your button
, as i wrote above. You just need to replace selector_xml_name
with button_effect
.