.class public Lcom/moji/forum/common/ToastUtil;
.super Ljava/lang/Object;
.source "ToastUtil.java"


# static fields
.field private static a:Landroid/widget/Toast;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 6
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static a(Landroid/content/Context;I)V
    .locals 2

    .line 30
    sget-object v0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    const/4 v1, 0x0

    if-nez v0, :cond_0

    .line 31
    invoke-static {p1}, Lcom/moji/forum/common/ResUtil;->b(I)Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p0

    sput-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    goto :goto_0

    .line 33
    :cond_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-static {p1}, Lcom/moji/forum/common/ResUtil;->b(I)Ljava/lang/String;

    move-result-object p1

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

    .line 34
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0, v1}, Landroid/widget/Toast;->setDuration(I)V

    .line 36
    :goto_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void
.end method

.method public static a(Landroid/content/Context;II)V
    .locals 1

    .line 20
    sget-object v0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    if-nez v0, :cond_0

    .line 21
    invoke-static {p1}, Lcom/moji/forum/common/ResUtil;->b(I)Ljava/lang/String;

    move-result-object p1

    invoke-static {p0, p1, p2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p0

    sput-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    goto :goto_0

    .line 23
    :cond_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-static {p1}, Lcom/moji/forum/common/ResUtil;->b(I)Ljava/lang/String;

    move-result-object p1

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

    .line 24
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0, p2}, Landroid/widget/Toast;->setDuration(I)V

    .line 26
    :goto_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;I)V
    .locals 1

    .line 10
    sget-object v0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    if-nez v0, :cond_0

    .line 11
    invoke-static {p0, p1, p2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p0

    sput-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    goto :goto_0

    .line 13
    :cond_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

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

    .line 14
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0, p2}, Landroid/widget/Toast;->setDuration(I)V

    .line 16
    :goto_0
    sget-object p0, Lcom/moji/forum/common/ToastUtil;->a:Landroid/widget/Toast;

    invoke-virtual {p0}, Landroid/widget/Toast;->show()V

    return-void
.end method
