.class public Lcom/moji/mjweather/tabme/ToolGridAdapter;
.super Lcom/moji/forum/base/WrapAdapter;
.source "ToolGridAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;,
        Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/forum/base/WrapAdapter<",
        "Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;",
        ">;"
    }
.end annotation


# instance fields
.field private c:Lcom/moji/mjweather/tabme/TabMeFragment;

.field private d:I

.field private e:Z

.field private f:Lcom/moji/mjad/common/control/CommonAdControl;

.field private g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

.field private h:[I

.field private i:I

.field private j:I

.field private k:Z


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/tabme/TabMeFragment;Ljava/util/ArrayList;I)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/moji/mjweather/tabme/TabMeFragment;",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;",
            ">;I)V"
        }
    .end annotation

    const/4 v0, 0x0

    .line 70
    invoke-direct {p0, p1, p2, p3, v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;-><init>(Lcom/moji/mjweather/tabme/TabMeFragment;Ljava/util/ArrayList;ILcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;)V

    return-void
.end method

.method public constructor <init>(Lcom/moji/mjweather/tabme/TabMeFragment;Ljava/util/ArrayList;ILcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/moji/mjweather/tabme/TabMeFragment;",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;",
            ">;I",
            "Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;",
            ")V"
        }
    .end annotation

    .line 74
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

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

    const/4 p2, 0x5

    .line 51
    new-array p2, p2, [I

    fill-array-data p2, :array_0

    iput-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    const/4 p2, 0x0

    .line 266
    iput-boolean p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->k:Z

    .line 75
    iput p3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d:I

    .line 76
    iput-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->c:Lcom/moji/mjweather/tabme/TabMeFragment;

    .line 77
    iput-object p4, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    .line 78
    invoke-direct {p0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a()V

    return-void

    :array_0
    .array-data 4
        0x7f08052e
        0x7f08052f
        0x7f080530
        0x7f080531
        0x7f080532
    .end array-data
.end method

.method public constructor <init>(Lcom/moji/mjweather/tabme/TabMeFragment;Ljava/util/ArrayList;Z)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/moji/mjweather/tabme/TabMeFragment;",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;",
            ">;Z)V"
        }
    .end annotation

    .line 63
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

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

    const/4 p2, 0x5

    .line 51
    new-array p2, p2, [I

    fill-array-data p2, :array_0

    iput-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    const/4 p2, 0x0

    .line 266
    iput-boolean p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->k:Z

    .line 64
    iput-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->c:Lcom/moji/mjweather/tabme/TabMeFragment;

    .line 65
    iput-boolean p3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e:Z

    .line 66
    invoke-direct {p0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a()V

    return-void

    :array_0
    .array-data 4
        0x7f08052e
        0x7f08052f
        0x7f080530
        0x7f080531
        0x7f080532
    .end array-data
.end method

.method static synthetic a(Lcom/moji/mjweather/tabme/ToolGridAdapter;Lcom/moji/mjad/common/control/CommonAdControl;)Lcom/moji/mjad/common/control/CommonAdControl;
    .locals 0

    .line 37
    iput-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    return-object p1
.end method

.method static synthetic a(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    return-object p0
.end method

.method private a()V
    .locals 3

    .line 82
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 83
    invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I

    move-result v1

    int-to-float v1, v1

    const/high16 v2, 0x40400000    # 3.0f

    div-float/2addr v1, v2

    float-to-int v1, v1

    .line 84
    iput v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->i:I

    .line 85
    iget v1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->i:I

    int-to-float v1, v1

    const v2, 0x7f07015f

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v0

    sub-float/2addr v1, v0

    float-to-int v0, v1

    iput v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->j:I

    return-void
.end method

.method static synthetic b(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    return-object p0
.end method

.method private b(Landroid/widget/ImageView;Ljava/lang/String;I)V
    .locals 2

    .line 270
    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_2

    .line 271
    invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 272
    iget-boolean v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->k:Z

    if-eqz v0, :cond_0

    .line 273
    iget-object p3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {p3}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p3

    invoke-virtual {p3, p2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_0

    .line 275
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2, p3}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    :goto_0
    const/4 p1, 0x1

    .line 277
    iput-boolean p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->k:Z

    goto :goto_1

    .line 279
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2}, Lcom/squareup/picasso/RequestCreator;->f()Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    sget-object v0, Lcom/squareup/picasso/NetworkPolicy;->OFFLINE:Lcom/squareup/picasso/NetworkPolicy;

    const/4 v1, 0x0

    new-array v1, v1, [Lcom/squareup/picasso/NetworkPolicy;

    invoke-virtual {p2, v0, v1}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/NetworkPolicy;[Lcom/squareup/picasso/NetworkPolicy;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2, p3}, Lcom/squareup/picasso/RequestCreator;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_1

    .line 282
    :cond_2
    invoke-virtual {p1, p3}, Landroid/widget/ImageView;->setImageResource(I)V

    :goto_1
    return-void
.end method

.method static synthetic c(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Ljava/util/ArrayList;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    return-object p0
.end method

.method static synthetic d(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    return-object p0
.end method

.method static synthetic e(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjad/common/control/CommonAdControl;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    return-object p0
.end method

.method static synthetic f(Lcom/moji/mjweather/tabme/ToolGridAdapter;)Lcom/moji/mjweather/tabme/TabMeFragment;
    .locals 0

    .line 37
    iget-object p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->c:Lcom/moji/mjweather/tabme/TabMeFragment;

    return-object p0
.end method

.method static synthetic g(Lcom/moji/mjweather/tabme/ToolGridAdapter;)I
    .locals 0

    .line 37
    iget p0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d:I

    return p0
.end method


# virtual methods
.method public a(Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;Lcom/moji/mjad/common/control/CommonAdControl;)V
    .locals 1

    .line 241
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result v0

    if-lez v0, :cond_3

    if-eqz p1, :cond_1

    if-eqz p2, :cond_1

    .line 243
    iput-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    .line 244
    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result v0

    add-int/lit8 v0, v0, -0x1

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

    move-result-object p2

    check-cast p2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    iget p2, p2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->adIndex:I

    if-lez p2, :cond_0

    .line 245
    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result v0

    add-int/lit8 v0, v0, -0x1

    invoke-virtual {p2, v0, p1}, Ljava/util/ArrayList;->set(ILjava/lang/Object;)Ljava/lang/Object;

    goto :goto_0

    .line 247
    :cond_0
    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    invoke-virtual {p2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 251
    :cond_1
    iget-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result p2

    add-int/lit8 p2, p2, -0x1

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

    move-result-object p1

    check-cast p1, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    iget p1, p1, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->adIndex:I

    if-lez p1, :cond_2

    .line 252
    iget-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result p2

    add-int/lit8 p2, p2, -0x1

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

    .line 255
    :cond_2
    :goto_0
    invoke-virtual {p0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->notifyDataSetChanged()V

    :cond_3
    return-void
.end method

.method public a(Lcom/moji/mjad/common/control/CommonAdControl;)V
    .locals 0

    .line 236
    iput-object p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    return-void
.end method

.method public a(Z)V
    .locals 0

    .line 49
    iput-boolean p1, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e:Z

    return-void
.end method

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

    const v0, 0x7f090437

    const/4 v1, 0x0

    if-nez p2, :cond_0

    .line 93
    iget-object p2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

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

    move-result-object p2

    const v2, 0x7f0b02ba

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

    move-result-object p2

    .line 94
    new-instance p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;

    invoke-direct {p3}, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;-><init>()V

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

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    const v2, 0x7f090bc8

    .line 96
    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->b:Landroid/widget/TextView;

    const v2, 0x7f090038

    .line 97
    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

    const v2, 0x7f0904a1

    .line 98
    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->e:Landroid/view/View;

    .line 99
    new-instance v2, Lcom/moji/badge/BadgeView;

    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-direct {v2, v3}, Lcom/moji/badge/BadgeView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v1, v1, v1, v1}, Lcom/moji/badge/BadgeView;->a(IIII)Lcom/moji/badge/BadgeView;

    move-result-object v2

    const/4 v3, 0x2

    invoke-virtual {v2, v3}, Lcom/moji/badge/BadgeView;->a(I)Lcom/moji/badge/BadgeView;

    move-result-object v2

    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    invoke-virtual {v2, v3}, Lcom/moji/badge/BadgeView;->a(Landroid/view/View;)Lcom/moji/badge/BadgeView;

    move-result-object v2

    iput-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->d:Lcom/moji/badge/BadgeView;

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

    goto :goto_0

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

    move-result-object p3

    check-cast p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;

    .line 105
    :goto_0
    iget v2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d:I

    const/16 v3, 0xb

    if-eq v2, v3, :cond_4

    iget v2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->d:I

    const/16 v3, 0xc

    if-ne v2, v3, :cond_1

    goto :goto_3

    .line 108
    :cond_1
    iget-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->e:Landroid/view/View;

    invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V

    .line 109
    iget-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->e:Landroid/view/View;

    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/FrameLayout$LayoutParams;

    .line 110
    rem-int/lit8 v3, p1, 0x3

    const/4 v4, 0x1

    if-ne v3, v4, :cond_2

    .line 111
    iget v4, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->i:I

    goto :goto_1

    :cond_2
    iget v4, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->j:I

    :goto_1
    iput v4, v2, Landroid/widget/FrameLayout$LayoutParams;->width:I

    if-nez v3, :cond_3

    const/16 v3, 0x55

    goto :goto_2

    :cond_3
    const/16 v3, 0x53

    .line 112
    :goto_2
    iput v3, v2, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    .line 113
    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->e:Landroid/view/View;

    invoke-virtual {v3, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_4

    .line 106
    :cond_4
    :goto_3
    iget-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->e:Landroid/view/View;

    const/4 v3, 0x4

    invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V

    .line 116
    :goto_4
    iget-object v2, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->d:Lcom/moji/badge/BadgeView;

    invoke-virtual {v2}, Lcom/moji/badge/BadgeView;->b()V

    .line 118
    iget-object v2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b:Ljava/util/ArrayList;

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

    move-result-object v2

    check-cast v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    .line 119
    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->b:Landroid/widget/TextView;

    iget-object v4, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_name:Ljava/lang/String;

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

    .line 120
    invoke-virtual {p2, v0, v2}, Landroid/view/View;->setTag(ILjava/lang/Object;)V

    .line 122
    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

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

    .line 125
    iget-object v3, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    const v4, 0x7f080524

    if-eqz v3, :cond_8

    iget-object v3, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    iget-object v3, v3, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;->is_menu:Ljava/lang/String;

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

    move-result v3

    if-nez v3, :cond_8

    const-string v3, "1"

    iget-object v5, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_expand:Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;

    iget-object v5, v5, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$Expand;->is_menu:Ljava/lang/String;

    invoke-virtual {v3, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_8

    .line 126
    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    if-eqz v3, :cond_a

    .line 127
    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    invoke-interface {v3}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->a()Lcom/moji/mjad/common/control/CommonAdControl;

    move-result-object v3

    iput-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    .line 128
    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    invoke-interface {v3}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->b()Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    move-result-object v3

    if-eqz v3, :cond_6

    .line 129
    iget-object v2, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->g:Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;

    invoke-interface {v2}, Lcom/moji/mjweather/tabme/ToolGridAdapter$onAdCommonControlCallback;->b()Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;

    move-result-object v2

    .line 130
    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->b:Landroid/widget/TextView;

    iget-object v5, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->entrance_name:Ljava/lang/String;

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

    .line 131
    invoke-virtual {p2, v0, v2}, Landroid/view/View;->setTag(ILjava/lang/Object;)V

    .line 132
    iget-object v0, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->picture_path:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_5

    .line 133
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    const v3, 0x7f0807a5

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_5

    .line 135
    :cond_5
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    iget-object v3, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->picture_path:Ljava/lang/String;

    invoke-direct {p0, v0, v3, v4}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->b(Landroid/widget/ImageView;Ljava/lang/String;I)V

    goto :goto_5

    .line 138
    :cond_6
    iget-boolean v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e:Z

    if-eqz v0, :cond_7

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    array-length v0, v0

    if-ge p1, v0, :cond_7

    .line 139
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    aget v3, v3, p1

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_5

    .line 141
    :cond_7
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    iget-object v3, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->picture_path:Ljava/lang/String;

    invoke-virtual {p0, v0, v3, v4}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a(Landroid/widget/ImageView;Ljava/lang/String;I)V

    goto :goto_5

    .line 147
    :cond_8
    iget-boolean v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->e:Z

    if-eqz v0, :cond_9

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    array-length v0, v0

    if-ge p1, v0, :cond_9

    .line 148
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a:Landroid/content/Context;

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    iget-object v3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->h:[I

    aget v3, v3, p1

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    iget-object v3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v3}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_5

    .line 150
    :cond_9
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->a:Landroid/widget/ImageView;

    iget-object v3, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->picture_path:Ljava/lang/String;

    invoke-virtual {p0, v0, v3, v4}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a(Landroid/widget/ImageView;Ljava/lang/String;I)V

    .line 154
    :cond_a
    :goto_5
    iget v0, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->adIndex:I

    const/16 v3, 0x8

    if-lez v0, :cond_e

    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    if-eqz v0, :cond_e

    .line 155
    iget v0, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->adIndex:I

    const/16 v2, 0x5a

    if-le v0, v2, :cond_b

    .line 156
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

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

    .line 157
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object v0

    const v1, 0x7f0807a6

    invoke-virtual {v0, v1}, Lcom/squareup/picasso/Picasso;->a(I)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->b()Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    iget-object v1, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    goto :goto_6

    .line 159
    :cond_b
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

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

    .line 161
    :goto_6
    iget-object v0, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {v0}, Lcom/moji/mjad/common/control/CommonAdControl;->getAdInfo()Lcom/moji/mjad/base/data/MojiClickData;

    move-result-object v0

    check-cast v0, Lcom/moji/mjad/common/data/AdCommon;

    iget-object v0, v0, Lcom/moji/mjad/common/data/AdCommon;->position:Lcom/moji/mjad/enumdata/MojiAdPosition;

    .line 162
    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_MY_PAGE_DYNAMIC_MENU:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-ne v0, v1, :cond_c

    .line 163
    iget-object p3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->d:Lcom/moji/badge/BadgeView;

    sget-object v0, Lcom/moji/badge/BadgeEvent$TYPE;->MESSAGE_NUM_AD:Lcom/moji/badge/BadgeEvent$TYPE;

    invoke-virtual {p3, v0}, Lcom/moji/badge/BadgeView;->a(Lcom/moji/badge/BadgeEvent$TYPE;)Z

    goto :goto_7

    .line 164
    :cond_c
    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdPosition;->POS_MY_PAGE_DYNAMIC_MENU_TWO:Lcom/moji/mjad/enumdata/MojiAdPosition;

    if-ne v0, v1, :cond_d

    .line 165
    iget-object p3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->d:Lcom/moji/badge/BadgeView;

    sget-object v0, Lcom/moji/badge/BadgeEvent$TYPE;->MESSAGE_NUM_AD_TWO:Lcom/moji/badge/BadgeEvent$TYPE;

    invoke-virtual {p3, v0}, Lcom/moji/badge/BadgeView;->a(Lcom/moji/badge/BadgeEvent$TYPE;)Z

    .line 167
    :cond_d
    :goto_7
    iget-object p3, p0, Lcom/moji/mjweather/tabme/ToolGridAdapter;->f:Lcom/moji/mjad/common/control/CommonAdControl;

    invoke-virtual {p3, p2}, Lcom/moji/mjad/common/control/CommonAdControl;->recordShow(Landroid/view/View;)V

    goto :goto_8

    .line 169
    :cond_e
    iget-object v0, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->corner_picture_path:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_f

    .line 170
    iget-object v0, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

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

    .line 171
    iget-object p3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

    iget-object v0, v2, Lcom/moji/http/me/MeServiceEntity$EntranceRegionResListBean$EntranceResListBean;->corner_picture_path:Ljava/lang/String;

    invoke-virtual {p0, p3, v0}, Lcom/moji/mjweather/tabme/ToolGridAdapter;->a(Landroid/widget/ImageView;Ljava/lang/String;)V

    goto :goto_8

    .line 173
    :cond_f
    iget-object p3, p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$ViewHolder;->c:Landroid/widget/ImageView;

    invoke-virtual {p3, v3}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 177
    :goto_8
    new-instance p3, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;

    invoke-direct {p3, p0, p1}, Lcom/moji/mjweather/tabme/ToolGridAdapter$1;-><init>(Lcom/moji/mjweather/tabme/ToolGridAdapter;I)V

    invoke-virtual {p2, p3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-object p2
.end method
