Create a LayerDrawable object programatically
<p>How can I create this drawable programatically? </p>

<pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;item&gt;
  &lt;bitmap android:src="@drawable/android_red"
    android:gravity="center" /&gt;
&lt;/item&gt;
&lt;item android:top="10dp" android:left="10dp"&gt;
  &lt;bitmap android:src="@drawable/android_green"
    android:gravity="center" /&gt;
&lt;/item&gt;
&lt;item android:top="20dp" android:left="20dp"&gt;
  &lt;bitmap android:src="@drawable/android_blue"
    android:gravity="center" /&gt;
&lt;/item&gt;
</code></pre>

<p></p>

<p>Thanks a lot</p>
