245 lines
6.3 KiB
Smali
245 lines
6.3 KiB
Smali
.class public final Lcom/vk/extensions/RecyclerViewExt;
|
|
.super Ljava/lang/Object;
|
|
.source "RecyclerViewExt.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final a(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/View;)I
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 7
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->getDecoratedTop(Landroid/view/View;)I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final a(Landroidx/recyclerview/widget/RecyclerView;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->findViewByPosition(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/view/ViewGroup;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/RecyclerView;->getChildViewHolder(Landroid/view/View;)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
|
|
move-result-object p0
|
|
|
|
move-object v1, p0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public static final a(Landroidx/recyclerview/widget/RecyclerView;Lkotlin/jvm/b/Functions;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/recyclerview/widget/RecyclerView;",
|
|
"Lkotlin/jvm/b/Functions<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 4
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
new-instance v1, Lcom/vk/extensions/RecyclerViewExt$a;
|
|
|
|
invoke-direct {v1, v0, p1}, Lcom/vk/extensions/RecyclerViewExt$a;-><init>(Ljava/lang/Object;Lkotlin/jvm/b/Functions;)V
|
|
|
|
invoke-virtual {p0, v1}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->registerAdapterDataObserver(Landroidx/recyclerview/widget/RecyclerView$AdapterDataObserver;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final a(Landroidx/recyclerview/widget/RecyclerView;)Z
|
|
.locals 1
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of v0, p0, Landroidx/recyclerview/widget/LinearLayoutManager;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
:cond_0
|
|
check-cast p0, Landroidx/recyclerview/widget/LinearLayoutManager;
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/LinearLayoutManager;->getStackFromEnd()Z
|
|
|
|
move-result p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final b(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->isComputingLayout()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyDataSetChanged()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance v0, Lcom/vk/extensions/RecyclerViewExt$c;
|
|
|
|
invoke-direct {v0, p0}, Lcom/vk/extensions/RecyclerViewExt$c;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final b(Landroidx/recyclerview/widget/RecyclerView;Lkotlin/jvm/b/Functions;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/recyclerview/widget/RecyclerView;",
|
|
"Lkotlin/jvm/b/Functions<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 4
|
|
new-instance v0, Lcom/vk/extensions/RecyclerViewExt$b;
|
|
|
|
invoke-direct {v0, p1}, Lcom/vk/extensions/RecyclerViewExt$b;-><init>(Lkotlin/jvm/b/Functions;)V
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/RecyclerView;->addOnScrollListener(Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final c(Landroidx/recyclerview/widget/RecyclerView;Lkotlin/jvm/b/Functions;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/recyclerview/widget/RecyclerView;",
|
|
"Lkotlin/jvm/b/Functions<",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroidx/recyclerview/widget/RecyclerView;->isComputingLayout()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Lkotlin/jvm/b/Functions;->invoke()Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance v0, Lcom/vk/extensions/RecyclerViewExt$d;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/vk/extensions/RecyclerViewExt$d;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lkotlin/jvm/b/Functions;)V
|
|
|
|
invoke-virtual {p0, v0}, Landroid/view/ViewGroup;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|