ImageView: unset Drawable callback when unsetting Drawable

This commit is contained in:
Julian Winkler 2025-02-10 18:10:13 +01:00
parent 652715ee00
commit 4e29b6af1d

View file

@ -74,6 +74,9 @@ public class ImageView extends View {
drawable = drawable.mutate();
drawable.setColorFilter(colorFilter);
}
if (this.drawable != null) {
this.drawable.setCallback(null);
}
this.drawable = drawable;
if (drawable != null) {
drawable.setCallback(this);