Set a layered drawable's child callback to be the container.

Change-Id: I959ad03883931d727d464f384073926e8fa9e2d2
This commit is contained in:
Romain Guy
2010-05-06 18:07:40 -07:00
parent 026ed0f93d
commit 6430c943f9

View File

@@ -265,7 +265,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
*/
public boolean setDrawableByLayerId(int id, Drawable drawable) {
final ChildDrawable[] layers = mLayerState.mChildren;
if (drawable != null) drawable.setCallback(mCallback);
drawable.setCallback(this);
for (int i = mLayerState.mNum - 1; i >= 0; i--) {
if (layers[i].mId == id) {