b.smali
.class public abstract Lcom/bignerdranch/expandablerecyclerview/b;
.super Landroidx/recyclerview/widget/RecyclerView$h;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<P::",
"Lcom/bignerdranch/expandablerecyclerview/model/b<",
"TC;>;C:",
"Ljava/lang/Object;",
"PVH:",
"Lcom/bignerdranch/expandablerecyclerview/c;",
"CVH:",
"Lcom/bignerdranch/expandablerecyclerview/a;",
">",
"Landroidx/recyclerview/widget/RecyclerView$h<",
"Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
">;"
}
.end annotation
# instance fields
.field public a:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/bignerdranch/expandablerecyclerview/model/a<",
"TP;TC;>;>;"
}
.end annotation
.end field
.field public b:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"TP;>;"
}
.end annotation
.end field
.field public c:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Landroidx/recyclerview/widget/RecyclerView;",
">;"
}
.end annotation
.end field
.field public d:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"TP;",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field
.field public e:Lcom/bignerdranch/expandablerecyclerview/b$a;
# direct methods
.method public constructor <init>(Ljava/util/List;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"TP;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$h;-><init>()V
.line 2
new-instance v0, Lcom/bignerdranch/expandablerecyclerview/b$a;
invoke-direct {v0, p0}, Lcom/bignerdranch/expandablerecyclerview/b$a;-><init>(Lcom/bignerdranch/expandablerecyclerview/b;)V
iput-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->e:Lcom/bignerdranch/expandablerecyclerview/b$a;
.line 3
iput-object p1, p0, Lcom/bignerdranch/expandablerecyclerview/b;->b:Ljava/util/List;
.line 4
invoke-virtual {p0, p1}, Lcom/bignerdranch/expandablerecyclerview/b;->d(Ljava/util/List;)Ljava/util/List;
move-result-object p1
check-cast p1, Ljava/util/ArrayList;
iput-object p1, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
.line 5
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/bignerdranch/expandablerecyclerview/b;->c:Ljava/util/ArrayList;
.line 6
new-instance p1, Ljava/util/HashMap;
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->b:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
invoke-direct {p1, v0}, Ljava/util/HashMap;-><init>(I)V
iput-object p1, p0, Lcom/bignerdranch/expandablerecyclerview/b;->d:Ljava/util/HashMap;
return-void
.end method
# virtual methods
.method public final d(Ljava/util/List;)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"TP;>;)",
"Ljava/util/List<",
"Lcom/bignerdranch/expandablerecyclerview/model/a<",
"TP;TC;>;>;"
}
.end annotation
.line 1
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 2
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x0
:goto_a
if-ge v2, v1, :cond_1c
.line 3
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/bignerdranch/expandablerecyclerview/model/b;
.line 4
invoke-interface {v3}, Lcom/bignerdranch/expandablerecyclerview/model/b;->isInitiallyExpanded()Z
move-result v4
invoke-virtual {p0, v0, v3, v4}, Lcom/bignerdranch/expandablerecyclerview/b;->e(Ljava/util/List;Lcom/bignerdranch/expandablerecyclerview/model/b;Z)V
add-int/lit8 v2, v2, 0x1
goto :goto_a
:cond_1c
return-object v0
.end method
.method public final e(Ljava/util/List;Lcom/bignerdranch/expandablerecyclerview/model/b;Z)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lcom/bignerdranch/expandablerecyclerview/model/a<",
"TP;TC;>;>;TP;Z)V"
}
.end annotation
.line 1
new-instance v0, Lcom/bignerdranch/expandablerecyclerview/model/a;
invoke-direct {v0, p2}, Lcom/bignerdranch/expandablerecyclerview/model/a;-><init>(Lcom/bignerdranch/expandablerecyclerview/model/b;)V
.line 2
invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
if-eqz p3, :cond_26
const/4 p2, 0x1
.line 3
iput-boolean p2, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->d:Z
.line 4
invoke-virtual {v0}, Lcom/bignerdranch/expandablerecyclerview/model/a;->a()Ljava/util/List;
move-result-object p2
.line 5
check-cast p2, Ljava/util/ArrayList;
invoke-virtual {p2}, Ljava/util/ArrayList;->size()I
move-result p3
const/4 v0, 0x0
:goto_18
if-ge v0, p3, :cond_26
.line 6
invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bignerdranch/expandablerecyclerview/model/a;
.line 7
invoke-interface {p1, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
add-int/lit8 v0, v0, 0x1
goto :goto_18
:cond_26
return-void
.end method
.method public final f(I)I
.registers 6
const/4 v0, 0x0
if-nez p1, :cond_4
return v0
:cond_4
const/4 v1, 0x0
const/4 v2, 0x0
:goto_6
if-ge v1, p1, :cond_1b
.line 1
iget-object v3, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/bignerdranch/expandablerecyclerview/model/a;
.line 2
iget-boolean v3, v3, Lcom/bignerdranch/expandablerecyclerview/model/a;->c:Z
if-eqz v3, :cond_16
const/4 v2, 0x0
goto :goto_18
:cond_16
add-int/lit8 v2, v2, 0x1
:goto_18
add-int/lit8 v1, v1, 0x1
goto :goto_6
:cond_1b
return v2
.end method
.method public final g(I)I
.registers 5
const/4 v0, 0x0
if-nez p1, :cond_4
return v0
:cond_4
const/4 v1, -0x1
:goto_5
if-gt v0, p1, :cond_18
.line 1
iget-object v2, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/bignerdranch/expandablerecyclerview/model/a;
.line 2
iget-boolean v2, v2, Lcom/bignerdranch/expandablerecyclerview/model/a;->c:Z
if-eqz v2, :cond_15
add-int/lit8 v1, v1, 0x1
:cond_15
add-int/lit8 v0, v0, 0x1
goto :goto_5
:cond_18
return v1
.end method
.method public final getItemCount()I
.registers 2
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
return v0
.end method
.method public final getItemViewType(I)I
.registers 4
.line 1
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bignerdranch/expandablerecyclerview/model/a;
.line 2
iget-boolean v0, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->c:Z
if-eqz v0, :cond_33
.line 3
invoke-virtual {p0, p1}, Lcom/bignerdranch/expandablerecyclerview/b;->g(I)I
move-result p1
move-object v0, p0
check-cast v0, Lcom/shopee/app/ui/base/l0;
.line 4
invoke-virtual {v0}, Lcom/shopee/app/ui/base/l0;->l()Z
move-result v1
if-nez v1, :cond_1e
.line 5
invoke-virtual {v0, p1}, Lcom/bignerdranch/expandablerecyclerview/b;->getItemViewType(I)I
move-result p1
goto :goto_32
.line 6
:cond_1e
invoke-virtual {v0}, Lcom/shopee/app/ui/base/l0;->l()Z
move-result v1
if-eqz v1, :cond_31
.line 7
iget-object v0, v0, Lcom/bignerdranch/expandablerecyclerview/b;->b:Ljava/util/List;
.line 8
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
add-int/lit8 v0, v0, -0x1
if-ne p1, v0, :cond_31
const/16 p1, -0x62
goto :goto_32
:cond_31
const/4 p1, 0x0
:goto_32
return p1
.line 9
:cond_33
invoke-virtual {p0, p1}, Lcom/bignerdranch/expandablerecyclerview/b;->g(I)I
invoke-virtual {p0, p1}, Lcom/bignerdranch/expandablerecyclerview/b;->f(I)I
const/4 p1, 0x1
return p1
.end method
.method public final onAttachedToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.registers 3
.line 1
invoke-super {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$h;->onAttachedToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.line 2
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->c:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public final onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
.registers 12
.line 1
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-gt p2, v0, :cond_ac
.line 2
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bignerdranch/expandablerecyclerview/model/a;
.line 3
iget-boolean v1, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->c:Z
if-eqz v1, :cond_71
.line 4
check-cast p1, Lcom/bignerdranch/expandablerecyclerview/c;
.line 5
invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 6
instance-of v1, p1, Lcom/shopee/app/ui/notification/actionbox2/item/c;
xor-int/lit8 v1, v1, 0x1
if-eqz v1, :cond_24
.line 7
iget-object v1, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-virtual {v1, p1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 8
:cond_24
iget-boolean v1, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->d:Z
.line 9
invoke-virtual {p1, v1}, Lcom/bignerdranch/expandablerecyclerview/c;->d(Z)V
.line 10
iget-object v1, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->a:Lcom/bignerdranch/expandablerecyclerview/model/b;
.line 11
iput-object v1, p1, Lcom/bignerdranch/expandablerecyclerview/c;->c:Lcom/bignerdranch/expandablerecyclerview/model/b;
.line 12
invoke-virtual {p0, p2}, Lcom/bignerdranch/expandablerecyclerview/b;->g(I)I
move-result p2
.line 13
iget-object v0, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->a:Lcom/bignerdranch/expandablerecyclerview/model/b;
.line 14
move-object v1, p0
check-cast v1, Lcom/shopee/app/ui/base/l0;
.line 15
invoke-virtual {v1}, Lcom/shopee/app/ui/base/l0;->l()Z
move-result v2
if-nez v2, :cond_4e
.line 16
invoke-virtual {v1, p1, v0}, Lcom/shopee/app/ui/base/l0;->h(Lcom/bignerdranch/expandablerecyclerview/c;Lcom/bignerdranch/expandablerecyclerview/model/b;)V
.line 17
invoke-virtual {v1, p1, v0, p2}, Lcom/shopee/app/ui/base/l0;->i(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;Lcom/bignerdranch/expandablerecyclerview/model/b;I)V
.line 18
iget-object p1, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
instance-of p2, p1, Lcom/shopee/app/ui/base/a0;
if-eqz p2, :cond_ab
.line 19
check-cast p1, Lcom/shopee/app/ui/base/a0;
invoke-interface {p1, v0}, Lcom/shopee/app/ui/base/a0;->bind(Ljava/lang/Object;)V
goto :goto_ab
.line 20
:cond_4e
invoke-virtual {v1}, Lcom/shopee/app/ui/base/l0;->l()Z
move-result v2
if-eqz v2, :cond_5f
.line 21
iget-object v2, v1, Lcom/bignerdranch/expandablerecyclerview/b;->b:Ljava/util/List;
.line 22
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v2
add-int/lit8 v2, v2, -0x1
if-ne p2, v2, :cond_5f
goto :goto_ab
.line 23
:cond_5f
invoke-virtual {v1, p1, v0}, Lcom/shopee/app/ui/base/l0;->h(Lcom/bignerdranch/expandablerecyclerview/c;Lcom/bignerdranch/expandablerecyclerview/model/b;)V
.line 24
invoke-virtual {v1, p1, v0, p2}, Lcom/shopee/app/ui/base/l0;->i(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;Lcom/bignerdranch/expandablerecyclerview/model/b;I)V
.line 25
iget-object p1, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
instance-of p2, p1, Lcom/shopee/app/ui/base/a0;
if-eqz p2, :cond_ab
.line 26
check-cast p1, Lcom/shopee/app/ui/base/a0;
invoke-interface {p1, v0}, Lcom/shopee/app/ui/base/a0;->bind(Ljava/lang/Object;)V
goto :goto_ab
.line 27
:cond_71
check-cast p1, Lcom/bignerdranch/expandablerecyclerview/a;
.line 28
iget-object v1, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->b:Ljava/lang/Object;
.line 29
iput-object v1, p1, Lcom/bignerdranch/expandablerecyclerview/a;->a:Ljava/lang/Object;
.line 30
invoke-virtual {p0, p2}, Lcom/bignerdranch/expandablerecyclerview/b;->g(I)I
move-result v5
invoke-virtual {p0, p2}, Lcom/bignerdranch/expandablerecyclerview/b;->f(I)I
move-result v6
.line 31
iget-object p2, v0, Lcom/bignerdranch/expandablerecyclerview/model/a;->b:Ljava/lang/Object;
.line 32
move-object v0, p0
check-cast v0, Lcom/shopee/app/ui/base/l0;
.line 33
iget-object v1, v0, Lcom/shopee/app/ui/base/l0;->h:Lcom/shopee/app/ui/base/l0$d;
if-eqz v1, :cond_a0
.line 34
iget-object v7, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
new-instance v8, Lcom/shopee/app/ui/base/m0;
move-object v1, v8
move-object v2, v0
move-object v3, p1
move-object v4, p2
invoke-direct/range {v1 .. v6}, Lcom/shopee/app/ui/base/m0;-><init>(Lcom/shopee/app/ui/base/l0;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;Ljava/lang/Object;II)V
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 35
iget-object v1, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
new-instance v2, Lcom/shopee/app/ui/base/n0;
invoke-direct {v2, v0, p1, p2}, Lcom/shopee/app/ui/base/n0;-><init>(Lcom/shopee/app/ui/base/l0;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;Ljava/lang/Object;)V
invoke-virtual {v1, v2}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
.line 36
:cond_a0
iget-object p1, p1, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
instance-of v0, p1, Lcom/shopee/app/ui/base/a0;
if-eqz v0, :cond_ab
.line 37
check-cast p1, Lcom/shopee/app/ui/base/a0;
invoke-interface {p1, p2}, Lcom/shopee/app/ui/base/a0;->bind(Ljava/lang/Object;)V
:cond_ab
:goto_ab
return-void
.line 38
:cond_ac
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Trying to bind item out of bounds, size "
.line 39
invoke-static {v0}, Landroid/support/v4/media/c;->c(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
.line 40
iget-object v1, p0, Lcom/bignerdranch/expandablerecyclerview/b;->a:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, " flatPosition "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p2, ". Was the data changed without a call to notify...()?"
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
.registers 5
const/4 v0, 0x1
if-eq p2, v0, :cond_4
goto :goto_5
:cond_4
const/4 v0, 0x0
:goto_5
if-eqz v0, :cond_2d
.line 1
move-object v0, p0
check-cast v0, Lcom/shopee/app/ui/base/l0;
const/16 v1, -0x63
if-eq p2, v1, :cond_29
const/16 v1, -0x62
if-eq p2, v1, :cond_19
.line 2
iget-object p2, v0, Lcom/shopee/app/ui/base/l0;->g:Lcom/shopee/app/ui/base/l0$c;
invoke-virtual {v0, p1, p2}, Lcom/shopee/app/ui/base/l0;->k(Landroid/view/ViewGroup;Lcom/shopee/app/ui/base/l0$c;)Lcom/bignerdranch/expandablerecyclerview/c;
move-result-object p1
goto :goto_24
.line 3
:cond_19
new-instance p1, Lcom/shopee/app/ui/base/k0;
iget-object p2, v0, Lcom/shopee/app/ui/base/l0;->f:Lcom/shopee/app/ui/base/i0$a;
invoke-interface {p2}, Lcom/shopee/app/ui/base/i0$a;->get()Landroid/view/View;
move-result-object p2
invoke-direct {p1, p2}, Lcom/shopee/app/ui/base/k0;-><init>(Landroid/view/View;)V
.line 4
:goto_24
iget-object p2, p0, Lcom/bignerdranch/expandablerecyclerview/b;->e:Lcom/bignerdranch/expandablerecyclerview/b$a;
.line 5
iput-object p2, p1, Lcom/bignerdranch/expandablerecyclerview/c;->a:Lcom/bignerdranch/expandablerecyclerview/c$a;
return-object p1
.line 6
:cond_29
new-instance p1, Lcom/shopee/app/ui/base/j0;
const/4 p1, 0x0
throw p1
.line 7
:cond_2d
move-object p2, p0
check-cast p2, Lcom/shopee/app/ui/base/l0;
.line 8
new-instance v0, Lcom/bignerdranch/expandablerecyclerview/a;
invoke-virtual {p2, p1}, Lcom/shopee/app/ui/base/l0;->j(Landroid/view/ViewGroup;)Landroid/view/View;
move-result-object p1
invoke-direct {v0, p1}, Lcom/bignerdranch/expandablerecyclerview/a;-><init>(Landroid/view/View;)V
return-object v0
.end method
.method public final onDetachedFromRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.registers 3
.line 1
invoke-super {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$h;->onDetachedFromRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
.line 2
iget-object v0, p0, Lcom/bignerdranch/expandablerecyclerview/b;->c:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
return-void
.end method