221 lines
5.3 KiB
Smali
221 lines
5.3 KiB
Smali
.class public final Lcom/discord/utilities/view/recycler/PaddedItemDecorator;
|
|
.super Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;
|
|
.source "PaddedItemDecorator.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public final orientation:I
|
|
|
|
.field public final spaceHorz:I
|
|
|
|
.field public final spaceVert:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(III)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;-><init>()V
|
|
|
|
iput p1, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->orientation:I
|
|
|
|
iput p2, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceHorz:I
|
|
|
|
iput p3, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceVert:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ILandroid/content/res/Resources;II)V
|
|
.locals 0
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2, p3}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p3
|
|
|
|
float-to-int p3, p3
|
|
|
|
invoke-virtual {p2, p4}, Landroid/content/res/Resources;->getDimension(I)F
|
|
|
|
move-result p2
|
|
|
|
float-to-int p2, p2
|
|
|
|
invoke-direct {p0, p1, p3, p2}, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;-><init>(III)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "resources"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getItemOffsets(Landroid/graphics/Rect;Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$State;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
invoke-super {p0, p1, p2, p3, p4}, Landroidx/recyclerview/widget/RecyclerView$ItemDecoration;->getItemOffsets(Landroid/graphics/Rect;Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$State;)V
|
|
|
|
iget p4, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->orientation:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne p4, v1, :cond_1
|
|
|
|
invoke-virtual {p3, p2}, Landroidx/recyclerview/widget/RecyclerView;->getChildAdapterPosition(Landroid/view/View;)I
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
iget v0, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceVert:I
|
|
|
|
:cond_0
|
|
iput v0, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
iget p2, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceVert:I
|
|
|
|
iput p2, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
iget p2, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceHorz:I
|
|
|
|
iput p2, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
iput p2, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const-string p1, "Other("
|
|
|
|
invoke-static {p1}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
iget p2, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->orientation:I
|
|
|
|
const-string p3, ") orientation padding for items not supported yet."
|
|
|
|
invoke-static {p1, p2, p3}, Le/e/b/a/a;->a(Ljava/lang/StringBuilder;ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lm/h;
|
|
|
|
const-string p3, "An operation is not implemented: "
|
|
|
|
invoke-static {p3, p1}, Le/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Lm/h;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_2
|
|
iget p4, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceVert:I
|
|
|
|
iput p4, p1, Landroid/graphics/Rect;->top:I
|
|
|
|
iput p4, p1, Landroid/graphics/Rect;->bottom:I
|
|
|
|
invoke-virtual {p3, p2}, Landroidx/recyclerview/widget/RecyclerView;->getChildAdapterPosition(Landroid/view/View;)I
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
iget v0, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceHorz:I
|
|
|
|
:cond_3
|
|
iput v0, p1, Landroid/graphics/Rect;->left:I
|
|
|
|
iget p2, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceHorz:I
|
|
|
|
iput p2, p1, Landroid/graphics/Rect;->right:I
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_4
|
|
const-string p1, "state"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string p1, "parent"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
const-string p1, "outRect"
|
|
|
|
invoke-static {p1}, Lm/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getOrientation()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->orientation:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getSpaceHorz()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceHorz:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getSpaceVert()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/utilities/view/recycler/PaddedItemDecorator;->spaceVert:I
|
|
|
|
return v0
|
|
.end method
|