74 lines
1.8 KiB
Java
74 lines
1.8 KiB
Java
package o;
|
|
|
|
import android.graphics.drawable.Animatable;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.widget.ImageView;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class QEG<Z> extends TOD<ImageView, Z> {
|
|
private Animatable d;
|
|
|
|
protected abstract void c(Z z);
|
|
|
|
public QEG(ImageView imageView) {
|
|
super(imageView);
|
|
}
|
|
|
|
@Override // o.TOD, o.AbstractC0237CQu, o.YcZ
|
|
public final void FU_(Drawable drawable) {
|
|
super.FU_(drawable);
|
|
b(null);
|
|
((ImageView) this.a).setImageDrawable(drawable);
|
|
}
|
|
|
|
@Override // o.AbstractC0237CQu, o.YcZ
|
|
public final void avy_(Drawable drawable) {
|
|
super.avy_(drawable);
|
|
b(null);
|
|
((ImageView) this.a).setImageDrawable(drawable);
|
|
}
|
|
|
|
@Override // o.TOD, o.AbstractC0237CQu, o.YcZ
|
|
public final void avx_(Drawable drawable) {
|
|
super.avx_(drawable);
|
|
Animatable animatable = this.d;
|
|
if (animatable != null) {
|
|
animatable.stop();
|
|
}
|
|
b(null);
|
|
((ImageView) this.a).setImageDrawable(drawable);
|
|
}
|
|
|
|
@Override // o.YcZ
|
|
public final void d(Z z) {
|
|
b(z);
|
|
}
|
|
|
|
@Override // o.AbstractC0237CQu, o.Lco
|
|
public final void a() {
|
|
Animatable animatable = this.d;
|
|
if (animatable != null) {
|
|
animatable.start();
|
|
}
|
|
}
|
|
|
|
@Override // o.AbstractC0237CQu, o.Lco
|
|
public final void c() {
|
|
Animatable animatable = this.d;
|
|
if (animatable != null) {
|
|
animatable.stop();
|
|
}
|
|
}
|
|
|
|
private void b(Z z) {
|
|
c((QEG<Z>) z);
|
|
if (!(z instanceof Animatable)) {
|
|
this.d = null;
|
|
return;
|
|
}
|
|
Animatable animatable = (Animatable) z;
|
|
this.d = animatable;
|
|
animatable.start();
|
|
}
|
|
}
|