.class public Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;
.super Lcom/moji/mjappstore/BaseFragmentActivity;
.source "AppStoreClassifyActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ViewHolder;,
        Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;
    }
.end annotation


# static fields
.field private static final a:Ljava/lang/String; = "AppStoreClassifyActivity"


# instance fields
.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/http/appmoji001/data/AppClassifyInfoResult$AppClassifyInfo;",
            ">;"
        }
    .end annotation
.end field

.field private c:Z

.field private i:Landroid/widget/LinearLayout;

.field private j:Landroid/widget/LinearLayout;

.field private k:Landroid/widget/ListView;

.field private l:Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;

.field private m:I


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

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 30
    invoke-direct {p0}, Lcom/moji/mjappstore/BaseFragmentActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;)Landroid/widget/LinearLayout;
    .locals 0

    .line 30
    iget-object p0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->i:Landroid/widget/LinearLayout;

    return-object p0
.end method

.method static synthetic a(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;)Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;
    .locals 0

    .line 30
    iput-object p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->l:Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;

    return-object p1
.end method

.method static synthetic a(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;Ljava/util/List;)Ljava/util/List;
    .locals 0

    .line 30
    iput-object p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->b:Ljava/util/List;

    return-object p1
.end method

.method static synthetic a(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;Z)Z
    .locals 0

    .line 30
    iput-boolean p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->c:Z

    return p1
.end method

.method static synthetic b(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;)Landroid/widget/LinearLayout;
    .locals 0

    .line 30
    iget-object p0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j:Landroid/widget/LinearLayout;

    return-object p0
.end method

.method static synthetic c(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;)Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;
    .locals 0

    .line 30
    iget-object p0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->l:Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$ListViewAdapter;

    return-object p0
.end method

.method static synthetic d(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;)Landroid/widget/ListView;
    .locals 0

    .line 30
    iget-object p0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    return-object p0
.end method

.method private j()V
    .locals 3

    const/4 v0, 0x1

    .line 104
    iput-boolean v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->c:Z

    .line 105
    new-instance v0, Lcom/moji/http/appmoji001/GetClassifyAppInfoRequest;

    iget v1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->m:I

    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->g()I

    move-result v2

    invoke-direct {v0, v1, v2}, Lcom/moji/http/appmoji001/GetClassifyAppInfoRequest;-><init>(II)V

    new-instance v1, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$1;

    invoke-direct {v1, p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity$1;-><init>(Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;)V

    invoke-virtual {v0, v1}, Lcom/moji/http/appmoji001/GetClassifyAppInfoRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method


# virtual methods
.method protected a()V
    .locals 3

    .line 50
    invoke-virtual {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "requestId"

    const/4 v2, -0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->m:I

    return-void
.end method

.method protected a(Landroid/widget/TextView;Ljava/lang/String;)V
    .locals 3

    .line 179
    invoke-static {p2}, Lcom/moji/tool/Utils;->a(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 183
    :try_start_0
    invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    const/16 v1, 0x2710

    if-lt v0, v1, :cond_0

    .line 185
    div-int/2addr v0, v1

    int-to-float p2, v0

    if-eqz p1, :cond_1

    .line 189
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/moji/mjappstore/R$string;->appstore_classify_num_left:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

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

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    const-string p2, "\u4e07"

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

    invoke-virtual {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object p2

    sget v1, Lcom/moji/mjappstore/R$string;->appstore_classify_num_right:I

    invoke-virtual {p2, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object p2

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

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

    move-result-object p2

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

    goto :goto_0

    :cond_0
    if-eqz p1, :cond_1

    .line 193
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/moji/mjappstore/R$string;->appstore_classify_num_left:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

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

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

    invoke-virtual {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object p2

    sget v1, Lcom/moji/mjappstore/R$string;->appstore_classify_num_right:I

    invoke-virtual {p2, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object p2

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

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

    move-result-object p2

    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p2

    .line 198
    sget-object v0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->a:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "e"

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

    invoke-virtual {p2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object p2

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

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

    move-result-object p2

    invoke-static {v0, p2}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V

    :cond_1
    :goto_0
    if-eqz p1, :cond_2

    const/4 p2, 0x0

    .line 202
    invoke-virtual {p1, p2}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_2
    return-void
.end method

.method protected b()V
    .locals 1

    .line 78
    sget v0, Lcom/moji/mjappstore/R$layout;->activity_appstore_classify:I

    invoke-virtual {p0, v0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->setContentView(I)V

    return-void
.end method

.method protected c()V
    .locals 2

    .line 68
    sget v0, Lcom/moji/mjappstore/R$id;->ll_classify_listview:I

    invoke-virtual {p0, v0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    .line 69
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    const/4 v1, 0x0

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

    .line 70
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    const/4 v1, -0x1

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

    .line 71
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    sget v1, Lcom/moji/mjappstore/R$color;->transparent:I

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

    .line 72
    sget v0, Lcom/moji/mjappstore/R$id;->layout_load:I

    invoke-virtual {p0, v0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->i:Landroid/widget/LinearLayout;

    .line 73
    sget v0, Lcom/moji/mjappstore/R$id;->layout_appstore_refresh:I

    invoke-virtual {p0, v0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j:Landroid/widget/LinearLayout;

    return-void
.end method

.method protected d()V
    .locals 2

    .line 56
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->i:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

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

    .line 57
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j:Landroid/widget/LinearLayout;

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

    .line 58
    iget-object v0, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->k:Landroid/widget/ListView;

    invoke-virtual {v0, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method

.method protected e()V
    .locals 0

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    .line 82
    invoke-static {}, Lcom/moji/mjappstore/engine/AppUtil;->a()Z

    move-result p1

    if-nez p1, :cond_0

    return-void

    .line 85
    :cond_0
    iget-object p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j:Landroid/widget/LinearLayout;

    const/16 v0, 0x8

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

    .line 86
    iget-object p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->i:Landroid/widget/LinearLayout;

    const/4 v0, 0x0

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

    .line 87
    iget-boolean p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->c:Z

    if-eqz p1, :cond_1

    return-void

    .line 90
    :cond_1
    invoke-direct {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j()V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 44
    invoke-super {p0, p1}, Lcom/moji/mjappstore/BaseFragmentActivity;->onCreate(Landroid/os/Bundle;)V

    .line 45
    invoke-direct {p0}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->j()V

    return-void
.end method

.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView<",
            "*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .line 96
    iget-object p1, p0, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->b:Ljava/util/List;

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

    move-result-object p1

    check-cast p1, Lcom/moji/http/appmoji001/data/AppClassifyInfoResult$AppClassifyInfo;

    .line 97
    new-instance p2, Landroid/content/Intent;

    const-class p3, Lcom/moji/mjappstore/activity/AppStorePictureAdActivity;

    invoke-direct {p2, p0, p3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string p3, "requestId"

    .line 98
    invoke-virtual {p1}, Lcom/moji/http/appmoji001/data/AppClassifyInfoResult$AppClassifyInfo;->getCategory()I

    move-result p4

    invoke-virtual {p2, p3, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string p3, "requestName"

    .line 99
    invoke-virtual {p1}, Lcom/moji/http/appmoji001/data/AppClassifyInfoResult$AppClassifyInfo;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p3, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 100
    invoke-virtual {p0, p2}, Lcom/moji/mjappstore/activity/AppStoreClassifyActivity;->startActivity(Landroid/content/Intent;)V

    return-void
.end method
