RLottieImageView.smali
.class public Lim/tpelyyftgw/ui/components/RLottieImageView;
.super Landroid/widget/ImageView;
.source "RLottieImageView.java"
# instance fields
.field private drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
.field private layerColors:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 2
.param p1, "context" # Landroid/content/Context;
.line 16
invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
.line 17
return-void
.end method
# virtual methods
.method public playAnimation()V
.registers 2
.line 51
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
if-nez v0, :cond_5
.line 52
return-void
.line 54
:cond_5
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->start()V
.line 55
return-void
.end method
.method public setAnimation(III)V
.registers 11
.param p1, "resId" # I
.param p2, "w" # I
.param p3, "h" # I
.line 30
new-instance v6, Lim/tpelyyftgw/ui/components/RLottieDrawable;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, ""
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
int-to-float v0, p2
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
int-to-float v0, p3
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
const/4 v5, 0x0
move-object v0, v6
move v1, p1
invoke-direct/range {v0 .. v5}, Lim/tpelyyftgw/ui/components/RLottieDrawable;-><init>(ILjava/lang/String;IIZ)V
iput-object v6, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
.line 31
invoke-virtual {v6}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->beginApplyLayerColors()V
.line 32
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->layerColors:Ljava/util/HashMap;
if-eqz v0, :cond_56
.line 33
invoke-virtual {v0}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_34
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_56
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
.line 34
.local v1, "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/Integer;>;"
iget-object v2, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/String;
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/Integer;
invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I
move-result v4
invoke-virtual {v2, v3, v4}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->setLayerColor(Ljava/lang/String;I)V
.line 35
.end local v1 # "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/Integer;>;"
goto :goto_34
.line 37
:cond_56
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->commitApplyLayerColors()V
.line 38
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->setAllowDecodeSingleFrame(Z)V
.line 39
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->setAutoRepeat(I)V
.line 40
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/RLottieImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 41
return-void
.end method
.method public setLayerColor(Ljava/lang/String;I)V
.registers 5
.param p1, "layer" # Ljava/lang/String;
.param p2, "color" # I
.line 20
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->layerColors:Ljava/util/HashMap;
if-nez v0, :cond_b
.line 21
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->layerColors:Ljava/util/HashMap;
.line 23
:cond_b
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->layerColors:Ljava/util/HashMap;
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v0, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 24
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
if-eqz v0, :cond_1b
.line 25
invoke-virtual {v0, p1, p2}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->setLayerColor(Ljava/lang/String;I)V
.line 27
:cond_1b
return-void
.end method
.method public setProgress(F)V
.registers 3
.param p1, "progress" # F
.line 44
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
if-nez v0, :cond_5
.line 45
return-void
.line 47
:cond_5
invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->setProgress(F)V
.line 48
return-void
.end method
.method public stopAnimation()V
.registers 2
.line 58
iget-object v0, p0, Lim/tpelyyftgw/ui/components/RLottieImageView;->drawable:Lim/tpelyyftgw/ui/components/RLottieDrawable;
if-nez v0, :cond_5
.line 59
return-void
.line 61
:cond_5
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/RLottieDrawable;->start()V
.line 62
return-void
.end method