.class Lcom/moji/mjappstore/BaseTabFragment$1;
.super Ljava/lang/Object;
.source "BaseTabFragment.java"

# interfaces
.implements Lcom/moji/mjappstore/listener/ObtainAppBannerListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjappstore/BaseTabFragment;->l()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/mjappstore/BaseTabFragment;


# direct methods
.method constructor <init>(Lcom/moji/mjappstore/BaseTabFragment;)V
    .locals 0

    .line 138
    iput-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

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

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/Exception;)V
    .locals 0

    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;",
            ">;)V"
        }
    .end annotation

    if-eqz p1, :cond_7

    .line 141
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    goto/16 :goto_4

    .line 154
    :cond_0
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iput-object p1, v0, Lcom/moji/mjappstore/BaseTabFragment;->k:Ljava/util/List;

    .line 155
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->y:Ljava/util/List;

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

    .line 156
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

    if-eqz v0, :cond_1

    .line 157
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

    const/4 v1, 0x4

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

    .line 159
    :cond_1
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->D:Landroid/widget/RelativeLayout;

    const/4 v1, 0x0

    if-eqz v0, :cond_2

    .line 160
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->D:Landroid/widget/RelativeLayout;

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

    .line 162
    :cond_2
    iget-object v0, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v0, v0, Lcom/moji/mjappstore/BaseTabFragment;->k:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

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

    move-result v2

    int-to-float v2, v2

    const/high16 v3, 0x41200000    # 10.0f

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

    move-result v4

    mul-float v4, v4, v3

    sub-float/2addr v2, v4

    const/4 v3, 0x0

    :goto_0
    const/4 v4, 0x1

    if-ge v3, v0, :cond_4

    .line 166
    :try_start_0
    new-instance v5, Lcom/moji/imageview/RemoteImageView;

    iget-object v6, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    invoke-virtual {v6}, Lcom/moji/mjappstore/BaseTabFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v6

    invoke-direct {v5, v6}, Lcom/moji/imageview/RemoteImageView;-><init>(Landroid/content/Context;)V

    .line 167
    invoke-virtual {v5, v4}, Lcom/moji/imageview/RemoteImageView;->setBorder(Z)V

    .line 168
    sget v4, Lcom/moji/mjappstore/R$drawable;->skin_banner_mask:I

    invoke-virtual {v5, v4}, Lcom/moji/imageview/RemoteImageView;->setBkgFrameResID(I)V

    .line 169
    invoke-virtual {v5, v1}, Lcom/moji/imageview/RemoteImageView;->setIsTouchClickable(Z)V

    .line 171
    new-instance v4, Lcom/moji/mjappstore/BaseTabFragment$1$1;

    invoke-direct {v4, p0, p1, v3}, Lcom/moji/mjappstore/BaseTabFragment$1$1;-><init>(Lcom/moji/mjappstore/BaseTabFragment$1;Ljava/util/List;I)V

    invoke-virtual {v5, v4}, Lcom/moji/imageview/RemoteImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 200
    invoke-interface {p1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget-object v4, v4, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->imgurl:Ljava/lang/String;

    const-string v6, "http"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_3

    goto :goto_1

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

    move-result-object v4

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

    move-result-object v4

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

    move-result-object v6

    check-cast v6, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget-object v6, v6, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->imgurl:Ljava/lang/String;

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

    move-result-object v4

    float-to-int v6, v2

    .line 204
    invoke-interface {p1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget v7, v7, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->width:I

    int-to-float v7, v7

    div-float v7, v2, v7

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

    move-result-object v8

    check-cast v8, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget v8, v8, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->height:I

    int-to-float v8, v8

    mul-float v7, v7, v8

    float-to-int v7, v7

    invoke-virtual {v4, v6, v7}, Lcom/squareup/picasso/RequestCreator;->a(II)Lcom/squareup/picasso/RequestCreator;

    move-result-object v4

    .line 205
    invoke-virtual {v4, v5}, Lcom/squareup/picasso/RequestCreator;->a(Landroid/widget/ImageView;)V

    .line 208
    iget-object v4, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v4, v4, Lcom/moji/mjappstore/BaseTabFragment;->y:Ljava/util/List;

    new-instance v6, Lcom/moji/mjappstore/data/AppStoreHeaderData;

    invoke-direct {v6, v5}, Lcom/moji/mjappstore/data/AppStoreHeaderData;-><init>(Ljava/lang/Object;)V

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

    :goto_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :catch_0
    move-exception p1

    goto :goto_2

    .line 213
    :cond_4
    iget-object v3, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v3, v3, Lcom/moji/mjappstore/BaseTabFragment;->L:Lcom/moji/viewpager/CycleSlipViewPager;

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

    move-result-object v5

    check-cast v5, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget v5, v5, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->width:I

    int-to-float v5, v5

    div-float/2addr v2, v5

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

    move-result-object p1

    check-cast p1, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;

    iget p1, p1, Lcom/moji/http/appmoji001/data/TopBannerResult$TopBannerInfo;->height:I

    int-to-float p1, p1

    mul-float v2, v2, p1

    float-to-int p1, v2

    invoke-virtual {v3, p1}, Lcom/moji/viewpager/CycleSlipViewPager;->setHeight(I)V

    .line 214
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    invoke-static {p1}, Lcom/moji/mjappstore/BaseTabFragment;->a(Lcom/moji/mjappstore/BaseTabFragment;)Lcom/moji/mjappstore/adapter/AppStoreCycleSlipPagerAdapter;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/mjappstore/adapter/AppStoreCycleSlipPagerAdapter;->notifyDataSetChanged()V

    .line 215
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->y:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    if-le p1, v4, :cond_5

    .line 216
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->L:Lcom/moji/viewpager/CycleSlipViewPager;

    iget-object v2, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object v2, v2, Lcom/moji/mjappstore/BaseTabFragment;->y:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    mul-int/lit16 v2, v2, 0x3e8

    invoke-virtual {p1, v2, v1}, Lcom/moji/viewpager/CycleSlipViewPager;->setCurrentItem(IZ)V

    .line 217
    :cond_5
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

    if-eqz p1, :cond_6

    .line 218
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

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

    .line 219
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

    invoke-virtual {p1, v0, v1}, Lcom/moji/emotion/CityIndexControlView;->c(II)V

    .line 221
    :cond_6
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    invoke-static {p1}, Lcom/moji/mjappstore/BaseTabFragment;->a(Lcom/moji/mjappstore/BaseTabFragment;)Lcom/moji/mjappstore/adapter/AppStoreCycleSlipPagerAdapter;

    move-result-object p1

    const/16 v0, 0x1388

    invoke-virtual {p1, v0}, Lcom/moji/mjappstore/adapter/AppStoreCycleSlipPagerAdapter;->a(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_3

    .line 226
    :goto_2
    invoke-static {}, Lcom/moji/mjappstore/BaseTabFragment;->k()Ljava/lang/String;

    move-result-object v0

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

    move-result-object p1

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

    .line 227
    invoke-static {}, Lcom/moji/mjappstore/BaseTabFragment;->k()Ljava/lang/String;

    move-result-object p1

    const-string v0, "error"

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

    :goto_3
    return-void

    .line 142
    :cond_7
    :goto_4
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->D:Landroid/widget/RelativeLayout;

    const/16 v0, 0x8

    if-eqz p1, :cond_8

    .line 143
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->D:Landroid/widget/RelativeLayout;

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

    .line 146
    :cond_8
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->L:Lcom/moji/viewpager/CycleSlipViewPager;

    if-eqz p1, :cond_9

    .line 147
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->L:Lcom/moji/viewpager/CycleSlipViewPager;

    const/4 v1, 0x0

    invoke-virtual {p1, v1}, Lcom/moji/viewpager/CycleSlipViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    .line 149
    :cond_9
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

    if-eqz p1, :cond_a

    .line 150
    iget-object p1, p0, Lcom/moji/mjappstore/BaseTabFragment$1;->a:Lcom/moji/mjappstore/BaseTabFragment;

    iget-object p1, p1, Lcom/moji/mjappstore/BaseTabFragment;->n:Lcom/moji/emotion/CityIndexControlView;

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

    :cond_a
    return-void
.end method
