.class public Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;
.super Lcom/moji/mjweather/aqi/control/AQIMapViewControl;
.source "AqiMapFullScreenViewControl.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/widget/RadioGroup$OnCheckedChangeListener;


# instance fields
.field private d:Landroid/widget/TextView;

.field private e:Landroid/widget/PopupWindow;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    .line 42
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/control/AQIMapViewControl;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;)Landroid/widget/TextView;
    .locals 0

    .line 33
    iget-object p0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

    return-object p0
.end method

.method private b(Ljava/lang/String;)V
    .locals 1

    .line 72
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

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

    const/4 p1, 0x1

    .line 73
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e(Z)V

    .line 74
    iget-object p1, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

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

    return-void
.end method

.method private e(Z)V
    .locals 2

    if-eqz p1, :cond_0

    const p1, 0x7f0803f0

    goto :goto_0

    :cond_0
    const p1, 0x7f0803ef

    .line 78
    :goto_0
    invoke-static {p1}, Lcom/moji/tool/Utils;->a(I)Landroid/graphics/drawable/Drawable;

    move-result-object p1

    const/high16 v0, 0x40a00000    # 5.0f

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

    move-result v0

    const/4 v1, 0x0

    invoke-virtual {p1, v1, v1, v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 80
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1, v1, p1, v1}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    return-void
.end method

