.class public Lcom/moji/forum/ui/CoterieSelectAdapter;
.super Lcom/moji/forum/base/WrapAdapter;
.source "CoterieSelectAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/forum/ui/CoterieSelectAdapter$ViewHolder;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/forum/base/WrapAdapter<",
        "Lcom/moji/http/mqn/entity/Coterie;",
        ">;"
    }
.end annotation


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/mqn/entity/Coterie;",
            ">;)V"
        }
    .end annotation

    .line 21
    invoke-direct {p0, p1, p2}, Lcom/moji/forum/base/WrapAdapter;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    return-void
.end method


# virtual methods
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 2

    if-nez p2, :cond_0

    .line 28
    iget-object p2, p0, Lcom/moji/forum/ui/CoterieSelectAdapter;->a:Landroid/content/Context;

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

    move-result-object p2

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

    const/4 v1, 0x0

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

    move-result-object p2

    .line 30
    new-instance p3, Lcom/moji/forum/ui/CoterieSelectAdapter$ViewHolder;

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

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

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

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p3, Lcom/moji/forum/ui/CoterieSelectAdapter$ViewHolder;->a:Landroid/widget/ImageView;

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

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

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

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

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

    goto :goto_0

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

    move-result-object p3

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

    .line 38
    :goto_0
    iget-object v0, p3, Lcom/moji/forum/ui/CoterieSelectAdapter$ViewHolder;->b:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/forum/ui/CoterieSelectAdapter;->b:Ljava/util/ArrayList;

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

    move-result-object v1

    check-cast v1, Lcom/moji/http/mqn/entity/Coterie;

    iget-object v1, v1, Lcom/moji/http/mqn/entity/Coterie;->desc:Ljava/lang/String;

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

    .line 39
    iget-object p3, p3, Lcom/moji/forum/ui/CoterieSelectAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/moji/forum/ui/CoterieSelectAdapter;->b:Ljava/util/ArrayList;

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

    move-result-object p1

    check-cast p1, Lcom/moji/http/mqn/entity/Coterie;

    iget-object p1, p1, Lcom/moji/http/mqn/entity/Coterie;->icon:Ljava/lang/String;

    invoke-virtual {p0, p3, p1}, Lcom/moji/forum/ui/CoterieSelectAdapter;->a(Landroid/widget/ImageView;Ljava/lang/String;)V

    return-object p2
.end method
