2022-06-10 21:38:30 +09:00

140 lines
2.5 KiB
Smali

.class public Lpb/a0;
.super Landroidx/recyclerview/widget/RecyclerView$l;
.source "GridSpacingItemDecoration.java"
# instance fields
.field public a:I
.field public b:I
.field public c:Z
# direct methods
.method public constructor <init>(IIZ)V
.locals 0
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"spanCount",
"spacing",
"includeEdge"
}
.end annotation
.line 1
invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$l;-><init>()V
.line 2
iput p1, p0, Lpb/a0;->a:I
.line 3
iput p2, p0, Lpb/a0;->b:I
.line 4
iput-boolean p3, p0, Lpb/a0;->c:Z
return-void
.end method
# virtual methods
.method public getItemOffsets(Landroid/graphics/Rect;Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$x;)V
.locals 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0,
0x0
}
names = {
"outRect",
"view",
"parent",
"state"
}
.end annotation
.line 1
invoke-virtual {p3, p2}, Landroidx/recyclerview/widget/RecyclerView;->getChildAdapterPosition(Landroid/view/View;)I
move-result p2
.line 2
iget p3, p0, Lpb/a0;->a:I
rem-int p4, p2, p3
.line 3
iget-boolean v0, p0, Lpb/a0;->c:Z
if-eqz v0, :cond_1
.line 4
iget v0, p0, Lpb/a0;->b:I
mul-int v1, p4, v0
div-int/2addr v1, p3
sub-int v1, v0, v1
iput v1, p1, Landroid/graphics/Rect;->left:I
add-int/lit8 p4, p4, 0x1
mul-int/2addr p4, v0
.line 5
div-int/2addr p4, p3
iput p4, p1, Landroid/graphics/Rect;->right:I
if-ge p2, p3, :cond_0
.line 6
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 7
:cond_0
iput v0, p1, Landroid/graphics/Rect;->bottom:I
goto :goto_0
.line 8
:cond_1
iget v0, p0, Lpb/a0;->b:I
mul-int v1, p4, v0
div-int/2addr v1, p3
iput v1, p1, Landroid/graphics/Rect;->left:I
add-int/lit8 p4, p4, 0x1
mul-int/2addr p4, v0
.line 9
div-int/2addr p4, p3
sub-int p4, v0, p4
iput p4, p1, Landroid/graphics/Rect;->right:I
if-lt p2, p3, :cond_2
.line 10
iput v0, p1, Landroid/graphics/Rect;->top:I
:cond_2
:goto_0
return-void
.end method