RefreshNotifyView.smali
.class public Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;
.super Landroid/widget/LinearLayout;
.source "RefreshNotifyView.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/ui/app/widget/RefreshNotifyView$OnRefreshClick;
}
.end annotation
# instance fields
.field private a:I
.field private b:Ljava/lang/String;
.field private c:Ljava/lang/String;
.field private d:Landroid/widget/ImageView;
.field private e:Landroid/widget/TextView;
.field private f:Landroid/widget/Button;
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.prologue
.line 30
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 31
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.prologue
.line 34
const/4 v0, 0x0
invoke-direct {p0, p1, p2, v0}, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 35
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 5
.prologue
.line 38
invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 21
const/4 v0, 0x0
iput v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a:I
.line 39
invoke-direct {p0, p1, p2}, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 40
invoke-direct {p0, p1}, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a(Landroid/content/Context;)V
.line 41
return-void
.end method
.method private a(Landroid/content/Context;)V
.registers 5
.prologue
.line 52
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object v0
const v1, 0x7f04024a
invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v1
.line 53
const v0, 0x7f1008b2
invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
iput-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
.line 54
const v0, 0x7f1008b3
invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
.line 55
const v0, 0x7f1008b4
invoke-virtual {v1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/Button;
iput-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
.line 57
iget v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a:I
if-eqz v0, :cond_41
.line 58
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
invoke-virtual {v1}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;
move-result-object v1
iget v2, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a:I
invoke-static {v1, v2}, Landroid/support/v4/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 60
:cond_41
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->b:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_50
.line 61
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->b:Ljava/lang/String;
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 63
:cond_50
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->c:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_5f
.line 64
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->c:Ljava/lang/String;
invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
.line 66
:cond_5f
return-void
.end method
.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 6
.prologue
.line 44
sget-object v0, Lcom/cleanmaster/mguard_cn/R$styleable;->RefreshNotifyView:[I
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
move-result-object v0
.line 45
const/4 v1, 0x0
iget v2, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a:I
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I
move-result v1
iput v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->a:I
.line 46
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object v1
iput-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->b:Ljava/lang/String;
.line 47
const/4 v1, 0x2
invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
move-result-object v1
iput-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->c:Ljava/lang/String;
.line 48
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 49
return-void
.end method
# virtual methods
.method public a(Z)V
.registers 4
.prologue
.line 102
if-eqz p1, :cond_d
const/4 v0, 0x0
.line 103
:goto_3
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
if-eqz v1, :cond_c
.line 104
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
invoke-virtual {v1, v0}, Landroid/widget/Button;->setVisibility(I)V
.line 106
:cond_c
return-void
.line 102
:cond_d
const/4 v0, 0x4
goto :goto_3
.end method
.method public setOnRefreshClick(Lcom/cleanmaster/ui/app/widget/RefreshNotifyView$OnRefreshClick;)V
.registers 4
.prologue
.line 109
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
if-eqz v0, :cond_e
.line 110
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
new-instance v1, Lcom/cleanmaster/ui/app/widget/e;
invoke-direct {v1, p0, p1}, Lcom/cleanmaster/ui/app/widget/e;-><init>(Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;Lcom/cleanmaster/ui/app/widget/RefreshNotifyView$OnRefreshClick;)V
invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 119
:cond_e
return-void
.end method
.method public setRefreshBtnText(I)V
.registers 3
.prologue
.line 87
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
if-eqz v0, :cond_9
.line 88
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(I)V
.line 90
:cond_9
return-void
.end method
.method public setRefreshBtnText(Ljava/lang/String;)V
.registers 3
.prologue
.line 93
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
if-eqz v0, :cond_9
.line 94
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->f:Landroid/widget/Button;
invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
.line 96
:cond_9
return-void
.end method
.method public setRefreshImage(I)V
.registers 4
.prologue
.line 69
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
if-eqz v0, :cond_13
.line 70
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
iget-object v1, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;
invoke-virtual {v1}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-static {v1, p1}, Landroid/support/v4/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
.line 72
:cond_13
return-void
.end method
.method public setRefreshText(I)V
.registers 3
.prologue
.line 75
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
if-eqz v0, :cond_9
.line 76
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(I)V
.line 78
:cond_9
return-void
.end method
.method public setRefreshText(Ljava/lang/String;)V
.registers 3
.prologue
.line 81
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
if-eqz v0, :cond_9
.line 82
iget-object v0, p0, Lcom/cleanmaster/ui/app/widget/RefreshNotifyView;->e:Landroid/widget/TextView;
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 84
:cond_9
return-void
.end method