.class public Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;
.super Landroid/widget/BaseAdapter;
.source "MyCommentFragment.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/forum/ui/MyCommentFragment;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "MyCommentListAdapter"
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/forum/ui/MyCommentFragment;


# direct methods
.method public constructor <init>(Lcom/moji/forum/ui/MyCommentFragment;)V
    .locals 0

    .line 267
    iput-object p1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .line 271
    iget-object v0, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v0}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 0

    const/4 p1, 0x0

    return-object p1
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6

    if-nez p2, :cond_0

    .line 288
    new-instance p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;

    invoke-direct {p2}, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;-><init>()V

    .line 289
    iget-object p3, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-virtual {p3}, Lcom/moji/forum/ui/MyCommentFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object p3

    invoke-static {p3}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p3

    sget v0, Lcom/moji/forum/R$layout;->my_comment_list_item:I

    const/4 v1, 0x0

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

    move-result-object p3

    .line 290
    sget v0, Lcom/moji/forum/R$id;->topic_title:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->a:Landroid/widget/TextView;

    .line 291
    sget v0, Lcom/moji/forum/R$id;->reply_content:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->b:Landroid/widget/TextView;

    .line 292
    sget v0, Lcom/moji/forum/R$id;->last_comment_time:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->d:Landroid/widget/TextView;

    .line 293
    sget v0, Lcom/moji/forum/R$id;->item_layout:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->e:Landroid/widget/LinearLayout;

    .line 294
    sget v0, Lcom/moji/forum/R$id;->tag_name:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    .line 295
    sget v0, Lcom/moji/forum/R$id;->topic_owner:I

    invoke-virtual {p3, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->c:Landroid/widget/TextView;

    .line 296
    invoke-virtual {p3, p2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    goto :goto_0

    .line 298
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object p3

    check-cast p3, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;

    move-object v5, p3

    move-object p3, p2

    move-object p2, v5

    .line 301
    :goto_0
    iget-object v0, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v0}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v0, v0, Lcom/moji/http/mqn/entity/CommentList$Topic;->tag_name:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_1

    .line 302
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    const/4 v1, 0x0

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

    .line 303
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v1}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v1, v1, Lcom/moji/http/mqn/entity/CommentList$Topic;->tag_name:Ljava/lang/String;

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

    .line 304
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

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

    move-result-object v1

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

    .line 305
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

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

    .line 306
    iget-object v0, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v1}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v1, v1, Lcom/moji/http/mqn/entity/CommentList$Topic;->tag_colour:Ljava/lang/String;

    iget-object v2, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    invoke-virtual {v0, v1, v2}, Lcom/moji/forum/ui/MyCommentFragment;->a(Ljava/lang/String;Landroid/widget/TextView;)V

    goto :goto_1

    .line 308
    :cond_1
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->f:Landroid/widget/TextView;

    const/16 v1, 0x8

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

    .line 310
    :goto_1
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->e:Landroid/widget/LinearLayout;

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

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setTag(Ljava/lang/Object;)V

    .line 311
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->e:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

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

    .line 312
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->a:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget v2, Lcom/moji/forum/R$string;->comment_title:I

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

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, " "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v2}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v2, v2, Lcom/moji/http/mqn/entity/CommentList$Topic;->name:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/moji/tool/TextUtil;->a(Ljava/lang/String;)Landroid/text/SpannableString;

    move-result-object v1

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

    .line 313
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->a:Landroid/widget/TextView;

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

    .line 314
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->c:Landroid/widget/TextView;

    const/4 v1, 0x4

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

    .line 315
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->c:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v1}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v1, v1, Lcom/moji/http/mqn/entity/CommentList$Topic;->nick:Ljava/lang/String;

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

    .line 316
    iget-object v0, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v0}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v0, v0, Lcom/moji/http/mqn/entity/CommentList$Topic;->reply_nick:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_2

    .line 317
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->b:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget v2, Lcom/moji/forum/R$string;->reply:I

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

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget v2, Lcom/moji/forum/R$string;->floor_owner:I

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

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, ": "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    .line 318
    invoke-static {v2}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v2, v2, Lcom/moji/http/mqn/entity/CommentList$Topic;->content:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 317
    invoke-static {v1}, Lcom/moji/tool/TextUtil;->a(Ljava/lang/String;)Landroid/text/SpannableString;

    move-result-object v1

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

    goto/16 :goto_2

    .line 320
    :cond_2
    new-instance v0, Landroid/text/SpannableStringBuilder;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget v2, Lcom/moji/forum/R$string;->reply:I

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

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v2}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v2, v2, Lcom/moji/http/mqn/entity/CommentList$Topic;->reply_nick:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, ": "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V

    .line 322
    new-instance v1, Landroid/text/style/ForegroundColorSpan;

    sget v2, Lcom/moji/forum/R$color;->name_bule:I

    invoke-static {v2}, Lcom/moji/forum/common/ResUtil;->c(I)I

    move-result v2

    invoke-direct {v1, v2}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    sget v2, Lcom/moji/forum/R$string;->reply:I

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

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    sget v3, Lcom/moji/forum/R$string;->reply:I

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

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    iget-object v4, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v4}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v4, v4, Lcom/moji/http/mqn/entity/CommentList$Topic;->reply_nick:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v4

    add-int/2addr v3, v4

    const/16 v4, 0x21

    .line 322
    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    .line 324
    iget-object v1, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->b:Landroid/widget/TextView;

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

    .line 325
    iget-object v0, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->b:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v1}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-object v1, v1, Lcom/moji/http/mqn/entity/CommentList$Topic;->content:Ljava/lang/String;

    invoke-static {v1}, Lcom/moji/tool/TextUtil;->a(Ljava/lang/String;)Landroid/text/SpannableString;

    move-result-object v1

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

    .line 327
    :goto_2
    iget-object p2, p2, Lcom/moji/forum/ui/MyCommentFragment$ViewHolder;->d:Landroid/widget/TextView;

    new-instance v0, Ljava/util/Date;

    iget-object v1, p0, Lcom/moji/forum/ui/MyCommentFragment$MyCommentListAdapter;->a:Lcom/moji/forum/ui/MyCommentFragment;

    invoke-static {v1}, Lcom/moji/forum/ui/MyCommentFragment;->a(Lcom/moji/forum/ui/MyCommentFragment;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/moji/http/mqn/entity/CommentList$Topic;

    iget-wide v1, p1, Lcom/moji/http/mqn/entity/CommentList$Topic;->create_time:J

    invoke-direct {v0, v1, v2}, Ljava/util/Date;-><init>(J)V

    invoke-static {v0}, Lcom/moji/tool/DateFormatTool;->c(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p1

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

    return-object p3
.end method
