.class public Lcom/vv/hgtv/j;
.super Landroid/widget/BaseAdapter;


# static fields
.field public static a:F


# instance fields
.field private b:I

.field private c:Landroid/content/Context;

.field private d:Ljava/util/ArrayList;


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

    const/high16 v0, 0x41a00000    # 20.0f

    sput v0, Lcom/vv/hgtv/j;->a:F

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;I)V
    .locals 1

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

    const/4 v0, 0x0

    iput v0, p0, Lcom/vv/hgtv/j;->b:I

    iput-object p1, p0, Lcom/vv/hgtv/j;->c:Landroid/content/Context;

    iput-object p2, p0, Lcom/vv/hgtv/j;->d:Ljava/util/ArrayList;

    iput p3, p0, Lcom/vv/hgtv/j;->b:I

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/vv/hgtv/j;->d:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lcom/vv/hgtv/j;->notifyDataSetChanged()V

    return-void
.end method

.method public a(I)V
    .locals 0

    iput p1, p0, Lcom/vv/hgtv/j;->b:I

    invoke-virtual {p0}, Lcom/vv/hgtv/j;->notifyDataSetChanged()V

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/vv/hgtv/j;->d:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/vv/hgtv/j;->d:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    goto :goto_0
.end method

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

    iget-object v0, p0, Lcom/vv/hgtv/j;->d:Ljava/util/ArrayList;

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

    move-result-object v0

    return-object v0
.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 7

    const/16 v6, 0x99

    const/4 v5, 0x0

    if-nez p2, :cond_2

    new-instance v1, Lcom/vv/hgtv/k;

    invoke-direct {v1, p0}, Lcom/vv/hgtv/k;-><init>(Lcom/vv/hgtv/j;)V

    iget-object v0, p0, Lcom/vv/hgtv/j;->c:Landroid/content/Context;

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

    move-result-object v0

    const v2, 0x7f030004

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

    move-result-object p2

    const v0, 0x7f07001d

    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, v1, Lcom/vv/hgtv/k;->b:Landroid/widget/TextView;

    const v0, 0x7f07001c

    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, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

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

    :goto_0
    invoke-virtual {p0, p1}, Lcom/vv/hgtv/j;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/vv/hgtv/d;

    iget-object v2, v1, Lcom/vv/hgtv/k;->b:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    iget v4, v0, Lcom/vv/hgtv/d;->a:I

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

    move-result-object v4

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

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

    move-result-object v3

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

    iget-object v2, v1, Lcom/vv/hgtv/k;->b:Landroid/widget/TextView;

    sget v3, Lcom/vv/hgtv/j;->a:F

    invoke-virtual {v2, v5, v3}, Landroid/widget/TextView;->setTextSize(IF)V

    iget-object v2, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/vv/hgtv/d;->b:Ljava/lang/String;

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

    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    sget v2, Lcom/vv/hgtv/j;->a:F

    invoke-virtual {v0, v5, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    sget-object v0, Lcom/vv/hgtv/PlayerActivity;->d:Lcom/vv/hgtv/e;

    sget v2, Lcom/vv/hgtv/PlayerActivity;->e:I

    invoke-virtual {v0, v2, p1}, Lcom/vv/hgtv/e;->a(II)Z

    move-result v0

    if-eqz v0, :cond_3

    :try_start_0
    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    const/4 v2, 0x0

    const/4 v3, 0x0

    sget-object v4, Lcom/vv/hgtv/PlayerActivity;->a:Landroid/content/Context;

    const v5, 0x7f02000e

    invoke-static {v4, v5}, La/a/a/a/a;->a(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    const/4 v5, 0x0

    invoke-virtual {v0, v2, v3, v4, v5}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    :goto_1
    sget v0, Lcom/vv/hgtv/PlayerActivity;->b:I

    sget v2, Lcom/vv/hgtv/PlayerActivity;->e:I

    if-ne v0, v2, :cond_1

    sget v0, Lcom/vv/hgtv/PlayerActivity;->h:I

    if-eq p1, v0, :cond_0

    iget v0, p0, Lcom/vv/hgtv/j;->b:I

    if-ne p1, v0, :cond_4

    :cond_0
    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    const/4 v2, -0x1

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

    :cond_1
    :goto_2
    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    sget v2, Lcom/vv/hgtv/PlayerActivity;->j:I

    iput v2, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    iget-object v1, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    return-object p2

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

    move-result-object v0

    check-cast v0, Lcom/vv/hgtv/k;

    move-object v1, v0

    goto :goto_0

    :cond_3
    :try_start_1
    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual {v0, v2, v3, v4, v5}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    goto :goto_1

    :cond_4
    iget-object v0, v1, Lcom/vv/hgtv/k;->a:Landroid/widget/TextView;

    const/16 v2, 0xff

    invoke-static {v2, v6, v6, v6}, Landroid/graphics/Color;->argb(IIII)I

    move-result v2

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

    goto :goto_2

    :catch_1
    move-exception v0

    goto :goto_1
.end method
