276 lines
7.7 KiB
Smali
276 lines
7.7 KiB
Smali
.class public final Lcom/vk/extensions/RecyclerPaginatedViewExt;
|
|
.super Ljava/lang/Object;
|
|
.source "RecyclerPaginatedViewExt.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final a(Lcom/vk/lists/RecyclerPaginatedView;Lkotlin/jvm/b/Functions1;)Lcom/vk/core/ui/CardItemDecorator;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/vk/lists/RecyclerPaginatedView;",
|
|
"Lkotlin/jvm/b/Functions1<",
|
|
"-",
|
|
"Landroidx/recyclerview/widget/RecyclerView;",
|
|
"-",
|
|
"Ljava/lang/Boolean;",
|
|
"+",
|
|
"Lcom/vk/core/ui/CardItemDecorator;",
|
|
">;)",
|
|
"Lcom/vk/core/ui/CardItemDecorator;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 8
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "recyclerView"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/vk/core/util/Screen;->l(Landroid/content/Context;)Z
|
|
|
|
move-result v0
|
|
|
|
const-string v2, "this.recyclerView"
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 9
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
move-result-object p1
|
|
|
|
.line 10
|
|
instance-of v2, p1, Lcom/vk/lists/PaginatedRecyclerAdapter;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 11
|
|
check-cast p1, Lcom/vk/lists/PaginatedRecyclerAdapter;
|
|
|
|
iget-object p1, p1, Lcom/vk/lists/PaginatedRecyclerAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
.line 12
|
|
:cond_0
|
|
new-instance v2, Lcom/vk/core/ui/CardItemDecorator;
|
|
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
check-cast p1, Lcom/vk/core/ui/Provider;
|
|
|
|
xor-int/lit8 v4, v0, 0x1
|
|
|
|
invoke-direct {v2, v3, p1, v4}, Lcom/vk/core/ui/CardItemDecorator;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lcom/vk/core/ui/Provider;Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance p0, Lkotlin/TypeCastException;
|
|
|
|
const-string p1, "null cannot be cast to non-null type com.vk.core.ui.Provider"
|
|
|
|
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
.line 13
|
|
:cond_2
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v3, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
xor-int/lit8 v2, v0, 0x1
|
|
|
|
invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p1, v3, v2}, Lkotlin/jvm/b/Functions1;->a(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
move-object v2, p1
|
|
|
|
check-cast v2, Lcom/vk/core/ui/CardItemDecorator;
|
|
|
|
:goto_0
|
|
const/high16 p1, 0x40000000 # 2.0f
|
|
|
|
.line 14
|
|
invoke-static {p1}, Lme/grishka/appkit/utils/V;->a(F)I
|
|
|
|
move-result p1
|
|
|
|
const/high16 v3, 0x40400000 # 3.0f
|
|
|
|
invoke-static {v3}, Lme/grishka/appkit/utils/V;->a(F)I
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/high16 v0, 0x41000000 # 8.0f
|
|
|
|
invoke-static {v0}, Lme/grishka/appkit/utils/V;->a(F)I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {v2, p1, v3, v0, v4}, Lcom/vk/core/ui/CardItemDecorator;->a(IIII)V
|
|
|
|
.line 15
|
|
invoke-virtual {p0, v2}, Lcom/vk/lists/RecyclerPaginatedView;->setItemDecoration(Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;)V
|
|
|
|
.line 16
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "recyclerView.context"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p0, p1}, Lcom/vk/extensions/RecyclerPaginatedViewExt;->a(Lcom/vk/lists/RecyclerPaginatedView;Landroid/content/Context;)V
|
|
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/vk/lists/RecyclerPaginatedView;Lkotlin/jvm/b/Functions1;ILjava/lang/Object;)Lcom/vk/core/ui/CardItemDecorator;
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 7
|
|
:cond_0
|
|
invoke-static {p0, p1}, Lcom/vk/extensions/RecyclerPaginatedViewExt;->a(Lcom/vk/lists/RecyclerPaginatedView;Lkotlin/jvm/b/Functions1;)Lcom/vk/core/ui/CardItemDecorator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final a(Lcom/vk/lists/RecyclerPaginatedView;Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
.line 1
|
|
sget-object v0, Lcom/vk/core/util/AppContextHolder;->a:Landroid/content/Context;
|
|
|
|
const-string v1, "AppContextHolder.context"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "AppContextHolder.context.resources"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object v0
|
|
|
|
iget v0, v0, Landroid/content/res/Configuration;->screenWidthDp:I
|
|
|
|
.line 2
|
|
invoke-static {p1}, Lcom/vk/core/util/Screen;->l(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/16 p1, 0x10
|
|
|
|
add-int/lit16 v0, v0, -0x39c
|
|
|
|
.line 3
|
|
div-int/lit8 v0, v0, 0x2
|
|
|
|
invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
int-to-float p1, p1
|
|
|
|
invoke-static {p1}, Lme/grishka/appkit/utils/V;->a(F)I
|
|
|
|
move-result p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
.line 4
|
|
:goto_0
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "this.recyclerView"
|
|
|
|
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/high16 v3, 0x2000000
|
|
|
|
invoke-virtual {v0, v3}, Landroid/view/ViewGroup;->setScrollBarStyle(I)V
|
|
|
|
.line 5
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setClipToPadding(Z)V
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Lcom/vk/lists/RecyclerPaginatedView;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0, p1, v1, p1, v1}, Landroid/view/ViewGroup;->setPadding(IIII)V
|
|
|
|
return-void
|
|
.end method
|