.class public Lcom/ali/auth/third/core/util/TaeProgressDialog;
.super Landroid/app/ProgressDialog;
.source "TaeProgressDialog.java"


# instance fields
.field private indeterminate:Z

.field private message:Ljava/lang/CharSequence;

.field private progressBar:Landroid/widget/ProgressBar;

.field private progressVisiable:Z

.field private textView:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 20
    invoke-direct {p0, p1}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;I)V
    .locals 0

    .line 24
    invoke-direct {p0, p1, p2}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;I)V

    return-void
.end method

.method private setMessageAndView()V
    .locals 3

    .line 39
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->textView:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->message:Ljava/lang/CharSequence;

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

    .line 41
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->message:Ljava/lang/CharSequence;

    const/16 v1, 0x8

    if-eqz v0, :cond_0

    const-string v0, ""

    iget-object v2, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->message:Ljava/lang/CharSequence;

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 42
    :cond_0
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->textView:Landroid/widget/TextView;

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

    .line 45
    :cond_1
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressBar:Landroid/widget/ProgressBar;

    iget-boolean v2, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressVisiable:Z

    if-eqz v2, :cond_2

    const/4 v1, 0x0

    :cond_2
    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    .line 29
    invoke-super {p0, p1}, Landroid/app/ProgressDialog;->onCreate(Landroid/os/Bundle;)V

    const-string p1, "layout"

    const-string v0, "com_taobao_tae_sdk_progress_dialog"

    .line 30
    invoke-static {p1, v0}, Lcom/ali/auth/third/core/util/ResourceUtils;->getIdentifier(Ljava/lang/String;Ljava/lang/String;)I

    move-result p1

    invoke-virtual {p0, p1}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->setContentView(I)V

    .line 31
    invoke-virtual {p0}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->getWindow()Landroid/view/Window;

    move-result-object p1

    const v0, 0x106000d

    invoke-virtual {p1, v0}, Landroid/view/Window;->setBackgroundDrawableResource(I)V

    const p1, 0x102000d

    .line 32
    invoke-virtual {p0, p1}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ProgressBar;

    iput-object p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressBar:Landroid/widget/ProgressBar;

    const-string p1, "id"

    const-string v0, "com_taobao_tae_sdk_progress_dialog_message"

    .line 33
    invoke-static {p1, v0}, Lcom/ali/auth/third/core/util/ResourceUtils;->getIdentifier(Ljava/lang/String;Ljava/lang/String;)I

    move-result p1

    invoke-virtual {p0, p1}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->textView:Landroid/widget/TextView;

    .line 34
    invoke-direct {p0}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->setMessageAndView()V

    .line 35
    iget-boolean p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->indeterminate:Z

    invoke-virtual {p0, p1}, Lcom/ali/auth/third/core/util/TaeProgressDialog;->setIndeterminate(Z)V

    return-void
.end method

.method public setIndeterminate(Z)V
    .locals 1

    .line 59
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressBar:Landroid/widget/ProgressBar;

    if-eqz v0, :cond_0

    .line 60
    iget-object v0, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressBar:Landroid/widget/ProgressBar;

    invoke-virtual {v0, p1}, Landroid/widget/ProgressBar;->setIndeterminate(Z)V

    goto :goto_0

    .line 62
    :cond_0
    iput-boolean p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->indeterminate:Z

    :goto_0
    return-void
.end method

.method public setMessage(Ljava/lang/CharSequence;)V
    .locals 0

    .line 50
    iput-object p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->message:Ljava/lang/CharSequence;

    return-void
.end method

.method public setProgressVisiable(Z)V
    .locals 0

    .line 54
    iput-boolean p1, p0, Lcom/ali/auth/third/core/util/TaeProgressDialog;->progressVisiable:Z

    return-void
.end method
