RefreshNotifyView.smali

.class public Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;
.super Landroid/widget/LinearLayout;
.source "RefreshNotifyView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/cleanmaster/pluginscommonlib/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 31
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 32
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4

    .prologue
    .line 35
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 36
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 5

    .prologue
    .line 39
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 22
    const/4 v0, 0x0

    iput v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a:I

    .line 40
    invoke-direct {p0, p1, p2}, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 41
    invoke-direct {p0, p1}, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a(Landroid/content/Context;)V

    .line 42
    return-void
.end method

.method private a(Landroid/content/Context;)V
    .registers 5

    .prologue
    .line 53
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    sget v1, Lcom/cleanmaster/pluginscommonlib/R$layout;->refresh_notify_view:I

    invoke-virtual {v0, v1, p0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    .line 54
    sget v0, Lcom/cleanmaster/pluginscommonlib/R$id;->refresh_notify_image:I

    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/pluginscommonlib/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;

    .line 55
    sget v0, Lcom/cleanmaster/pluginscommonlib/R$id;->refresh_notify_text:I

    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/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    .line 56
    sget v0, Lcom/cleanmaster/pluginscommonlib/R$id;->refresh_notify_btn:I

    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/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    .line 58
    iget v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a:I

    if-eqz v0, :cond_3d

    .line 59
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/cleanmaster/pluginscommonlib/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/pluginscommonlib/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 61
    :cond_3d
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->b:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_4c

    .line 62
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 64
    :cond_4c
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->c:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_5b

    .line 65
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    iget-object v1, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 67
    :cond_5b
    return-void
.end method

.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 6

    .prologue
    .line 45
    sget-object v0, Lcom/cleanmaster/pluginscommonlib/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 46
    sget v1, Lcom/cleanmaster/pluginscommonlib/R$styleable;->RefreshNotifyView_refresh_image:I

    iget v2, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a:I

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result v1

    iput v1, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->a:I

    .line 47
    sget v1, Lcom/cleanmaster/pluginscommonlib/R$styleable;->RefreshNotifyView_refresh_text:I

    invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->b:Ljava/lang/String;

    .line 48
    sget v1, Lcom/cleanmaster/pluginscommonlib/R$styleable;->RefreshNotifyView_refresh_btn_text:I

    invoke-virtual {v0, v1}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->c:Ljava/lang/String;

    .line 49
    invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V

    .line 50
    return-void
.end method


# virtual methods
.method public setOnRefreshClick(Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView$OnRefreshClick;)V
    .registers 4

    .prologue
    .line 110
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    if-eqz v0, :cond_e

    .line 111
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    new-instance v1, Lcom/cleanmaster/pluginscommonlib/widget/i;

    invoke-direct {v1, p0, p1}, Lcom/cleanmaster/pluginscommonlib/widget/i;-><init>(Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView$OnRefreshClick;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 120
    :cond_e
    return-void
.end method

.method public setRefreshBtnText(I)V
    .registers 3

    .prologue
    .line 88
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    if-eqz v0, :cond_9

    .line 89
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(I)V

    .line 91
    :cond_9
    return-void
.end method

.method public setRefreshBtnText(Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 94
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    if-eqz v0, :cond_9

    .line 95
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->f:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 97
    :cond_9
    return-void
.end method

.method public setRefreshImage(I)V
    .registers 4

    .prologue
    .line 70
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;

    if-eqz v0, :cond_13

    .line 71
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->d:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/cleanmaster/pluginscommonlib/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 73
    :cond_13
    return-void
.end method

.method public setRefreshText(I)V
    .registers 3

    .prologue
    .line 76
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    if-eqz v0, :cond_9

    .line 77
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(I)V

    .line 79
    :cond_9
    return-void
.end method

.method public setRefreshText(Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 82
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    if-eqz v0, :cond_9

    .line 83
    iget-object v0, p0, Lcom/cleanmaster/pluginscommonlib/widget/RefreshNotifyView;->e:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 85
    :cond_9
    return-void
.end method