140 lines
3.3 KiB
Smali
140 lines
3.3 KiB
Smali
.class public final Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;
|
|
.super Ljava/lang/Object;
|
|
.source "StickyHeaderItemDecoration.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/views/StickyHeaderItemDecoration;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "LayoutManager"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;->INSTANCE:Lcom/discord/utilities/views/StickyHeaderItemDecoration$LayoutManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final layoutHeaderView(Landroid/view/ViewGroup;Landroid/view/View;)V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getWidth()I
|
|
|
|
move-result v0
|
|
|
|
const/high16 v1, 0x40000000 # 2.0f
|
|
|
|
invoke-static {v0, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getHeight()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-static {v1, v2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getPaddingLeft()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getPaddingRight()I
|
|
|
|
move-result v4
|
|
|
|
add-int/2addr v4, v3
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v3
|
|
|
|
iget v3, v3, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
invoke-static {v0, v4, v3}, Landroid/view/ViewGroup;->getChildMeasureSpec(III)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getPaddingTop()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {p1}, Landroid/view/ViewGroup;->getPaddingBottom()I
|
|
|
|
move-result p1
|
|
|
|
add-int/2addr p1, v3
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v3
|
|
|
|
iget v3, v3, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
invoke-static {v1, p1, v3}, Landroid/view/ViewGroup;->getChildMeasureSpec(III)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, v0, p1}, Landroid/view/View;->measure(II)V
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getMeasuredWidth()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2}, Landroid/view/View;->getMeasuredHeight()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2, v2, v2, p1, v0}, Landroid/view/View;->layout(IIII)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string/jumbo p1, "view"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "parent"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|