mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
ImageView: unset Drawable callback when unsetting Drawable
This commit is contained in:
parent
652715ee00
commit
4e29b6af1d
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue