SectionedRecyclerViewAdapter.smali

.class public abstract Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;
.super Landroid/support/v7/widget/RecyclerView$Adapter;

# interfaces
.implements Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemProvider;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<VH:",
        "Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;",
        ">",
        "Landroid/support/v7/widget/RecyclerView$Adapter",
        "<TVH;>;",
        "Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemProvider;"
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "SectionedRVAdapter"

.field protected static final VIEW_TYPE_HEADER:I = -0x2

.field protected static final VIEW_TYPE_ITEM:I = -0x1


# instance fields
.field private layoutManager:Landroid/support/v7/widget/GridLayoutManager;

.field private positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

.field private showHeadersForEmptySections:Z


# direct methods
.method public constructor <init>()V
    .registers 2

    invoke-direct {p0}, Landroid/support/v7/widget/RecyclerView$Adapter;-><init>()V

    new-instance v0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-direct {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;-><init>()V

    iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->invalidate(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemProvider;)I

    return-void
.end method

.method static synthetic access$000(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;)Landroid/support/v7/widget/GridLayoutManager;
    .registers 2

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->layoutManager:Landroid/support/v7/widget/GridLayoutManager;

    return-object v0
.end method


# virtual methods
.method public collapseAllSections()V
    .registers 3

    const/4 v0, 0x0

    :goto_1
    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getSectionCount()I

    move-result v1

    if-ge v0, v1, :cond_f

    iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->collapseSection(I)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_f
    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public collapseSection(I)V
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->collapseSection(I)V

    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public expandAllSections()V
    .registers 3

    const/4 v0, 0x0

    :goto_1
    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getSectionCount()I

    move-result v1

    if-ge v0, v1, :cond_f

    iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->expandSection(I)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_f
    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public expandSection(I)V
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->expandSection(I)V

    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyDataSetChanged()V

    return-void
.end method

.method public getAbsolutePosition(II)I
    .registers 4

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->absolutePosition(II)I

    move-result v0

    return v0
.end method

.method public getAbsolutePosition(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;)I
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->absolutePosition(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;)I

    move-result v0

    return v0
.end method

.method public getHeaderId(I)J
    .registers 4

    invoke-super {p0, p1}, Landroid/support/v7/widget/RecyclerView$Adapter;->getItemId(I)J

    move-result-wide v0

    return-wide v0
.end method

.method public getHeaderViewType(I)I
    .registers 3
    .annotation build Landroid/support/annotation/IntRange;
        from = 0x0L
        to = 0x7fffffffL
    .end annotation

    const/4 v0, -0x2

    return v0
.end method

.method public final getItemCount()I
    .registers 2

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->invalidate(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemProvider;)I

    move-result v0

    return v0
.end method

.method public getItemId(I)J
    .registers 4
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-virtual {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->isHeader(I)Z

    move-result v0

    if-eqz v0, :cond_11

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->sectionId(I)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getHeaderId(I)J

    move-result-wide v0

    :goto_10
    return-wide v0

    :cond_11
    invoke-virtual {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getRelativePosition(I)Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->section()I

    move-result v1

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->relativePos()I

    move-result v0

    invoke-virtual {p0, v1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getItemId(II)J

    move-result-wide v0

    goto :goto_10
.end method

.method public getItemId(II)J
    .registers 5

    invoke-super {p0, p2}, Landroid/support/v7/widget/RecyclerView$Adapter;->getItemId(I)J

    move-result-wide v0

    return-wide v0
.end method

.method public final getItemViewType(I)I
    .registers 5
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-virtual {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->isHeader(I)Z

    move-result v0

    if-eqz v0, :cond_11

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->sectionId(I)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getHeaderViewType(I)I

    move-result v0

    :goto_10
    return v0

    :cond_11
    invoke-virtual {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getRelativePosition(I)Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->section()I

    move-result v1

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->relativePos()I

    move-result v2

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->section()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    sub-int v0, p1, v0

    invoke-virtual {p0, v1, v2, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getItemViewType(III)I

    move-result v0

    goto :goto_10
.end method

.method public getItemViewType(III)I
    .registers 5
    .annotation build Landroid/support/annotation/IntRange;
        from = 0x0L
        to = 0x7fffffffL
    .end annotation

    const/4 v0, -0x1

    return v0
.end method

.method public getRelativePosition(I)Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->relativePosition(I)Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;

    move-result-object v0

    return-object v0
.end method

.method protected getRowSpan(IIII)I
    .registers 6

    const/4 v0, 0x1

    return v0
.end method

.method public final getSectionHeaderIndex(I)I
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->sectionHeaderIndex(I)I

    move-result v0

    return v0
.end method

.method public final isHeader(I)Z
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->isHeader(I)Z

    move-result v0

    return v0
.end method

.method public final isSectionExpanded(I)Z
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->isSectionExpanded(I)Z

    move-result v0

    return v0
.end method

.method public notifySectionChanged(I)V
    .registers 7
    .param p1    # I
        .annotation build Landroid/support/annotation/IntRange;
            from = 0x0L
            to = 0x7fffffffL
        .end annotation
    .end param

    if-ltz p1, :cond_a

    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getSectionCount()I

    move-result v0

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

    if-le p1, v0, :cond_2b

    :cond_a
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "Section "

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

    move-result-object v1

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

    move-result-object v1

    const-string/jumbo v2, " is out of range of existing sections."

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_2b
    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->sectionHeaderIndex(I)I

    move-result v0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v1

    const/4 v2, -0x1

    if-ne v1, v2, :cond_56

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "No header position mapped for section "

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

    move-result-object v1

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_56
    invoke-virtual {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getItemCount(I)I

    move-result v1

    if-nez v1, :cond_7e

    const-string/jumbo v0, "SectionedRVAdapter"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "There are no items in section "

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

    move-result-object v1

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

    move-result-object v1

    const-string/jumbo v2, " to notify."

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

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :goto_7d
    return-void

    :cond_7e
    const-string/jumbo v2, "SectionedRVAdapter"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string/jumbo v4, "Invalidating "

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

    move-result-object v3

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

    move-result-object v3

    const-string/jumbo v4, " items starting at index "

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    invoke-virtual {p0, v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyItemRangeChanged(II)V

    goto :goto_7d
.end method

.method public abstract onBindHeaderViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;IZ)V
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TVH;IZ)V"
        }
    .end annotation
.end method

.method public bridge synthetic onBindViewHolder(Landroid/support/v7/widget/RecyclerView$ViewHolder;I)V
    .registers 3
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    check-cast p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;

    invoke-virtual {p0, p1, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;I)V

    return-void
.end method

.method public bridge synthetic onBindViewHolder(Landroid/support/v7/widget/RecyclerView$ViewHolder;ILjava/util/List;)V
    .registers 4
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    check-cast p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;

    invoke-virtual {p0, p1, p2, p3}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;ILjava/util/List;)V

    return-void
.end method

.method public final onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;I)V
    .registers 7
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TVH;I)V"
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {p1, v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;->setPositionDelegate(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder$PositionDelegate;)V

    const/4 v0, 0x0

    iget-object v1, p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;->itemView:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    instance-of v1, v1, Landroid/support/v7/widget/GridLayoutManager$LayoutParams;

    if-eqz v1, :cond_38

    new-instance v0, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

    const/4 v1, -0x1

    const/4 v2, -0x2

    invoke-direct {v0, v1, v2}, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;-><init>(II)V

    :cond_17
    :goto_17
    invoke-virtual {p0, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->isHeader(I)Z

    move-result v1

    if-eqz v1, :cond_4b

    if-eqz v0, :cond_23

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;->setFullSpan(Z)V

    :cond_23
    iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v1, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->sectionId(I)I

    move-result v1

    invoke-virtual {p0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->isSectionExpanded(I)Z

    move-result v2

    invoke-virtual {p0, p1, v1, v2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->onBindHeaderViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;IZ)V

    :goto_30
    if-eqz v0, :cond_37

    iget-object v1, p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;->itemView:Landroid/view/View;

    invoke-virtual {v1, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    :cond_37
    return-void

    :cond_38
    iget-object v1, p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;->itemView:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    instance-of v1, v1, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

    if-eqz v1, :cond_17

    iget-object v0, p1, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;->itemView:Landroid/view/View;

    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

    goto :goto_17

    :cond_4b
    if-eqz v0, :cond_51

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;->setFullSpan(Z)V

    :cond_51
    invoke-virtual {p0, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getRelativePosition(I)Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->getAbsolutePosition(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;)I

    move-result v2

    invoke-virtual {v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->section()I

    move-result v3

    invoke-virtual {v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/ItemCoord;->relativePos()I

    move-result v1

    invoke-virtual {p0, p1, v3, v1, v2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;III)V

    goto :goto_30
.end method

.method public abstract onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;III)V
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TVH;III)V"
        }
    .end annotation
.end method

.method public final onBindViewHolder(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedViewHolder;ILjava/util/List;)V
    .registers 4
    .annotation build Landroid/support/annotation/RestrictTo;
        value = {
            .enum Landroid/support/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroid/support/annotation/RestrictTo$Scope;
        }
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TVH;I",
            "Ljava/util/List",
            "<",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    invoke-super {p0, p1, p2, p3}, Landroid/support/v7/widget/RecyclerView$Adapter;->onBindViewHolder(Landroid/support/v7/widget/RecyclerView$ViewHolder;ILjava/util/List;)V

    return-void
.end method

.method public final setLayoutManager(Landroid/support/v7/widget/GridLayoutManager;)V
    .registers 3
    .param p1    # Landroid/support/v7/widget/GridLayoutManager;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    iput-object p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->layoutManager:Landroid/support/v7/widget/GridLayoutManager;

    if-nez p1, :cond_5

    :goto_4
    return-void

    :cond_5
    new-instance v0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter$1;

    invoke-direct {v0, p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter$1;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;)V

    invoke-virtual {p1, v0}, Landroid/support/v7/widget/GridLayoutManager;->setSpanSizeLookup(Landroid/support/v7/widget/GridLayoutManager$SpanSizeLookup;)V

    goto :goto_4
.end method

.method public final shouldShowHeadersForEmptySections(Z)V
    .registers 2

    iput-boolean p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->showHeadersForEmptySections:Z

    return-void
.end method

.method public final showHeadersForEmptySections()Z
    .registers 2

    iget-boolean v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->showHeadersForEmptySections:Z

    return v0
.end method

.method public toggleSectionExpanded(I)V
    .registers 3

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->positionManager:Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;

    invoke-virtual {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/PositionManager;->toggleSectionExpanded(I)V

    invoke-virtual {p0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/sectionedrecyclerview/SectionedRecyclerViewAdapter;->notifyDataSetChanged()V

    return-void
.end method