I have a linear layout and there is an onClickListener implemented on it.
Now I want that when it is clicked its background color to white is changed and remains that way until something else is clicked. When something else is clicked I want it to have transparent background
How to achieve this?
Thanks in advance
I have a linear layout and there is an onClickListener implemented on it. Now
Share
Create two drawable images in your drawable folder. And when it is clicked, you can change the background of the layout.
Following code changes the background: