I have a button defined as shown below. When I want to disable it I use my_btn.setEnabled(false), but I would also like to grey it out. How can I do that?
my_btn.setEnabled(false)
You should create a XML file for the disabled button (drawable/btn_disable.xml)
And create a selector for the button (drawable/btn_selector.xml)
Add the selector to your button