I define following drawable my_background_drawable.xml:
A ColorStateList cannot be passed as an attribute for in an XML definition, or really any attribute of a . This attribute is inflated out of the XML as a Color resource and then passed to the Drawable's setColor() method, which only takes a single ARGB value.
There is only one type of Drawable instance that is designed to contain and present multiple items based on state, and that is StateListDrawable, which is what you get when you inflate a . All other Drawable instances are meant to simply be members of this collection or drawn standalone.
Note also that an inflated item is actually a GradientDrawable and not a ShapeDrawable. If you check out the inflate() method of GradientDrawable in the source, you can get all the detail you could ask for on how each attribute is used.
HTH!