They have states for things like pressed, focused, disabled, but is it possible to create custom states so it could reflect some of my own custom criteria?
For example, say you have a list of names. Some people fall into a certain category that should be visually represented differently. These people's rows would then have a different state and background drawable.
State value for StateListDrawable , set when a view's window has input focus. android:variablePadding. If true, allows the drawable's padding to change based on the current state that is selected.
This article shows how to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With