StickyRecyclerViewManager2.smali
.class public Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;
.super Lcom/facebook/react/uimanager/ViewGroupManager;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/react/uimanager/ViewGroupManager<",
"Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;",
">;"
}
.end annotation
# static fields
.field private static final SCROLL_TO_ROW:I = 0x1
.field private static final SCROLL_TO_ROW_WITH_OFFSET:I = 0x2
# direct methods
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Lcom/facebook/react/uimanager/ViewGroupManager;-><init>()V
return-void
.end method
# virtual methods
.method public bridge synthetic addView(Landroid/view/ViewGroup;Landroid/view/View;I)V
.registers 4
.line 1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
invoke-virtual {p0, p1, p2, p3}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->addView(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;Landroid/view/View;I)V
return-void
.end method
.method public addView(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;Landroid/view/View;I)V
.registers 4
.line 2
invoke-virtual {p1, p2}, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->f(Landroid/view/View;)V
return-void
.end method
.method public bridge synthetic createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
.registers 2
.line 1
invoke-virtual {p0, p1}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
move-result-object p1
return-object p1
.end method
.method public createViewInstance(Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
.registers 4
.line 2
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
move-result-object p1
const v0, 0x7f0d0329
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object p1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
.line 3
new-instance v0, Landroid/view/ViewGroup$LayoutParams;
const/4 v1, -0x1
invoke-direct {v0, v1, v1}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V
invoke-virtual {p1, v0}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
return-object p1
.end method
.method public bridge synthetic getChildCount(Landroid/view/ViewGroup;)I
.registers 2
.line 1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
invoke-virtual {p0, p1}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->getChildCount(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)I
move-result p1
return p1
.end method
.method public getChildCount(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)I
.registers 2
.line 2
invoke-virtual {p1}, Landroid/view/ViewGroup;->getChildCount()I
move-result p1
return p1
.end method
.method public getCommandsMap()Ljava/util/Map;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Integer;",
">;"
}
.end annotation
const/4 v0, 0x1
.line 1
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
const/4 v1, 0x2
.line 2
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const-string v2, "scrollToRow"
const-string v3, "scrollToRowWithOffset"
.line 3
invoke-static {v2, v0, v3, v1}, Lcom/facebook/react/common/MapBuilder;->of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
move-result-object v0
return-object v0
.end method
.method public getExportedCustomDirectEventTypeConstants()Ljava/util/Map;
.registers 5
.line 1
invoke-static {}, Lcom/facebook/react/common/MapBuilder;->builder()Lcom/facebook/react/common/MapBuilder$Builder;
move-result-object v0
const-string v1, "registrationName"
const-string v2, "didStickyScroll"
.line 2
invoke-static {v1, v2}, Lcom/facebook/react/common/MapBuilder;->of(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lcom/facebook/react/common/MapBuilder$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/facebook/react/common/MapBuilder$Builder;
move-result-object v0
const-string v2, "onStickyHeaderChanged"
.line 3
invoke-static {v1, v2}, Lcom/facebook/react/common/MapBuilder;->of(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lcom/facebook/react/common/MapBuilder$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/facebook/react/common/MapBuilder$Builder;
move-result-object v0
const-string v2, "onStickyRowLayout"
.line 4
invoke-static {v1, v2, v0, v2}, Landroidx/biometric/c0;->d(Ljava/lang/String;Ljava/lang/String;Lcom/facebook/react/common/MapBuilder$Builder;Ljava/lang/String;)Ljava/util/Map;
move-result-object v0
return-object v0
.end method
.method public getName()Ljava/lang/String;
.registers 2
const-string v0, "NativeStickyRecyclerView"
return-object v0
.end method
.method public needsCustomLayoutForChildren()Z
.registers 2
const/4 v0, 0x1
return v0
.end method
.method public bridge synthetic onDropViewInstance(Landroid/view/View;)V
.registers 2
.line 1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
invoke-virtual {p0, p1}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->onDropViewInstance(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)V
return-void
.end method
.method public onDropViewInstance(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)V
.registers 3
const/4 v0, 0x1
.line 2
iput-boolean v0, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->n:Z
.line 3
iget-object v0, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->e:Lcom/garena/rnrecyclerview/library/ReactRecyclerViewModule;
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result p1
invoke-virtual {v0, p1}, Lcom/garena/rnrecyclerview/library/ReactRecyclerViewModule;->unregisterLayoutManager(I)V
return-void
.end method
.method public bridge synthetic receiveCommand(Landroid/view/View;ILcom/facebook/react/bridge/ReadableArray;)V
.registers 4
.line 1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
invoke-virtual {p0, p1, p2, p3}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->receiveCommand(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;ILcom/facebook/react/bridge/ReadableArray;)V
return-void
.end method
.method public receiveCommand(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;ILcom/facebook/react/bridge/ReadableArray;)V
.registers 7
const/4 v0, 0x0
const/4 v1, 0x1
if-eq p2, v1, :cond_18
const/4 v2, 0x2
if-eq p2, v2, :cond_8
goto :goto_30
.line 2
:cond_8
invoke-interface {p3, v0}, Lcom/facebook/react/bridge/ReadableArray;->getInt(I)I
move-result p2
invoke-interface {p3, v1}, Lcom/facebook/react/bridge/ReadableArray;->getDouble(I)D
move-result-wide v0
invoke-interface {p3, v2}, Lcom/facebook/react/bridge/ReadableArray;->getBoolean(I)Z
move-result p3
invoke-virtual {p1, p2, v0, v1, p3}, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->h(IDZ)V
goto :goto_30
.line 3
:cond_18
invoke-interface {p3, v0}, Lcom/facebook/react/bridge/ReadableArray;->getInt(I)I
move-result p2
invoke-interface {p3, v1}, Lcom/facebook/react/bridge/ReadableArray;->getBoolean(I)Z
move-result p3
if-eqz p3, :cond_28
.line 4
iget-object p3, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->k:Lcom/garena/rnrecyclerview/library/recycler/ReactLinearLayoutManager;
invoke-virtual {p3, p2, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->scrollToPositionWithOffset(II)V
goto :goto_2d
.line 5
:cond_28
iget-object p3, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->k:Lcom/garena/rnrecyclerview/library/recycler/ReactLinearLayoutManager;
invoke-virtual {p3, p2, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->scrollToPositionWithOffset(II)V
.line 6
:goto_2d
invoke-virtual {p1}, Landroid/view/View;->forceLayout()V
:goto_30
return-void
.end method
.method public bridge synthetic removeAllViews(Landroid/view/ViewGroup;)V
.registers 2
.line 1
check-cast p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;
invoke-virtual {p0, p1}, Lcom/garena/rnrecyclerview/library/sticky2/StickyRecyclerViewManager2;->removeAllViews(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)V
return-void
.end method
.method public removeAllViews(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;)V
.registers 3
const/4 v0, 0x1
.line 2
iput-boolean v0, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->n:Z
.line 3
iget-object v0, p1, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->a:Landroidx/work/impl/a;
invoke-virtual {v0}, Landroidx/work/impl/a;->m()V
.line 4
invoke-virtual {p1}, Landroid/view/ViewGroup;->removeAllViews()V
return-void
.end method
.method public setDataSource(Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;Lcom/facebook/react/bridge/ReadableMap;)V
.registers 5
.annotation runtime Lcom/facebook/react/uimanager/annotations/ReactProp;
name = "dataSource"
.end annotation
.line 1
invoke-virtual {p1}, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->getDataSourceMapper()Lcom/garena/rnrecyclerview/library/datasource/a;
move-result-object v0
.line 2
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 3
:try_start_7
invoke-virtual {v0, p2}, Lcom/garena/rnrecyclerview/library/datasource/a;->b(Lcom/facebook/react/bridge/ReadableMap;)Ljava/util/Map;
move-result-object v1
check-cast v1, Ljava/util/HashMap;
iput-object v1, v0, Lcom/garena/rnrecyclerview/library/datasource/a;->a:Ljava/util/HashMap;
.line 4
invoke-virtual {v0, p2}, Lcom/garena/rnrecyclerview/library/datasource/a;->a(Lcom/facebook/react/bridge/ReadableMap;)Ljava/util/List;
move-result-object p2
:try_end_13
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_13} :catch_14
goto :goto_19
.line 5
:catch_14
new-instance p2, Ljava/util/ArrayList;
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
.line 6
:goto_19
invoke-virtual {p1, p2}, Lcom/garena/rnrecyclerview/library/recycler/ReactRecyclerView;->setDataSource(Ljava/util/List;)V
return-void
.end method