2009-12-14

[Android] Drawable-related XML tags and associated documentation

I've been feeling frustrated about Android's documentation, especially its XML part. Although Android does have pages for these XML tags, they are unfortunately scattered all over documentation. Earlier today, when I was trying to use
<selector> to change background drawables, I just realized what "scatter through" means, :(. So, I made a table to record the connections between drawable-related XML tags and their associated Java classes. It's better than nothing.

XML tag
Associated Java Class
<shape>
android.graphics.drawable.GradientDrawable
<selector>
android.graphics.drawable.StateListDrawable
<bitmap>
android.graphics.drawable.BitmapDrawable
<clip>
android.graphics.drawable.ClipDrawable
<level-list>
android.graphics.drawable.LevelListDrawable
<layer-list>
android.graphics.drawable.LayerDrawable
<transition>
android.graphics.drawable.TransitionDrawable
<inset>
android.graphics.drawable.InsetDrawable
<rotate>
android.graphics.drawable.RotateDrawable
<animation-list>
android.graphics.drawable.AnimationDrawable
<color>
android.graphics.drawable.ColorDrawable