discord-jadx/app/src/main/java/com/discord/tooltips/SparkleView.java

64 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.v.c;
import c.a.v.d;
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(2131558664, this);
ImageView imageView = (ImageView) findViewById(2131365067);
if (imageView != null) {
h1 h1Var = new h1(this, imageView);
m.checkNotNullExpressionValue(h1Var, "SparkleViewBinding.infla…ater.from(context), this)");
this.i = h1Var;
this.j = 2131232336;
this.k = g.lazy(new c(this));
setLayoutParams(new FrameLayout.LayoutParams(-2, -2));
imageView.setImageDrawable(getSparkleDrawable());
AnimatedVectorDrawableCompat sparkleDrawable = getSparkleDrawable();
if (sparkleDrawable != null) {
sparkleDrawable.registerAnimationCallback(new d(this));
}
AnimatedVectorDrawableCompat sparkleDrawable2 = getSparkleDrawable();
if (sparkleDrawable2 != null) {
sparkleDrawable2.start();
return;
}
return;
}
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(2131365067)));
}
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();
}
}
}