.class Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;
.super Ljava/lang/Object;
.source "ChannelAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a(Landroid/view/ViewGroup;I)Landroid/support/v7/widget/RecyclerView$ViewHolder;
.end annotation

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


# instance fields
.field final synthetic a:Landroid/view/ViewGroup;

.field final synthetic b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

.field final synthetic c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;Landroid/view/ViewGroup;Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;)V
    .locals 0

    .line 283
    iput-object p1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    iput-object p2, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->a:Landroid/view/ViewGroup;

    iput-object p3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

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

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 10

    .line 287
    iget-object p1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->a:Landroid/view/ViewGroup;

    check-cast p1, Landroid/support/v7/widget/RecyclerView;

    .line 288
    invoke-virtual {p1}, Landroid/support/v7/widget/RecyclerView;->getLayoutManager()Landroid/support/v7/widget/RecyclerView$LayoutManager;

    move-result-object v0

    .line 289
    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

    invoke-virtual {v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;->e()I

    move-result v1

    .line 291
    invoke-virtual {v0, v1}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->c(I)Landroid/view/View;

    move-result-object v2

    if-nez v2, :cond_0

    return-void

    .line 302
    :cond_0
    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-static {v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)Ljava/util/List;

    move-result-object v3

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

    move-result v3

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

    iget-object v4, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v4}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->e()I

    move-result v4

    add-int/2addr v3, v4

    invoke-virtual {v0, v3}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->c(I)Landroid/view/View;

    move-result-object v3

    .line 305
    invoke-virtual {p1, v3}, Landroid/support/v7/widget/RecyclerView;->indexOfChild(Landroid/view/View;)I

    move-result v4

    if-ltz v4, :cond_6

    .line 306
    invoke-virtual {v3}, Landroid/view/View;->getLeft()I

    move-result v4

    .line 307
    invoke-virtual {v3}, Landroid/view/View;->getTop()I

    move-result v5

    .line 314
    iget-object v6, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-static {v6}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)Ljava/util/List;

    move-result-object v6

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

    move-result v6

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

    iget-object v7, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v7}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->d()I

    move-result v7

    add-int/2addr v6, v7

    .line 315
    move-object v7, v0

    check-cast v7, Landroid/support/v7/widget/GridLayoutManager;

    .line 316
    invoke-virtual {v7}, Landroid/support/v7/widget/GridLayoutManager;->b()I

    move-result v8

    .line 318
    iget-object v9, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v9}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->e()I

    move-result v9

    sub-int v9, v6, v9

    rem-int/2addr v9, v8

    if-nez v9, :cond_1

    .line 319
    invoke-virtual {v0, v6}, Landroid/support/v7/widget/RecyclerView$LayoutManager;->c(I)Landroid/view/View;

    move-result-object v0

    .line 320
    invoke-virtual {v0}, Landroid/view/View;->getLeft()I

    move-result v3

    .line 321
    invoke-virtual {v0}, Landroid/view/View;->getTop()I

    move-result v5

    move v0, v3

    goto :goto_0

    .line 323
    :cond_1
    invoke-virtual {v3}, Landroid/view/View;->getWidth()I

    move-result v0

    add-int/2addr v0, v4

    .line 326
    invoke-virtual {v7}, Landroid/support/v7/widget/GridLayoutManager;->q()I

    move-result v4

    iget-object v9, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v9}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a()I

    move-result v9

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

    if-ne v4, v9, :cond_3

    .line 328
    iget-object v4, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v4}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a()I

    move-result v4

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

    iget-object v9, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-static {v9}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)Ljava/util/List;

    move-result-object v9

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

    move-result v9

    sub-int/2addr v4, v9

    iget-object v9, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v9}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->d()I

    move-result v9

    sub-int/2addr v4, v9

    rem-int/2addr v4, v8

    if-nez v4, :cond_4

    .line 330
    invoke-virtual {v7}, Landroid/support/v7/widget/GridLayoutManager;->o()I

    move-result v4

    if-nez v4, :cond_2

    .line 334
    invoke-virtual {v7}, Landroid/support/v7/widget/GridLayoutManager;->p()I

    move-result v3

    if-eqz v3, :cond_4

    const/4 v3, 0x0

    .line 335
    invoke-virtual {p1, v3}, Landroid/support/v7/widget/RecyclerView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

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

    move-result v3

    neg-int v3, v3

    invoke-virtual {p1}, Landroid/support/v7/widget/RecyclerView;->getPaddingTop()I

    move-result v4

    sub-int/2addr v3, v4

    add-int/2addr v5, v3

    goto :goto_0

    .line 340
    :cond_2
    invoke-virtual {v3}, Landroid/view/View;->getHeight()I

    move-result v3

    add-int/2addr v5, v3

    goto :goto_0

    .line 344
    :cond_3
    sget-object v3, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v4, "current--No"

    invoke-virtual {v3, v4}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 355
    :cond_4
    :goto_0
    invoke-virtual {v7}, Landroid/support/v7/widget/GridLayoutManager;->q()I

    move-result v3

    if-ne v1, v3, :cond_5

    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    .line 356
    invoke-static {v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)Ljava/util/List;

    move-result-object v3

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

    move-result v3

    sub-int/2addr v1, v3

    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->d()I

    move-result v3

    sub-int/2addr v1, v3

    rem-int/2addr v1, v8

    if-eqz v1, :cond_5

    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    .line 357
    invoke-static {v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)Ljava/util/List;

    move-result-object v1

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

    move-result v1

    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-virtual {v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->e()I

    move-result v3

    add-int/2addr v1, v3

    if-ne v6, v1, :cond_5

    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    .line 358
    invoke-virtual {v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->e()I

    move-result v1

    sub-int/2addr v6, v1

    rem-int/2addr v6, v8

    if-eqz v6, :cond_5

    .line 359
    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

    invoke-static {v1, v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;)V

    goto :goto_1

    .line 361
    :cond_5
    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    iget-object v3, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

    invoke-static {v1, v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->b(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;)V

    .line 363
    :goto_1
    iget-object v1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    int-to-float v0, v0

    int-to-float v3, v5

    invoke-static {v1, p1, v2, v0, v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;Landroid/support/v7/widget/RecyclerView;Landroid/view/View;FF)V

    goto :goto_2

    .line 366
    :cond_6
    iget-object p1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    iget-object v0, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->b:Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;

    invoke-static {p1, v0}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->b(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OtherViewHolder;)V

    .line 369
    :goto_2
    iget-object p1, p0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter$4;->c:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;

    invoke-static {p1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->d(Lcom/moji/mjweather/feed/adapter/ChannelAdapter;)V

    return-void
.end method
