.class public Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;
.super Landroid/widget/RelativeLayout;
.source "CommentPraiseView.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView$CommentPraiseClickListener;
    }
.end annotation


# instance fields
.field private a:Landroid/widget/ImageView;

.field private b:Landroid/widget/TextView;


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

    .line 26
    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    .line 27
    invoke-direct {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .line 31
    invoke-direct {p0, p1, p2}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 32
    invoke-direct {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

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

    .line 37
    invoke-direct {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a()V

    return-void
.end method

.method private a()V
    .locals 2

    .line 41
    invoke-virtual {p0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->getContext()Landroid/content/Context;

    move-result-object v0

    sget v1, Lcom/moji/mjweather/ipc/R$layout;->view_comment_praise:I

    invoke-static {v0, v1, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    .line 42
    sget v0, Lcom/moji/mjweather/ipc/R$id;->iv_praise_icon:I

    invoke-virtual {p0, v0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a:Landroid/widget/ImageView;

    .line 43
    sget v0, Lcom/moji/mjweather/ipc/R$id;->tv_praise_num:I

    invoke-virtual {p0, v0}, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    return-void
.end method


# virtual methods
.method public setCommentPraiseNum(I)V
    .locals 1

    if-eqz p1, :cond_2

    if-gez p1, :cond_0

    goto :goto_0

    :cond_0
    const/16 v0, 0x3e7

    if-gt p1, v0, :cond_1

    .line 60
    iget-object v0, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object p1

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

    goto :goto_1

    .line 62
    :cond_1
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    const-string v0, "999+"

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

    goto :goto_1

    .line 58
    :cond_2
    :goto_0
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    sget v0, Lcom/moji/mjweather/ipc/R$string;->comment_praise:I

    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v0

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

    :goto_1
    return-void
.end method

.method public setSelectIcon(Z)V
    .locals 1

    if-eqz p1, :cond_0

    .line 48
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a:Landroid/widget/ImageView;

    sget v0, Lcom/moji/mjweather/ipc/R$drawable;->icon_dinged:I

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

    .line 49
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    const-string v0, "#FF5C5C"

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

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

    goto :goto_0

    .line 51
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->b:Landroid/widget/TextView;

    const-string v0, "#999999"

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

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

    .line 52
    iget-object p1, p0, Lcom/moji/mjweather/ipc/view/liveviewcomment/CommentPraiseView;->a:Landroid/widget/ImageView;

    sget v0, Lcom/moji/mjweather/ipc/R$drawable;->icon_no_ding:I

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

    :goto_0
    return-void
.end method