.method private n()V
    .locals 6

    .line 84
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->getInflater()Landroid/view/LayoutInflater;

    move-result-object v0

    const/4 v1, 0x0

    const v2, 0x7f0b035e

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

    move-result-object v0

    const v2, 0x7f090701

    .line 85
    invoke-static {v0, v2}, Lcom/moji/tool/ViewTool;->a(Landroid/view/View;I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/widget/RadioGroup;

    .line 86
    invoke-virtual {v2, p0}, Landroid/widget/RadioGroup;->setOnCheckedChangeListener(Landroid/widget/RadioGroup$OnCheckedChangeListener;)V

    const/high16 v2, 0x42a00000    # 80.0f

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

    move-result v2

    const/high16 v3, 0x43520000    # 210.0f

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

    move-result v3

    .line 89
    new-instance v4, Landroid/widget/PopupWindow;

    const/4 v5, 0x0

    invoke-direct {v4, v0, v2, v3, v5}, Landroid/widget/PopupWindow;-><init>(Landroid/view/View;IIZ)V

    iput-object v4, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    .line 90
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Landroid/widget/PopupWindow;->setTouchable(Z)V

    .line 91
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    invoke-virtual {v0, v2}, Landroid/widget/PopupWindow;->setOutsideTouchable(Z)V

    .line 92
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    new-instance v2, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl$1;

    invoke-direct {v2, p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl$1;-><init>(Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;)V

    invoke-virtual {v0, v2}, Landroid/widget/PopupWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    .line 100
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    new-instance v2, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->getContext()Landroid/content/Context;

    move-result-object v3

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

    move-result-object v3

    check-cast v1, Landroid/graphics/Bitmap;

    invoke-direct {v2, v3, v1}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V

    invoke-virtual {v0, v2}, Landroid/widget/PopupWindow;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    return-void
.end method

.method private o()V
    .locals 4

    .line 126
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    if-nez v0, :cond_0

    .line 127
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->n()V

    .line 129
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

    const/4 v2, 0x0

    const/high16 v3, -0x3f600000    # -5.0f

    invoke-static {v3}, Lcom/moji/tool/DeviceTool;->a(F)I

    move-result v3

    invoke-virtual {v0, v1, v2, v3}, Landroid/widget/PopupWindow;->showAsDropDown(Landroid/view/View;II)V

    return-void
.end method

.method private p()V
    .locals 1

    .line 133
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 134
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    :cond_0
    return-void
.end method

.method private q()Z
    .locals 1

    .line 139
    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method


# virtual methods
.method protected a(Lcom/amap/api/maps2d/UiSettings;)V
    .locals 1

    .line 47
    invoke-super {p0, p1}, Lcom/moji/mjweather/aqi/control/AQIMapViewControl;->a(Lcom/amap/api/maps2d/UiSettings;)V

    const/4 v0, 0x0

    .line 48
    invoke-virtual {p1, v0}, Lcom/amap/api/maps2d/UiSettings;->setScaleControlsEnabled(Z)V

    return-void
.end method

.method protected h()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public onCheckedChanged(Landroid/widget/RadioGroup;I)V
    .locals 3

    .line 144
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->AQI:Lcom/moji/mjweather/aqi/AqiValueType;

    packed-switch p2, :pswitch_data_0

    goto :goto_0

    .line 156
    :pswitch_0
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->SO2:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 150
    :pswitch_1
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->PM25:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 153
    :pswitch_2
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->PM10:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 162
    :pswitch_3
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->O3:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 165
    :pswitch_4
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->CO:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 147
    :pswitch_5
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->AQI:Lcom/moji/mjweather/aqi/AqiValueType;

    goto :goto_0

    .line 159
    :pswitch_6
    sget-object v0, Lcom/moji/mjweather/aqi/AqiValueType;->NO2:Lcom/moji/mjweather/aqi/AqiValueType;

    .line 168
    :goto_0
    iput-object v0, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->c:Lcom/moji/mjweather/aqi/AqiValueType;

    .line 169
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e()Ljava/util/List;

    move-result-object v1

    if-eqz v1, :cond_0

    const/4 v2, 0x1

    .line 171
    invoke-virtual {p0, v1, v0, v2}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->a(Ljava/util/List;Lcom/moji/mjweather/aqi/AqiValueType;Z)V

    .line 173
    :cond_0
    invoke-static {p1, p2}, Lcom/moji/tool/ViewTool;->a(Landroid/view/View;I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/widget/RadioButton;

    .line 174
    invoke-virtual {p1}, Landroid/widget/RadioButton;->getText()Ljava/lang/CharSequence;

    move-result-object p1

    invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->b(Ljava/lang/String;)V

    .line 175
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->p()V

    .line 176
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->getPresenter()Lcom/moji/mvpframe/BasePresenter;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/aqi/presenter/MapAqiPresenter;

    invoke-virtual {p1}, Lcom/moji/mjweather/aqi/presenter/MapAqiPresenter;->f()Lcom/amap/api/maps2d/model/LatLng;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 177
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->getPresenter()Lcom/moji/mvpframe/BasePresenter;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/aqi/presenter/MapAqiPresenter;

    invoke-virtual {p1}, Lcom/moji/mjweather/aqi/presenter/MapAqiPresenter;->f()Lcom/amap/api/maps2d/model/LatLng;

    move-result-object p1

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->b(Lcom/amap/api/maps2d/model/LatLng;)V

    :cond_1
    return-void

    :pswitch_data_0
    .packed-switch 0x7f0906a1
        :pswitch_6
        :pswitch_5
        :pswitch_4
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

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

    .line 111
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result p1

    const v0, 0x7f0909dd

    if-eq p1, v0, :cond_0

    goto :goto_0

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

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->AQI_MAP_FULL_STAT_CLICK:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 114
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->q()Z

    move-result p1

    if-eqz p1, :cond_1

    .line 115
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->p()V

    goto :goto_0

    :cond_1
    const/4 p1, 0x0

    .line 117
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->e(Z)V

    .line 118
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->o()V

    :goto_0
    return-void
.end method

.method protected onCreatedView(Landroid/view/View;)V
    .locals 2

    .line 58
    invoke-super {p0, p1}, Lcom/moji/mjweather/aqi/control/AQIMapViewControl;->onCreatedView(Landroid/view/View;)V

    const v0, 0x7f090c80

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

    move-result-object v0

    const/16 v1, 0x8

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

    const v0, 0x7f0909df

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

    move-result-object v0

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

    const v0, 0x7f090320

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

    move-result-object p1

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

    .line 64
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->getView()Landroid/view/View;

    move-result-object p1

    const v0, 0x7f0909dd

    invoke-static {p1, v0}, Lcom/moji/tool/ViewTool;->a(Landroid/view/View;I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

    .line 65
    iget-object p1, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->d:Landroid/widget/TextView;

    const/4 v0, 0x0

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

    const-string p1, "AQI"

    .line 67
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->b(Ljava/lang/String;)V

    .line 69
    iget-object p1, p0, Lcom/moji/mjweather/aqi/control/AqiMapFullScreenViewControl;->a:Lcom/moji/mjweather/aqi/view/MJMapView;

    invoke-virtual {p1}, Lcom/moji/mjweather/aqi/view/MJMapView;->a()V

    return-void
.end method

.method protected onGenerateLayoutParams(Landroid/view/View;)Landroid/view/ViewGroup$LayoutParams;
    .locals 1

    .line 105
    new-instance p1, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v0, -0x1

    invoke-direct {p1, v0, v0}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    return-object p1
.end method
