Make sure that a drawable replacing a layer in a LayerDrawable gets a callback.
Change-Id: Iefac7d280b3c16e05f45688da655e17e21a3098b
This commit is contained in:
@@ -265,6 +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);
|
||||
|
||||
for (int i = mLayerState.mNum - 1; i >= 0; i--) {
|
||||
if (layers[i].mId == id) {
|
||||
|
||||
Reference in New Issue
Block a user