63 lines
2.4 KiB
Java
63 lines
2.4 KiB
Java
package com.discord.tooltips;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.ImageView;
|
|
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat;
|
|
import c.a.i.h1;
|
|
import c.a.w.b;
|
|
import c.a.w.c;
|
|
import d0.g;
|
|
import d0.z.d.m;
|
|
import kotlin.Lazy;
|
|
/* compiled from: SparkleView.kt */
|
|
public final class SparkleView extends FrameLayout {
|
|
public final h1 i;
|
|
public int j;
|
|
public final Lazy k;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public SparkleView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
m.checkNotNullParameter(context, "context");
|
|
LayoutInflater.from(getContext()).inflate(2131558660, this);
|
|
ImageView imageView = (ImageView) findViewById(2131365003);
|
|
if (imageView != null) {
|
|
h1 h1Var = new h1(this, imageView);
|
|
m.checkNotNullExpressionValue(h1Var, "SparkleViewBinding.infla…ater.from(context), this)");
|
|
this.i = h1Var;
|
|
this.j = 2131232321;
|
|
this.k = g.lazy(new b(this));
|
|
setLayoutParams(new FrameLayout.LayoutParams(-2, -2));
|
|
imageView.setImageDrawable(getSparkleDrawable());
|
|
AnimatedVectorDrawableCompat sparkleDrawable = getSparkleDrawable();
|
|
if (sparkleDrawable != null) {
|
|
sparkleDrawable.registerAnimationCallback(new c(this));
|
|
}
|
|
AnimatedVectorDrawableCompat sparkleDrawable2 = getSparkleDrawable();
|
|
if (sparkleDrawable2 != null) {
|
|
sparkleDrawable2.start();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(2131365003)));
|
|
}
|
|
|
|
public static final /* synthetic */ AnimatedVectorDrawableCompat a(SparkleView sparkleView) {
|
|
return sparkleView.getSparkleDrawable();
|
|
}
|
|
|
|
private final AnimatedVectorDrawableCompat getSparkleDrawable() {
|
|
return (AnimatedVectorDrawableCompat) this.k.getValue();
|
|
}
|
|
|
|
public final void b() {
|
|
AnimatedVectorDrawableCompat sparkleDrawable = getSparkleDrawable();
|
|
if (sparkleDrawable != null) {
|
|
sparkleDrawable.stop();
|
|
}
|
|
}
|
|
}
|