changed repo structure
This commit is contained in:
@@ -0,0 +1,469 @@
|
||||
.class public Landroidx/appcompat/widget/ButtonBarLayout;
|
||||
.super Landroid/widget/LinearLayout;
|
||||
.source "ButtonBarLayout.java"
|
||||
|
||||
|
||||
# static fields
|
||||
.field private static final PEEK_BUTTON_DP:I = 0x10
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private mAllowStacking:Z
|
||||
|
||||
.field private mLastWidthSize:I
|
||||
|
||||
.field private mStacked:Z
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||||
.locals 8
|
||||
|
||||
.line 53
|
||||
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||||
|
||||
const/4 v0, -0x1
|
||||
|
||||
.line 50
|
||||
iput v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mLastWidthSize:I
|
||||
|
||||
.line 54
|
||||
sget-object v0, Landroidx/appcompat/R$styleable;->ButtonBarLayout:[I
|
||||
|
||||
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
.line 55
|
||||
sget-object v3, Landroidx/appcompat/R$styleable;->ButtonBarLayout:[I
|
||||
|
||||
const/4 v6, 0x0
|
||||
|
||||
const/4 v7, 0x0
|
||||
|
||||
move-object v1, p0
|
||||
|
||||
move-object v2, p1
|
||||
|
||||
move-object v4, p2
|
||||
|
||||
move-object v5, v0
|
||||
|
||||
invoke-static/range {v1 .. v7}, Landroidx/core/view/ViewCompat;->saveAttributeDataForStyleable(Landroid/view/View;Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V
|
||||
|
||||
.line 57
|
||||
sget p1, Landroidx/appcompat/R$styleable;->ButtonBarLayout_allowStacking:I
|
||||
|
||||
const/4 p2, 0x1
|
||||
|
||||
invoke-virtual {v0, p1, p2}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
||||
|
||||
move-result p1
|
||||
|
||||
iput-boolean p1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
.line 58
|
||||
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
|
||||
|
||||
.line 62
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getOrientation()I
|
||||
|
||||
move-result p1
|
||||
|
||||
if-ne p1, p2, :cond_0
|
||||
|
||||
.line 63
|
||||
iget-boolean p1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
invoke-direct {p0, p1}, Landroidx/appcompat/widget/ButtonBarLayout;->setStacked(Z)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private getNextVisibleChildIndex(I)I
|
||||
.locals 2
|
||||
|
||||
.line 156
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildCount()I
|
||||
|
||||
move-result v0
|
||||
|
||||
:goto_0
|
||||
if-ge p1, v0, :cond_1
|
||||
|
||||
.line 157
|
||||
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildAt(I)Landroid/view/View;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v1}, Landroid/view/View;->getVisibility()I
|
||||
|
||||
move-result v1
|
||||
|
||||
if-nez v1, :cond_0
|
||||
|
||||
return p1
|
||||
|
||||
:cond_0
|
||||
add-int/lit8 p1, p1, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_1
|
||||
const/4 p1, -0x1
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method private isStacked()Z
|
||||
.locals 1
|
||||
|
||||
.line 186
|
||||
iget-boolean v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mStacked:Z
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method private setStacked(Z)V
|
||||
.locals 1
|
||||
|
||||
.line 165
|
||||
iget-boolean v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mStacked:Z
|
||||
|
||||
if-eq v0, p1, :cond_4
|
||||
|
||||
if-eqz p1, :cond_0
|
||||
|
||||
iget-boolean v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
if-eqz v0, :cond_4
|
||||
|
||||
.line 166
|
||||
:cond_0
|
||||
iput-boolean p1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mStacked:Z
|
||||
|
||||
.line 168
|
||||
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ButtonBarLayout;->setOrientation(I)V
|
||||
|
||||
if-eqz p1, :cond_1
|
||||
|
||||
const v0, 0x800005
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_1
|
||||
const/16 v0, 0x50
|
||||
|
||||
.line 169
|
||||
:goto_0
|
||||
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->setGravity(I)V
|
||||
|
||||
.line 171
|
||||
sget v0, Landroidx/appcompat/R$id;->spacer:I
|
||||
|
||||
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->findViewById(I)Landroid/view/View;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
if-eqz v0, :cond_3
|
||||
|
||||
if-eqz p1, :cond_2
|
||||
|
||||
const/16 p1, 0x8
|
||||
|
||||
goto :goto_1
|
||||
|
||||
:cond_2
|
||||
const/4 p1, 0x4
|
||||
|
||||
.line 173
|
||||
:goto_1
|
||||
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
|
||||
|
||||
.line 178
|
||||
:cond_3
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildCount()I
|
||||
|
||||
move-result p1
|
||||
|
||||
add-int/lit8 p1, p1, -0x2
|
||||
|
||||
:goto_2
|
||||
if-ltz p1, :cond_4
|
||||
|
||||
.line 180
|
||||
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildAt(I)Landroid/view/View;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->bringChildToFront(Landroid/view/View;)V
|
||||
|
||||
add-int/lit8 p1, p1, -0x1
|
||||
|
||||
goto :goto_2
|
||||
|
||||
:cond_4
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method protected onMeasure(II)V
|
||||
.locals 5
|
||||
|
||||
.line 79
|
||||
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
|
||||
|
||||
move-result v0
|
||||
|
||||
.line 81
|
||||
iget-boolean v1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
const/4 v2, 0x0
|
||||
|
||||
if-eqz v1, :cond_1
|
||||
|
||||
.line 82
|
||||
iget v1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mLastWidthSize:I
|
||||
|
||||
if-le v0, v1, :cond_0
|
||||
|
||||
invoke-direct {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->isStacked()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
if-eqz v1, :cond_0
|
||||
|
||||
.line 84
|
||||
invoke-direct {p0, v2}, Landroidx/appcompat/widget/ButtonBarLayout;->setStacked(Z)V
|
||||
|
||||
.line 87
|
||||
:cond_0
|
||||
iput v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mLastWidthSize:I
|
||||
|
||||
.line 96
|
||||
:cond_1
|
||||
invoke-direct {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->isStacked()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
const/4 v3, 0x1
|
||||
|
||||
if-nez v1, :cond_2
|
||||
|
||||
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
|
||||
|
||||
move-result v1
|
||||
|
||||
const/high16 v4, 0x40000000 # 2.0f
|
||||
|
||||
if-ne v1, v4, :cond_2
|
||||
|
||||
const/high16 v1, -0x80000000
|
||||
|
||||
.line 97
|
||||
invoke-static {v0, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
||||
|
||||
move-result v0
|
||||
|
||||
move v1, v3
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_2
|
||||
move v0, p1
|
||||
|
||||
move v1, v2
|
||||
|
||||
.line 105
|
||||
:goto_0
|
||||
invoke-super {p0, v0, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
||||
|
||||
.line 107
|
||||
iget-boolean v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
if-eqz v0, :cond_3
|
||||
|
||||
invoke-direct {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->isStacked()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-nez v0, :cond_3
|
||||
|
||||
.line 110
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getMeasuredWidthAndState()I
|
||||
|
||||
move-result v0
|
||||
|
||||
const/high16 v4, -0x1000000
|
||||
|
||||
and-int/2addr v0, v4
|
||||
|
||||
const/high16 v4, 0x1000000
|
||||
|
||||
if-ne v0, v4, :cond_3
|
||||
|
||||
.line 115
|
||||
invoke-direct {p0, v3}, Landroidx/appcompat/widget/ButtonBarLayout;->setStacked(Z)V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
:cond_3
|
||||
if-eqz v1, :cond_4
|
||||
|
||||
.line 122
|
||||
:goto_1
|
||||
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
||||
|
||||
.line 128
|
||||
:cond_4
|
||||
invoke-direct {p0, v2}, Landroidx/appcompat/widget/ButtonBarLayout;->getNextVisibleChildIndex(I)I
|
||||
|
||||
move-result v0
|
||||
|
||||
if-ltz v0, :cond_7
|
||||
|
||||
.line 130
|
||||
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildAt(I)Landroid/view/View;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
.line 131
|
||||
invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
check-cast v2, Landroid/widget/LinearLayout$LayoutParams;
|
||||
|
||||
.line 132
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getPaddingTop()I
|
||||
|
||||
move-result v4
|
||||
|
||||
invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I
|
||||
|
||||
move-result v1
|
||||
|
||||
add-int/2addr v4, v1
|
||||
|
||||
iget v1, v2, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I
|
||||
|
||||
add-int/2addr v4, v1
|
||||
|
||||
iget v1, v2, Landroid/widget/LinearLayout$LayoutParams;->bottomMargin:I
|
||||
|
||||
add-int/2addr v4, v1
|
||||
|
||||
.line 134
|
||||
invoke-direct {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->isStacked()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
if-eqz v1, :cond_6
|
||||
|
||||
add-int/2addr v0, v3
|
||||
|
||||
.line 135
|
||||
invoke-direct {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->getNextVisibleChildIndex(I)I
|
||||
|
||||
move-result v0
|
||||
|
||||
if-ltz v0, :cond_5
|
||||
|
||||
.line 137
|
||||
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/ButtonBarLayout;->getChildAt(I)Landroid/view/View;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Landroid/view/View;->getPaddingTop()I
|
||||
|
||||
move-result v0
|
||||
|
||||
.line 138
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getResources()Landroid/content/res/Resources;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
iget v1, v1, Landroid/util/DisplayMetrics;->density:F
|
||||
|
||||
const/high16 v2, 0x41800000 # 16.0f
|
||||
|
||||
mul-float/2addr v1, v2
|
||||
|
||||
float-to-int v1, v1
|
||||
|
||||
add-int/2addr v0, v1
|
||||
|
||||
add-int/2addr v4, v0
|
||||
|
||||
:cond_5
|
||||
move v2, v4
|
||||
|
||||
goto :goto_2
|
||||
|
||||
.line 141
|
||||
:cond_6
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->getPaddingBottom()I
|
||||
|
||||
move-result v0
|
||||
|
||||
add-int v2, v4, v0
|
||||
|
||||
.line 145
|
||||
:cond_7
|
||||
:goto_2
|
||||
invoke-static {p0}, Landroidx/core/view/ViewCompat;->getMinimumHeight(Landroid/view/View;)I
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eq v0, v2, :cond_8
|
||||
|
||||
.line 146
|
||||
invoke-virtual {p0, v2}, Landroidx/appcompat/widget/ButtonBarLayout;->setMinimumHeight(I)V
|
||||
|
||||
if-nez p2, :cond_8
|
||||
|
||||
.line 150
|
||||
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
|
||||
|
||||
:cond_8
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public setAllowStacking(Z)V
|
||||
.locals 1
|
||||
|
||||
.line 68
|
||||
iget-boolean v0, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
if-eq v0, p1, :cond_1
|
||||
|
||||
.line 69
|
||||
iput-boolean p1, p0, Landroidx/appcompat/widget/ButtonBarLayout;->mAllowStacking:Z
|
||||
|
||||
if-nez p1, :cond_0
|
||||
|
||||
.line 70
|
||||
invoke-direct {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->isStacked()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
if-eqz p1, :cond_0
|
||||
|
||||
const/4 p1, 0x0
|
||||
|
||||
.line 71
|
||||
invoke-direct {p0, p1}, Landroidx/appcompat/widget/ButtonBarLayout;->setStacked(Z)V
|
||||
|
||||
.line 73
|
||||
:cond_0
|
||||
invoke-virtual {p0}, Landroidx/appcompat/widget/ButtonBarLayout;->requestLayout()V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
.end method
|
||||
Reference in New Issue
Block a user