Custom Button creation with multiple functionalities

I want to know how to create “Custom Button” with multiple functionalities ( Disable, focused…) in android .
Could you tell the process

“Disabled” and “focused” are two states of a StateListDrawable. A StateListDrawable is often used as the background for widgets, including buttons. I have a section on StateListDrawable in The Busy Coder’s Guide to Android Development.

Beyond that, being disabled or being focused are part of the standard View framework; a custom Button should not need to do anything other than provide the StateListDrawable background, IIRC.