.class public Lcom/moji/mjallergy/MJAllergyMainActivity;
.super Lcom/moji/base/MJActivity;
.source "MJAllergyMainActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Lcom/moji/base/MJPresenter$ICallback;
.implements Lcom/moji/mjallergy/presenter/AllergyMainPresenter$MainCallback;


# annotations
.annotation build Lcom/moji/router/annotation/Router;
.end annotation


# static fields
.field public static mCityId:J

.field private static final o:I


# instance fields
.field private a:Landroid/widget/LinearLayout;

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/viewcontrol/MJViewControl;",
            ">;"
        }
    .end annotation
.end field

.field private c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

.field private i:Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

.field private j:Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

.field private k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

.field private l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

.field private m:Lcom/moji/titlebar/MJTitleBar;

.field private n:Landroid/widget/LinearLayout;

.field private p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

.field private q:Lcom/moji/mjallergy/presenter/AllergyMainPresenter;

.field private r:Lcom/moji/scrollview/ScrollViewWithListener;


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

    const/high16 v0, 0x42480000    # 50.0f

    .line 75
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v0

    sput v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->o:I

    const-wide/16 v0, 0x0

    .line 78
    sput-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    return-void
.end method

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

    .line 63
    invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V

    .line 67
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    return-void
.end method

.method private a()V
    .locals 8

    .line 158
    invoke-static {}, Lcom/moji/tool/Utils;->b()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 161
    :cond_0
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;->getData()Ljava/lang/Object;

    move-result-object v0

    if-nez v0, :cond_1

    .line 162
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$string;->share_content_failed:I

    const/4 v1, 0x0

    invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    return-void

    .line 165
    :cond_1
    new-instance v5, Lcom/moji/share/MJThirdShareManager;

    const/4 v0, 0x0

    invoke-direct {v5, p0, v0}, Lcom/moji/share/MJThirdShareManager;-><init>(Landroid/app/Activity;Lcom/moji/share/listener/ShareListener;)V

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

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

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

    move-result-object v1

    const-string v2, "share"

    invoke-static {v1, v2}, Lcom/moji/tool/FileTool;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;

    move-result-object v1

    invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

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

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

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

    const-string v1, "Allergy.png"

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

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

    move-result-object v6

    .line 167
    new-instance v0, Lcom/moji/share/entity/ShareContentConfig$Builder;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;->getData()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/http/allergy/bean/AllergyMainBean;

    iget-object v1, v1, Lcom/moji/http/allergy/bean/AllergyMainBean;->mDescription:Ljava/lang/String;

    iget-object v2, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-virtual {v2}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;->getData()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/moji/http/allergy/bean/AllergyMainBean;

    iget-object v2, v2, Lcom/moji/http/allergy/bean/AllergyMainBean;->mDescription:Ljava/lang/String;

    invoke-direct {v0, v1, v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v6}, Lcom/moji/share/entity/ShareContentConfig$Builder;->c(Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->WX_TIMELINE:Lcom/moji/share/entity/ShareChannelType;

    sget-object v2, Lcom/moji/share/entity/ShareContentType;->PIC:Lcom/moji/share/entity/ShareContentType;

    .line 168
    invoke-virtual {v0, v1, v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->QQ:Lcom/moji/share/entity/ShareChannelType;

    sget-object v2, Lcom/moji/share/entity/ShareContentType;->PIC:Lcom/moji/share/entity/ShareContentType;

    invoke-virtual {v0, v1, v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->WB:Lcom/moji/share/entity/ShareChannelType;

    sget-object v2, Lcom/moji/share/entity/ShareContentType;->PIC:Lcom/moji/share/entity/ShareContentType;

    .line 169
    invoke-virtual {v0, v1, v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->WX_FRIEND:Lcom/moji/share/entity/ShareChannelType;

    sget-object v2, Lcom/moji/share/entity/ShareContentType;->PIC:Lcom/moji/share/entity/ShareContentType;

    invoke-virtual {v0, v1, v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->MESSAGE:Lcom/moji/share/entity/ShareChannelType;

    .line 170
    invoke-virtual {v0, v1}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a()Lcom/moji/share/entity/ShareContentConfig;

    move-result-object v0

    .line 171
    sget-object v1, Lcom/moji/share/entity/ShareFromType;->Allergy:Lcom/moji/share/entity/ShareFromType;

    const/4 v2, 0x1

    invoke-virtual {v5, v1, v0, v2}, Lcom/moji/share/MJThirdShareManager;->a(Lcom/moji/share/entity/ShareFromType;Lcom/moji/share/entity/ShareContentConfig;Z)V

    .line 172
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

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

    move-result v1

    iget-object v3, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getHeight()I

    move-result v3

    invoke-static {v0, v1, v3, v2}, Lcom/moji/share/ShareImageManager;->b(Landroid/view/View;IIZ)Landroid/graphics/Bitmap;

    move-result-object v4

    .line 173
    invoke-static {}, Lcom/moji/tool/thread/MJThreadManager;->a()Lcom/moji/tool/thread/MJThreadManager;

    move-result-object v0

    new-instance v7, Lcom/moji/mjallergy/MJAllergyMainActivity$4;

    sget-object v3, Lcom/moji/tool/thread/ThreadPriority;->NORMAL:Lcom/moji/tool/thread/ThreadPriority;

    move-object v1, v7

    move-object v2, p0

    invoke-direct/range {v1 .. v6}, Lcom/moji/mjallergy/MJAllergyMainActivity$4;-><init>(Lcom/moji/mjallergy/MJAllergyMainActivity;Lcom/moji/tool/thread/ThreadPriority;Landroid/graphics/Bitmap;Lcom/moji/share/MJThirdShareManager;Ljava/lang/String;)V

    sget-object v1, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;

    invoke-virtual {v0, v7, v1}, Lcom/moji/tool/thread/MJThreadManager;->a(Lcom/moji/tool/thread/wrapper/MJRunnable;Lcom/moji/tool/thread/ThreadType;)V

    return-void
.end method

.method private a(J)V
    .locals 3

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-eqz v2, :cond_0

    .line 215
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->q:Lcom/moji/mjallergy/presenter/AllergyMainPresenter;

    invoke-virtual {v0, p1, p2}, Lcom/moji/mjallergy/presenter/AllergyMainPresenter;->a(J)V

    goto :goto_0

    .line 219
    :cond_0
    :try_start_0
    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->b()Lcom/moji/common/area/AreaInfo;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 221
    invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;

    move-result-object p1

    .line 222
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(Lcom/moji/weatherprovider/data/Weather;)V

    goto :goto_0

    .line 224
    :cond_1
    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;

    move-result-object p1

    if-eqz p1, :cond_2

    .line 226
    invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;

    move-result-object p2

    invoke-virtual {p2, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;

    move-result-object p1

    .line 227
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(Lcom/moji/weatherprovider/data/Weather;)V

    goto :goto_0

    .line 229
    :cond_2
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->C()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 233
    iget-object p2, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p2}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->C()V

    const-string p2, "MJAllergyMainActivity"

    .line 234
    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_0
    return-void
.end method

.method private a(Landroid/os/Bundle;)V
    .locals 3

    .line 96
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->status_layout:I

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

    move-result-object v0

    check-cast v0, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    .line 97
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->allergy_title_bar1:I

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

    move-result-object v0

    check-cast v0, Lcom/moji/titlebar/MJTitleBar;

    .line 98
    sget v1, Lpad/aqi/cnemc/com/mjallergymodule/R$string;->allergy_main_title:I

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(I)V

    .line 99
    sget v1, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->allergy_title_bar2:I

    invoke-virtual {p0, v1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/moji/titlebar/MJTitleBar;

    iput-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    .line 100
    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    sget v2, Lpad/aqi/cnemc/com/mjallergymodule/R$string;->allergy_main_title:I

    invoke-virtual {v1, v2}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(I)V

    .line 101
    new-instance v1, Lcom/moji/mjallergy/MJAllergyMainActivity$1;

    sget v2, Lpad/aqi/cnemc/com/mjallergymodule/R$drawable;->share_white:I

    invoke-direct {v1, p0, v2}, Lcom/moji/mjallergy/MJAllergyMainActivity$1;-><init>(Lcom/moji/mjallergy/MJAllergyMainActivity;I)V

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(Lcom/moji/titlebar/MJTitleBar$Action;)Landroid/view/View;

    .line 108
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    new-instance v1, Lcom/moji/mjallergy/MJAllergyMainActivity$2;

    sget v2, Lpad/aqi/cnemc/com/mjallergymodule/R$drawable;->share_black:I

    invoke-direct {v1, p0, v2}, Lcom/moji/mjallergy/MJAllergyMainActivity$2;-><init>(Lcom/moji/mjallergy/MJAllergyMainActivity;I)V

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(Lcom/moji/titlebar/MJTitleBar$Action;)Landroid/view/View;

    .line 115
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->ll_container:I

    invoke-virtual {p0, v0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->a:Landroid/widget/LinearLayout;

    .line 116
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->ll_share_container:I

    invoke-virtual {p0, v0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

    .line 117
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$id;->allergy_scroller_container:I

    invoke-virtual {p0, v0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/scrollview/ScrollViewWithListener;

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->r:Lcom/moji/scrollview/ScrollViewWithListener;

    .line 118
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->r:Lcom/moji/scrollview/ScrollViewWithListener;

    new-instance v1, Lcom/moji/mjallergy/MJAllergyMainActivity$3;

    invoke-direct {v1, p0}, Lcom/moji/mjallergy/MJAllergyMainActivity$3;-><init>(Lcom/moji/mjallergy/MJAllergyMainActivity;)V

    invoke-virtual {v0, v1}, Lcom/moji/scrollview/ScrollViewWithListener;->setOnScrollListener(Lcom/moji/scrollview/ScrollViewWithListener$OnScrollListener;)V

    .line 124
    new-instance v0, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    .line 125
    new-instance v0, Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->i:Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

    .line 126
    new-instance v0, Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->j:Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

    .line 127
    new-instance v0, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    .line 128
    new-instance v0, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    .line 130
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 131
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->i:Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 132
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->j:Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 133
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 134
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 136
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;->createView()Landroid/view/View;

    move-result-object v1

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

    .line 137
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->n:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->i:Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;->createView()Landroid/view/View;

    move-result-object v1

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

    .line 138
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->a:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->j:Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;->createView()Landroid/view/View;

    move-result-object v1

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

    .line 139
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->a:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->createView()Landroid/view/View;

    move-result-object v1

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

    .line 140
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->a:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-virtual {v1}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;->createView()Landroid/view/View;

    move-result-object v1

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

    .line 142
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->a(Landroid/os/Bundle;)V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjallergy/MJAllergyMainActivity;)V
    .locals 0

    .line 63
    invoke-direct {p0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a()V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjallergy/MJAllergyMainActivity;I)V
    .locals 0

    .line 63
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->b(I)V

    return-void
.end method

.method private a(Lcom/moji/weatherprovider/data/Weather;)V
    .locals 5

    if-eqz p1, :cond_1

    .line 240
    iget-object v0, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    if-eqz v0, :cond_1

    .line 241
    iget-object v0, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-wide v0, v0, Lcom/moji/weatherprovider/data/Detail;->pCityId:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-eqz v4, :cond_0

    .line 242
    iget-object p1, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-wide v0, p1, Lcom/moji/weatherprovider/data/Detail;->pCityId:J

    sput-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    goto :goto_0

    .line 244
    :cond_0
    iget-object p1, p1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;

    iget-wide v0, p1, Lcom/moji/weatherprovider/data/Detail;->mCityId:J

    sput-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    .line 246
    :goto_0
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->q:Lcom/moji/mjallergy/presenter/AllergyMainPresenter;

    sget-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    invoke-virtual {p1, v0, v1}, Lcom/moji/mjallergy/presenter/AllergyMainPresenter;->a(J)V

    :cond_1
    return-void
.end method

.method private b()V
    .locals 5

    .line 188
    new-instance v0, Lcom/moji/mjallergy/presenter/AllergyMainPresenter;

    invoke-direct {v0, p0}, Lcom/moji/mjallergy/presenter/AllergyMainPresenter;-><init>(Lcom/moji/mjallergy/presenter/AllergyMainPresenter$MainCallback;)V

    iput-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->q:Lcom/moji/mjallergy/presenter/AllergyMainPresenter;

    .line 189
    invoke-virtual {p0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "city_id"

    const/4 v2, 0x0

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

    move-result v0

    int-to-long v0, v0

    sput-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    .line 191
    sget-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_0

    .line 193
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->ALLERGY_LIST_SHOW:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "0"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

    .line 196
    :cond_0
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->ALLERGY_LIST_SHOW:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "1"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    .line 198
    :goto_0
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0, p0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->setOnRetryClickListener(Landroid/view/View$OnClickListener;)V

    .line 199
    invoke-direct {p0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->c()V

    return-void
.end method

.method private b(I)V
    .locals 2

    if-gtz p1, :cond_0

    .line 147
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    const/16 v0, 0x8

    invoke-virtual {p1, v0}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    goto :goto_0

    .line 148
    :cond_0
    sget v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->o:I

    const/4 v1, 0x0

    if-le p1, v0, :cond_1

    .line 149
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {p1, v1}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    .line 150
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    const/high16 v0, 0x3f800000    # 1.0f

    invoke-virtual {p1, v0}, Lcom/moji/titlebar/MJTitleBar;->setAlpha(F)V

    goto :goto_0

    .line 152
    :cond_1
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    .line 153
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    int-to-float p1, p1

    sget v1, Lcom/moji/mjallergy/MJAllergyMainActivity;->o:I

    int-to-float v1, v1

    div-float/2addr p1, v1

    invoke-virtual {v0, p1}, Lcom/moji/titlebar/MJTitleBar;->setAlpha(F)V

    :goto_0
    return-void
.end method

.method private c()V
    .locals 2

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

    move-result v0

    if-eqz v0, :cond_0

    .line 204
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->F()V

    .line 205
    sget-wide v0, Lcom/moji/mjallergy/MJAllergyMainActivity;->mCityId:J

    invoke-direct {p0, v0, v1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(J)V

    goto :goto_0

    .line 207
    :cond_0
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0, p0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->b(Landroid/view/View$OnClickListener;)V

    .line 208
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    .line 209
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    const/high16 v1, 0x3f800000    # 1.0f

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setAlpha(F)V

    :goto_0
    return-void
.end method


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

    .line 310
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;->hideView()V

    return-void
.end method

.method public onArticleSuccess(Lcom/moji/http/allergy/bean/AllergyArticleBean;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 300
    invoke-virtual {p1}, Lcom/moji/http/allergy/bean/AllergyArticleBean;->getCode()I

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p1, Lcom/moji/http/allergy/bean/AllergyArticleBean;->article_list:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    iget-object v0, p1, Lcom/moji/http/allergy/bean/AllergyArticleBean;->article_list:Ljava/util/ArrayList;

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

    move-result v0

    if-lez v0, :cond_0

    .line 301
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;->showView()V

    .line 302
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;->fillData(Ljava/lang/Object;)V

    goto :goto_0

    .line 304
    :cond_0
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->l:Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;

    invoke-virtual {p1}, Lcom/moji/mjallergy/viewcontrol/AllergyArticleView;->hideView()V

    :goto_0
    return-void
.end method

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

    .line 315
    invoke-direct {p0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->c()V

    return-void
.end method

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

    .line 83
    invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V

    .line 84
    sget v0, Lpad/aqi/cnemc/com/mjallergymodule/R$layout;->activity_allergy_main:I

    invoke-virtual {p0, v0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->setContentView(I)V

    .line 85
    invoke-direct {p0, p1}, Lcom/moji/mjallergy/MJAllergyMainActivity;->a(Landroid/os/Bundle;)V

    .line 86
    invoke-direct {p0}, Lcom/moji/mjallergy/MJAllergyMainActivity;->b()V

    return-void
.end method

.method protected onDestroy()V
    .locals 2

    .line 265
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V

    .line 266
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->a:Landroid/widget/LinearLayout;

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

    .line 267
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/viewcontrol/IViewControl;

    .line 268
    invoke-interface {v1}, Lcom/moji/viewcontrol/IViewControl;->onDestroy()V

    goto :goto_0

    .line 270
    :cond_0
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 271
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->d()V

    return-void
.end method

.method public onFail()V
    .locals 1

    .line 295
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->E()V

    return-void
.end method

.method protected onPause()V
    .locals 1

    .line 259
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onPause()V

    .line 260
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->c()V

    return-void
.end method

.method protected onResume()V
    .locals 1

    .line 253
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onResume()V

    .line 254
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->b()V

    return-void
.end method

.method public onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 1

    .line 91
    invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onSaveInstanceState(Landroid/os/Bundle;)V

    .line 92
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->b(Landroid/os/Bundle;)V

    return-void
.end method

.method public onSuccess(Lcom/moji/http/allergy/bean/AllergyMainBean;)V
    .locals 4

    const/4 v0, 0x0

    if-eqz p1, :cond_0

    .line 276
    invoke-virtual {p1}, Lcom/moji/http/allergy/bean/AllergyMainBean;->getCode()I

    move-result v1

    if-nez v1, :cond_0

    .line 277
    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    .line 278
    iget-object v1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->r:Lcom/moji/scrollview/ScrollViewWithListener;

    invoke-virtual {v1, v0, v0}, Lcom/moji/scrollview/ScrollViewWithListener;->scrollTo(II)V

    .line 279
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->b()V

    .line 280
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->c:Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyTwoDayForcastView;->fillData(Ljava/lang/Object;)V

    .line 281
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->i:Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyChangeForcastView;->fillData(Ljava/lang/Object;)V

    .line 282
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->j:Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyPieForcastView;->fillData(Ljava/lang/Object;)V

    .line 283
    iget-object v0, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->k:Lcom/moji/mjallergy/viewcontrol/AllergyMapView;

    invoke-virtual {v0, p1}, Lcom/moji/mjallergy/viewcontrol/AllergyMapView;->fillData(Ljava/lang/Object;)V

    goto :goto_0

    :cond_0
    if-eqz p1, :cond_1

    .line 284
    invoke-virtual {p1}, Lcom/moji/http/allergy/bean/AllergyMainBean;->getCode()I

    move-result p1

    const/4 v1, -0x1

    if-ne p1, v1, :cond_1

    .line 285
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    sget v1, Lcom/moji/widget/R$drawable;->view_icon_empty:I

    const-string v2, "\u5f88\u9057\u61be"

    const-string v3, "\u60a8\u6240\u5728\u7684\u57ce\u5e02\u8fd8\u6ca1\u6709\u8fc7\u654f\u7684\u6570\u636e"

    invoke-virtual {p1, v1, v2, v3}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->a(ILjava/lang/String;Ljava/lang/String;)V

    .line 287
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->m:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {p1, v0}, Lcom/moji/titlebar/MJTitleBar;->setVisibility(I)V

    goto :goto_0

    .line 289
    :cond_1
    iget-object p1, p0, Lcom/moji/mjallergy/MJAllergyMainActivity;->p:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->E()V

    :goto_0
    return-void
.end method
