apkfuckery/com.discord/smali/androidx/appcompat/widget/ActionMenuView.smali
2019-02-04 21:08:30 +01:00

2216 lines
53 KiB
Smali

.class public Landroidx/appcompat/widget/ActionMenuView;
.super Landroidx/appcompat/widget/LinearLayoutCompat;
# interfaces
.implements Landroidx/appcompat/view/menu/MenuBuilder$ItemInvoker;
.implements Landroidx/appcompat/view/menu/MenuView;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/appcompat/widget/ActionMenuView$LayoutParams;,
Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;,
Landroidx/appcompat/widget/ActionMenuView$ActionMenuPresenterCallback;,
Landroidx/appcompat/widget/ActionMenuView$MenuBuilderCallback;,
Landroidx/appcompat/widget/ActionMenuView$OnMenuItemClickListener;
}
.end annotation
# static fields
.field static final GENERATED_ITEM_PADDING:I = 0x4
.field static final MIN_CELL_SIZE:I = 0x38
.field private static final TAG:Ljava/lang/String; = "ActionMenuView"
# instance fields
.field private mActionMenuPresenterCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback;
.field private mFormatItems:Z
.field private mFormatItemsWidth:I
.field private mGeneratedItemPadding:I
.field private mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
.field mMenuBuilderCallback:Landroidx/appcompat/view/menu/MenuBuilder$Callback;
.field private mMinCellSize:I
.field mOnMenuItemClickListener:Landroidx/appcompat/widget/ActionMenuView$OnMenuItemClickListener;
.field private mPopupContext:Landroid/content/Context;
.field private mPopupTheme:I
.field private mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
.field private mReserveOverflow:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/ActionMenuView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 2
invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/LinearLayoutCompat;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
const/4 p2, 0x0
invoke-virtual {p0, p2}, Landroidx/appcompat/widget/ActionMenuView;->setBaselineAligned(Z)V
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
const/high16 v1, 0x42600000 # 56.0f
mul-float v1, v1, v0
float-to-int v1, v1
iput v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mMinCellSize:I
const/high16 v1, 0x40800000 # 4.0f
mul-float v0, v0, v1
float-to-int v0, v0
iput v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mGeneratedItemPadding:I
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupContext:Landroid/content/Context;
iput p2, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupTheme:I
return-void
.end method
.method static measureChildForCells(Landroid/view/View;IIII)I
.locals 5
invoke-virtual {p0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v0
check-cast v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-static {p3}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v1
sub-int/2addr v1, p4
invoke-static {p3}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result p3
invoke-static {v1, p3}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p3
instance-of p4, p0, Landroidx/appcompat/view/menu/ActionMenuItemView;
if-eqz p4, :cond_0
move-object p4, p0
check-cast p4, Landroidx/appcompat/view/menu/ActionMenuItemView;
goto :goto_0
:cond_0
const/4 p4, 0x0
:goto_0
const/4 v1, 0x1
const/4 v2, 0x0
if-eqz p4, :cond_1
invoke-virtual {p4}, Landroidx/appcompat/view/menu/ActionMenuItemView;->hasText()Z
move-result p4
if-eqz p4, :cond_1
const/4 p4, 0x1
goto :goto_1
:cond_1
const/4 p4, 0x0
:goto_1
const/4 v3, 0x2
if-lez p2, :cond_5
if-eqz p4, :cond_2
if-lt p2, v3, :cond_5
:cond_2
mul-int p2, p2, p1
const/high16 v4, -0x80000000
invoke-static {p2, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p2
invoke-virtual {p0, p2, p3}, Landroid/view/View;->measure(II)V
invoke-virtual {p0}, Landroid/view/View;->getMeasuredWidth()I
move-result p2
div-int v4, p2, p1
rem-int/2addr p2, p1
if-eqz p2, :cond_3
add-int/lit8 v4, v4, 0x1
:cond_3
if-eqz p4, :cond_4
if-ge v4, v3, :cond_4
goto :goto_2
:cond_4
move v3, v4
goto :goto_2
:cond_5
const/4 v3, 0x0
:goto_2
iget-boolean p2, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-nez p2, :cond_6
if-eqz p4, :cond_6
goto :goto_3
:cond_6
const/4 v1, 0x0
:goto_3
iput-boolean v1, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expandable:Z
iput v3, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
mul-int p1, p1, v3
const/high16 p2, 0x40000000 # 2.0f
invoke-static {p1, p2}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p1
invoke-virtual {p0, p1, p3}, Landroid/view/View;->measure(II)V
return v3
.end method
.method private onMeasureExactFormat(II)V
.locals 34
move-object/from16 v0, p0
invoke-static/range {p2 .. p2}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result v1
invoke-static/range {p1 .. p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v2
invoke-static/range {p2 .. p2}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v3
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingLeft()I
move-result v4
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingRight()I
move-result v5
add-int/2addr v4, v5
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingTop()I
move-result v5
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingBottom()I
move-result v6
add-int/2addr v5, v6
const/4 v6, -0x2
move/from16 v7, p2
invoke-static {v7, v5, v6}, Landroidx/appcompat/widget/ActionMenuView;->getChildMeasureSpec(III)I
move-result v6
sub-int/2addr v2, v4
iget v4, v0, Landroidx/appcompat/widget/ActionMenuView;->mMinCellSize:I
div-int v4, v2, v4
iget v7, v0, Landroidx/appcompat/widget/ActionMenuView;->mMinCellSize:I
rem-int v7, v2, v7
const/4 v8, 0x0
if-nez v4, :cond_0
invoke-virtual {v0, v2, v8}, Landroidx/appcompat/widget/ActionMenuView;->setMeasuredDimension(II)V
return-void
:cond_0
iget v9, v0, Landroidx/appcompat/widget/ActionMenuView;->mMinCellSize:I
div-int/2addr v7, v4
add-int/2addr v9, v7
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getChildCount()I
move-result v7
move v14, v4
const/4 v4, 0x0
const/4 v10, 0x0
const/4 v12, 0x0
const/4 v13, 0x0
const/4 v15, 0x0
const/16 v16, 0x0
const-wide/16 v19, 0x0
:goto_0
if-ge v4, v7, :cond_8
invoke-virtual {v0, v4}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v11
invoke-virtual {v11}, Landroid/view/View;->getVisibility()I
move-result v8
move/from16 v21, v3
const/16 v3, 0x8
if-eq v8, v3, :cond_7
instance-of v3, v11, Landroidx/appcompat/view/menu/ActionMenuItemView;
add-int/lit8 v13, v13, 0x1
if-eqz v3, :cond_1
iget v8, v0, Landroidx/appcompat/widget/ActionMenuView;->mGeneratedItemPadding:I
move/from16 v22, v13
iget v13, v0, Landroidx/appcompat/widget/ActionMenuView;->mGeneratedItemPadding:I
move/from16 v23, v2
const/4 v2, 0x0
invoke-virtual {v11, v8, v2, v13, v2}, Landroid/view/View;->setPadding(IIII)V
goto :goto_1
:cond_1
move/from16 v23, v2
move/from16 v22, v13
const/4 v2, 0x0
:goto_1
invoke-virtual {v11}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v8
check-cast v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iput-boolean v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expanded:Z
iput v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->extraPixels:I
iput v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
iput-boolean v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expandable:Z
iput v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
iput v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
if-eqz v3, :cond_2
move-object v2, v11
check-cast v2, Landroidx/appcompat/view/menu/ActionMenuItemView;
invoke-virtual {v2}, Landroidx/appcompat/view/menu/ActionMenuItemView;->hasText()Z
move-result v2
if-eqz v2, :cond_2
const/4 v2, 0x1
goto :goto_2
:cond_2
const/4 v2, 0x0
:goto_2
iput-boolean v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
iget-boolean v2, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-eqz v2, :cond_3
const/4 v2, 0x1
goto :goto_3
:cond_3
move v2, v14
:goto_3
invoke-static {v11, v9, v2, v6, v5}, Landroidx/appcompat/widget/ActionMenuView;->measureChildForCells(Landroid/view/View;IIII)I
move-result v2
invoke-static {v15, v2}, Ljava/lang/Math;->max(II)I
move-result v3
iget-boolean v13, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expandable:Z
if-eqz v13, :cond_4
add-int/lit8 v16, v16, 0x1
:cond_4
iget-boolean v8, v8, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-eqz v8, :cond_5
const/4 v12, 0x1
:cond_5
sub-int/2addr v14, v2
invoke-virtual {v11}, Landroid/view/View;->getMeasuredHeight()I
move-result v8
invoke-static {v10, v8}, Ljava/lang/Math;->max(II)I
move-result v10
const/4 v8, 0x1
if-ne v2, v8, :cond_6
shl-int v2, v8, v4
move/from16 v24, v3
int-to-long v2, v2
or-long v2, v19, v2
move-wide/from16 v19, v2
goto :goto_4
:cond_6
move/from16 v24, v3
:goto_4
move/from16 v13, v22
move/from16 v15, v24
goto :goto_5
:cond_7
move/from16 v23, v2
:goto_5
add-int/lit8 v4, v4, 0x1
move/from16 v3, v21
move/from16 v2, v23
const/4 v8, 0x0
goto/16 :goto_0
:cond_8
move/from16 v23, v2
move/from16 v21, v3
const/4 v2, 0x2
if-eqz v12, :cond_9
if-ne v13, v2, :cond_9
const/4 v3, 0x1
goto :goto_6
:cond_9
const/4 v3, 0x0
:goto_6
const/4 v4, 0x0
:goto_7
const-wide/16 v24, 0x1
if-lez v16, :cond_13
if-lez v14, :cond_13
const v5, 0x7fffffff
const/4 v5, 0x0
const/4 v8, 0x0
const v11, 0x7fffffff
const-wide/16 v26, 0x0
:goto_8
if-ge v5, v7, :cond_c
invoke-virtual {v0, v5}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v22
invoke-virtual/range {v22 .. v22}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v22
move-object/from16 v2, v22
check-cast v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move/from16 v28, v4
iget-boolean v4, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expandable:Z
if-eqz v4, :cond_b
iget v4, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
if-ge v4, v11, :cond_a
iget v2, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
shl-long v26, v24, v5
move v11, v2
const/4 v8, 0x1
goto :goto_9
:cond_a
iget v2, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
if-ne v2, v11, :cond_b
shl-long v29, v24, v5
or-long v26, v26, v29
add-int/lit8 v8, v8, 0x1
:cond_b
:goto_9
add-int/lit8 v5, v5, 0x1
move/from16 v4, v28
const/4 v2, 0x2
goto :goto_8
:cond_c
move/from16 v28, v4
or-long v19, v19, v26
if-gt v8, v14, :cond_12
add-int/lit8 v11, v11, 0x1
const/4 v2, 0x0
:goto_a
if-ge v2, v7, :cond_11
invoke-virtual {v0, v2}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v5
check-cast v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move/from16 v31, v10
const/4 v8, 0x1
shl-int v10, v8, v2
move/from16 v32, v6
move/from16 v33, v7
int-to-long v6, v10
and-long v24, v26, v6
const-wide/16 v17, 0x0
cmp-long v8, v24, v17
if-nez v8, :cond_d
iget v4, v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
if-ne v4, v11, :cond_10
or-long v19, v19, v6
goto :goto_c
:cond_d
if-eqz v3, :cond_e
iget-boolean v6, v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
if-eqz v6, :cond_e
const/4 v6, 0x1
if-ne v14, v6, :cond_f
iget v7, v0, Landroidx/appcompat/widget/ActionMenuView;->mGeneratedItemPadding:I
add-int/2addr v7, v9
iget v8, v0, Landroidx/appcompat/widget/ActionMenuView;->mGeneratedItemPadding:I
const/4 v10, 0x0
invoke-virtual {v4, v7, v10, v8, v10}, Landroid/view/View;->setPadding(IIII)V
goto :goto_b
:cond_e
const/4 v6, 0x1
:cond_f
:goto_b
iget v4, v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
add-int/2addr v4, v6
iput v4, v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
iput-boolean v6, v5, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expanded:Z
add-int/lit8 v14, v14, -0x1
:cond_10
:goto_c
add-int/lit8 v2, v2, 0x1
move/from16 v10, v31
move/from16 v6, v32
move/from16 v7, v33
goto :goto_a
:cond_11
const/4 v2, 0x2
const/4 v4, 0x1
goto/16 :goto_7
:cond_12
:goto_d
move/from16 v32, v6
move/from16 v33, v7
move/from16 v31, v10
goto :goto_e
:cond_13
move/from16 v28, v4
goto :goto_d
:goto_e
if-nez v12, :cond_14
const/4 v2, 0x1
if-ne v13, v2, :cond_15
const/4 v3, 0x1
goto :goto_f
:cond_14
const/4 v2, 0x1
:cond_15
const/4 v3, 0x0
:goto_f
if-lez v14, :cond_23
const-wide/16 v4, 0x0
cmp-long v6, v19, v4
if-eqz v6, :cond_23
sub-int/2addr v13, v2
if-lt v14, v13, :cond_16
if-nez v3, :cond_16
if-le v15, v2, :cond_23
:cond_16
invoke-static/range {v19 .. v20}, Ljava/lang/Long;->bitCount(J)I
move-result v2
int-to-float v2, v2
if-nez v3, :cond_19
and-long v3, v19, v24
const/high16 v5, 0x3f000000 # 0.5f
const-wide/16 v6, 0x0
cmp-long v8, v3, v6
if-eqz v8, :cond_17
const/4 v3, 0x0
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v4
check-cast v4, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iget-boolean v4, v4, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
if-nez v4, :cond_18
sub-float/2addr v2, v5
goto :goto_10
:cond_17
const/4 v3, 0x0
:cond_18
:goto_10
add-int/lit8 v7, v33, -0x1
const/4 v4, 0x1
shl-int v6, v4, v7
int-to-long v10, v6
and-long v10, v19, v10
const-wide/16 v12, 0x0
cmp-long v4, v10, v12
if-eqz v4, :cond_1a
invoke-virtual {v0, v7}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v4
invoke-virtual {v4}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v4
check-cast v4, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iget-boolean v4, v4, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
if-nez v4, :cond_1a
sub-float/2addr v2, v5
goto :goto_11
:cond_19
const/4 v3, 0x0
:cond_1a
:goto_11
const/4 v4, 0x0
cmpl-float v4, v2, v4
if-lez v4, :cond_1b
mul-int v14, v14, v9
int-to-float v4, v14
div-float/2addr v4, v2
float-to-int v8, v4
goto :goto_12
:cond_1b
const/4 v8, 0x0
:goto_12
move/from16 v11, v28
move/from16 v2, v33
const/4 v4, 0x0
:goto_13
if-ge v4, v2, :cond_22
const/4 v5, 0x1
shl-int v6, v5, v4
int-to-long v6, v6
and-long v6, v19, v6
const-wide/16 v12, 0x0
cmp-long v10, v6, v12
if-eqz v10, :cond_20
invoke-virtual {v0, v4}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v6
invoke-virtual {v6}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v7
check-cast v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
instance-of v6, v6, Landroidx/appcompat/view/menu/ActionMenuItemView;
if-eqz v6, :cond_1d
iput v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->extraPixels:I
iput-boolean v5, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expanded:Z
if-nez v4, :cond_1c
iget-boolean v5, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->preventEdgeOffset:Z
if-nez v5, :cond_1c
neg-int v5, v8
const/4 v6, 0x2
div-int/2addr v5, v6
iput v5, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
goto :goto_14
:cond_1c
const/4 v6, 0x2
:goto_14
const/4 v5, 0x1
:goto_15
const/4 v11, 0x1
goto :goto_16
:cond_1d
const/4 v6, 0x2
iget-boolean v5, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-eqz v5, :cond_1e
iput v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->extraPixels:I
const/4 v5, 0x1
iput-boolean v5, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expanded:Z
neg-int v10, v8
div-int/2addr v10, v6
iput v10, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
goto :goto_15
:cond_1e
const/4 v5, 0x1
if-eqz v4, :cond_1f
div-int/lit8 v10, v8, 0x2
iput v10, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
:cond_1f
add-int/lit8 v10, v2, -0x1
if-eq v4, v10, :cond_21
div-int/lit8 v10, v8, 0x2
iput v10, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
goto :goto_16
:cond_20
const/4 v6, 0x2
:cond_21
:goto_16
add-int/lit8 v4, v4, 0x1
goto :goto_13
:cond_22
move/from16 v28, v11
goto :goto_17
:cond_23
move/from16 v2, v33
const/4 v3, 0x0
:goto_17
const/high16 v4, 0x40000000 # 2.0f
if-eqz v28, :cond_25
:goto_18
if-ge v3, v2, :cond_25
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v5
invoke-virtual {v5}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v6
check-cast v6, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iget-boolean v7, v6, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->expanded:Z
if-eqz v7, :cond_24
iget v7, v6, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->cellsUsed:I
mul-int v7, v7, v9
iget v6, v6, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->extraPixels:I
add-int/2addr v7, v6
invoke-static {v7, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result v6
move/from16 v7, v32
invoke-virtual {v5, v6, v7}, Landroid/view/View;->measure(II)V
goto :goto_19
:cond_24
move/from16 v7, v32
:goto_19
add-int/lit8 v3, v3, 0x1
move/from16 v32, v7
goto :goto_18
:cond_25
if-eq v1, v4, :cond_26
move/from16 v2, v23
move/from16 v1, v31
goto :goto_1a
:cond_26
move/from16 v1, v21
move/from16 v2, v23
:goto_1a
invoke-virtual {v0, v2, v1}, Landroidx/appcompat/widget/ActionMenuView;->setMeasuredDimension(II)V
return-void
.end method
# virtual methods
.method protected checkLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Z
.locals 0
if-eqz p1, :cond_0
instance-of p1, p1, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
if-eqz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public dismissPopupMenus()V
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->dismissPopupMenus()Z
:cond_0
return-void
.end method
.method public dispatchPopulateAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)Z
.locals 0
const/4 p1, 0x0
return p1
.end method
.method protected bridge synthetic generateDefaultLayoutParams()Landroid/view/ViewGroup$LayoutParams;
.locals 1
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->generateDefaultLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object v0
return-object v0
.end method
.method protected generateDefaultLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
.locals 2
new-instance v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
const/4 v1, -0x2
invoke-direct {v0, v1, v1}, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;-><init>(II)V
const/16 v1, 0x10
iput v1, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->gravity:I
return-object v0
.end method
.method protected bridge synthetic generateDefaultLayoutParams()Landroidx/appcompat/widget/LinearLayoutCompat$LayoutParams;
.locals 1
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->generateDefaultLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object v0
return-object v0
.end method
.method public bridge synthetic generateLayoutParams(Landroid/util/AttributeSet;)Landroid/view/ViewGroup$LayoutParams;
.locals 0
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuView;->generateLayoutParams(Landroid/util/AttributeSet;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
return-object p1
.end method
.method protected bridge synthetic generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroid/view/ViewGroup$LayoutParams;
.locals 0
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuView;->generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
return-object p1
.end method
.method public generateLayoutParams(Landroid/util/AttributeSet;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
.locals 2
new-instance v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1, p1}, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
return-object v0
.end method
.method protected generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
.locals 1
if-eqz p1, :cond_2
instance-of v0, p1, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
if-eqz v0, :cond_0
new-instance v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
check-cast p1, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-direct {v0, p1}, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;-><init>(Landroidx/appcompat/widget/ActionMenuView$LayoutParams;)V
goto :goto_0
:cond_0
new-instance v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-direct {v0, p1}, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;-><init>(Landroid/view/ViewGroup$LayoutParams;)V
:goto_0
iget p1, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->gravity:I
if-gtz p1, :cond_1
const/16 p1, 0x10
iput p1, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->gravity:I
:cond_1
return-object v0
:cond_2
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->generateDefaultLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
return-object p1
.end method
.method public bridge synthetic generateLayoutParams(Landroid/util/AttributeSet;)Landroidx/appcompat/widget/LinearLayoutCompat$LayoutParams;
.locals 0
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuView;->generateLayoutParams(Landroid/util/AttributeSet;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
return-object p1
.end method
.method protected bridge synthetic generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroidx/appcompat/widget/LinearLayoutCompat$LayoutParams;
.locals 0
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuView;->generateLayoutParams(Landroid/view/ViewGroup$LayoutParams;)Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object p1
return-object p1
.end method
.method public generateOverflowButtonLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
.locals 2
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->generateDefaultLayoutParams()Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
move-result-object v0
const/4 v1, 0x1
iput-boolean v1, v0, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
return-object v0
.end method
.method public getMenu()Landroid/view/Menu;
.locals 3
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-nez v0, :cond_1
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getContext()Landroid/content/Context;
move-result-object v0
new-instance v1, Landroidx/appcompat/view/menu/MenuBuilder;
invoke-direct {v1, v0}, Landroidx/appcompat/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
new-instance v2, Landroidx/appcompat/widget/ActionMenuView$MenuBuilderCallback;
invoke-direct {v2, p0}, Landroidx/appcompat/widget/ActionMenuView$MenuBuilderCallback;-><init>(Landroidx/appcompat/widget/ActionMenuView;)V
invoke-virtual {v1, v2}, Landroidx/appcompat/view/menu/MenuBuilder;->setCallback(Landroidx/appcompat/view/menu/MenuBuilder$Callback;)V
new-instance v1, Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-direct {v1, v0}, Landroidx/appcompat/widget/ActionMenuPresenter;-><init>(Landroid/content/Context;)V
iput-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroidx/appcompat/widget/ActionMenuPresenter;->setReserveOverflow(Z)V
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mActionMenuPresenterCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback;
if-eqz v1, :cond_0
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mActionMenuPresenterCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback;
goto :goto_0
:cond_0
new-instance v1, Landroidx/appcompat/widget/ActionMenuView$ActionMenuPresenterCallback;
invoke-direct {v1}, Landroidx/appcompat/widget/ActionMenuView$ActionMenuPresenterCallback;-><init>()V
:goto_0
invoke-virtual {v0, v1}, Landroidx/appcompat/widget/ActionMenuPresenter;->setCallback(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)V
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
iget-object v2, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupContext:Landroid/content/Context;
invoke-virtual {v0, v1, v2}, Landroidx/appcompat/view/menu/MenuBuilder;->addMenuPresenter(Landroidx/appcompat/view/menu/MenuPresenter;Landroid/content/Context;)V
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0, p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->setMenuView(Landroidx/appcompat/widget/ActionMenuView;)V
:cond_1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object v0
.end method
.method public getOverflowIcon()Landroid/graphics/drawable/Drawable;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getMenu()Landroid/view/Menu;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->getOverflowIcon()Landroid/graphics/drawable/Drawable;
move-result-object v0
return-object v0
.end method
.method public getPopupTheme()I
.locals 1
iget v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupTheme:I
return v0
.end method
.method public getWindowAnimations()I
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
const/4 v0, 0x0
return v0
.end method
.method protected hasSupportDividerBeforeChildAt(I)Z
.locals 4
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
const/4 v0, 0x0
if-nez p1, :cond_0
return v0
:cond_0
add-int/lit8 v1, p1, -0x1
invoke-virtual {p0, v1}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v1
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v2
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getChildCount()I
move-result v3
if-ge p1, v3, :cond_1
instance-of v3, v1, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;
if-eqz v3, :cond_1
check-cast v1, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;
invoke-interface {v1}, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;->needsDividerAfter()Z
move-result v1
or-int/2addr v0, v1
:cond_1
if-lez p1, :cond_2
instance-of p1, v2, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;
if-eqz p1, :cond_2
check-cast v2, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;
invoke-interface {v2}, Landroidx/appcompat/widget/ActionMenuView$ActionMenuChildView;->needsDividerBefore()Z
move-result p1
or-int/2addr v0, p1
:cond_2
return v0
.end method
.method public hideOverflowMenu()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->hideOverflowMenu()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public initialize(Landroidx/appcompat/view/menu/MenuBuilder;)V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-void
.end method
.method public invokeItem(Landroidx/appcompat/view/menu/MenuItemImpl;)Z
.locals 2
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
const/4 v1, 0x0
invoke-virtual {v0, p1, v1}, Landroidx/appcompat/view/menu/MenuBuilder;->performItemAction(Landroid/view/MenuItem;I)Z
move-result p1
return p1
.end method
.method public isOverflowMenuShowPending()Z
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->isOverflowMenuShowPending()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public isOverflowMenuShowing()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public isOverflowReserved()Z
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mReserveOverflow:Z
return v0
.end method
.method public onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 1
invoke-super {p0, p1}, Landroidx/appcompat/widget/LinearLayoutCompat;->onConfigurationChanged(Landroid/content/res/Configuration;)V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
const/4 v0, 0x0
invoke-virtual {p1, v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->updateMenuView(Z)V
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->isOverflowMenuShowing()Z
move-result p1
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->hideOverflowMenu()Z
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->showOverflowMenu()Z
:cond_0
return-void
.end method
.method public onDetachedFromWindow()V
.locals 0
invoke-super {p0}, Landroidx/appcompat/widget/LinearLayoutCompat;->onDetachedFromWindow()V
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->dismissPopupMenus()V
return-void
.end method
.method protected onLayout(ZIIII)V
.locals 17
move-object/from16 v0, p0
iget-boolean v1, v0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
if-nez v1, :cond_0
invoke-super/range {p0 .. p5}, Landroidx/appcompat/widget/LinearLayoutCompat;->onLayout(ZIIII)V
return-void
:cond_0
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getChildCount()I
move-result v1
sub-int v2, p5, p3
div-int/lit8 v2, v2, 0x2
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getDividerWidth()I
move-result v3
sub-int v4, p4, p2
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingRight()I
move-result v5
sub-int v5, v4, v5
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingLeft()I
move-result v6
sub-int/2addr v5, v6
invoke-static/range {p0 .. p0}, Landroidx/appcompat/widget/ViewUtils;->isLayoutRtl(Landroid/view/View;)Z
move-result v6
move v10, v5
const/4 v5, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
:goto_0
const/16 v11, 0x8
const/4 v12, 0x1
if-ge v5, v1, :cond_5
invoke-virtual {v0, v5}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v13
invoke-virtual {v13}, Landroid/view/View;->getVisibility()I
move-result v14
if-eq v14, v11, :cond_4
invoke-virtual {v13}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v11
check-cast v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iget-boolean v14, v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-eqz v14, :cond_3
invoke-virtual {v13}, Landroid/view/View;->getMeasuredWidth()I
move-result v8
invoke-virtual {v0, v5}, Landroidx/appcompat/widget/ActionMenuView;->hasSupportDividerBeforeChildAt(I)Z
move-result v14
if-eqz v14, :cond_1
add-int/2addr v8, v3
:cond_1
invoke-virtual {v13}, Landroid/view/View;->getMeasuredHeight()I
move-result v14
if-eqz v6, :cond_2
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingLeft()I
move-result v15
iget v11, v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
add-int/2addr v15, v11
add-int v11, v15, v8
goto :goto_1
:cond_2
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getWidth()I
move-result v15
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingRight()I
move-result v16
sub-int v15, v15, v16
iget v11, v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
sub-int v11, v15, v11
sub-int v15, v11, v8
:goto_1
div-int/lit8 v16, v14, 0x2
sub-int v7, v2, v16
add-int/2addr v14, v7
invoke-virtual {v13, v15, v7, v11, v14}, Landroid/view/View;->layout(IIII)V
sub-int/2addr v10, v8
const/4 v8, 0x1
goto :goto_2
:cond_3
invoke-virtual {v13}, Landroid/view/View;->getMeasuredWidth()I
move-result v7
iget v12, v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
add-int/2addr v7, v12
iget v11, v11, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
add-int/2addr v7, v11
sub-int/2addr v10, v7
invoke-virtual {v0, v5}, Landroidx/appcompat/widget/ActionMenuView;->hasSupportDividerBeforeChildAt(I)Z
add-int/lit8 v9, v9, 0x1
:cond_4
:goto_2
add-int/lit8 v5, v5, 0x1
goto :goto_0
:cond_5
if-ne v1, v12, :cond_6
if-nez v8, :cond_6
const/4 v3, 0x0
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I
move-result v3
invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I
move-result v5
div-int/lit8 v4, v4, 0x2
div-int/lit8 v6, v3, 0x2
sub-int/2addr v4, v6
div-int/lit8 v6, v5, 0x2
sub-int/2addr v2, v6
add-int/2addr v3, v4
add-int/2addr v5, v2
invoke-virtual {v1, v4, v2, v3, v5}, Landroid/view/View;->layout(IIII)V
return-void
:cond_6
xor-int/lit8 v3, v8, 0x1
sub-int/2addr v9, v3
if-lez v9, :cond_7
div-int v7, v10, v9
const/4 v3, 0x0
goto :goto_3
:cond_7
const/4 v3, 0x0
const/4 v7, 0x0
:goto_3
invoke-static {v3, v7}, Ljava/lang/Math;->max(II)I
move-result v4
if-eqz v6, :cond_a
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getWidth()I
move-result v5
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingRight()I
move-result v6
sub-int/2addr v5, v6
:goto_4
if-ge v3, v1, :cond_9
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v6
invoke-virtual {v6}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v7
check-cast v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-virtual {v6}, Landroid/view/View;->getVisibility()I
move-result v8
if-eq v8, v11, :cond_8
iget-boolean v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-nez v8, :cond_8
iget v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
sub-int/2addr v5, v8
invoke-virtual {v6}, Landroid/view/View;->getMeasuredWidth()I
move-result v8
invoke-virtual {v6}, Landroid/view/View;->getMeasuredHeight()I
move-result v9
div-int/lit8 v10, v9, 0x2
sub-int v10, v2, v10
sub-int v12, v5, v8
add-int/2addr v9, v10
invoke-virtual {v6, v12, v10, v5, v9}, Landroid/view/View;->layout(IIII)V
iget v6, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
add-int/2addr v8, v6
add-int/2addr v8, v4
sub-int/2addr v5, v8
:cond_8
add-int/lit8 v3, v3, 0x1
goto :goto_4
:cond_9
return-void
:cond_a
invoke-virtual/range {p0 .. p0}, Landroidx/appcompat/widget/ActionMenuView;->getPaddingLeft()I
move-result v5
:goto_5
if-ge v3, v1, :cond_c
invoke-virtual {v0, v3}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v6
invoke-virtual {v6}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v7
check-cast v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
invoke-virtual {v6}, Landroid/view/View;->getVisibility()I
move-result v8
if-eq v8, v11, :cond_b
iget-boolean v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->isOverflowButton:Z
if-nez v8, :cond_b
iget v8, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
add-int/2addr v5, v8
invoke-virtual {v6}, Landroid/view/View;->getMeasuredWidth()I
move-result v8
invoke-virtual {v6}, Landroid/view/View;->getMeasuredHeight()I
move-result v9
div-int/lit8 v10, v9, 0x2
sub-int v10, v2, v10
add-int v12, v5, v8
add-int/2addr v9, v10
invoke-virtual {v6, v5, v10, v12, v9}, Landroid/view/View;->layout(IIII)V
iget v6, v7, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
add-int/2addr v8, v6
add-int/2addr v8, v4
add-int/2addr v5, v8
:cond_b
add-int/lit8 v3, v3, 0x1
goto :goto_5
:cond_c
return-void
.end method
.method protected onMeasure(II)V
.locals 5
iget-boolean v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I
move-result v1
const/4 v2, 0x1
const/4 v3, 0x0
const/high16 v4, 0x40000000 # 2.0f
if-ne v1, v4, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
iput-boolean v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
iget-boolean v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
if-eq v0, v1, :cond_1
iput v3, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItemsWidth:I
:cond_1
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v0
iget-boolean v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
if-eqz v1, :cond_2
iget-object v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
if-eqz v1, :cond_2
iget v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItemsWidth:I
if-eq v0, v1, :cond_2
iput v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItemsWidth:I
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
invoke-virtual {v0, v2}, Landroidx/appcompat/view/menu/MenuBuilder;->onItemsChanged(Z)V
:cond_2
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getChildCount()I
move-result v0
iget-boolean v1, p0, Landroidx/appcompat/widget/ActionMenuView;->mFormatItems:Z
if-eqz v1, :cond_3
if-lez v0, :cond_3
invoke-direct {p0, p1, p2}, Landroidx/appcompat/widget/ActionMenuView;->onMeasureExactFormat(II)V
return-void
:cond_3
const/4 v1, 0x0
:goto_1
if-ge v1, v0, :cond_4
invoke-virtual {p0, v1}, Landroidx/appcompat/widget/ActionMenuView;->getChildAt(I)Landroid/view/View;
move-result-object v2
invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
move-result-object v2
check-cast v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;
iput v3, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->rightMargin:I
iput v3, v2, Landroidx/appcompat/widget/ActionMenuView$LayoutParams;->leftMargin:I
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_4
invoke-super {p0, p1, p2}, Landroidx/appcompat/widget/LinearLayoutCompat;->onMeasure(II)V
return-void
.end method
.method public peekMenu()Landroidx/appcompat/view/menu/MenuBuilder;
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
return-object v0
.end method
.method public setExpandedActionViewsExclusive(Z)V
.locals 1
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->setExpandedActionViewsExclusive(Z)V
return-void
.end method
.method public setMenuCallbacks(Landroidx/appcompat/view/menu/MenuPresenter$Callback;Landroidx/appcompat/view/menu/MenuBuilder$Callback;)V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mActionMenuPresenterCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback;
iput-object p2, p0, Landroidx/appcompat/widget/ActionMenuView;->mMenuBuilderCallback:Landroidx/appcompat/view/menu/MenuBuilder$Callback;
return-void
.end method
.method public setOnMenuItemClickListener(Landroidx/appcompat/widget/ActionMenuView$OnMenuItemClickListener;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mOnMenuItemClickListener:Landroidx/appcompat/widget/ActionMenuView$OnMenuItemClickListener;
return-void
.end method
.method public setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
.locals 1
.param p1 # Landroid/graphics/drawable/Drawable;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getMenu()Landroid/view/Menu;
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionMenuPresenter;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
return-void
.end method
.method public setOverflowReserved(Z)V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iput-boolean p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mReserveOverflow:Z
return-void
.end method
.method public setPopupTheme(I)V
.locals 2
.param p1 # I
.annotation build Landroidx/annotation/StyleRes;
.end annotation
.end param
iget v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupTheme:I
if-eq v0, p1, :cond_1
iput p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupTheme:I
if-nez p1, :cond_0
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getContext()Landroid/content/Context;
move-result-object p1
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupContext:Landroid/content/Context;
return-void
:cond_0
new-instance v0, Landroid/view/ContextThemeWrapper;
invoke-virtual {p0}, Landroidx/appcompat/widget/ActionMenuView;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1, p1}, Landroid/view/ContextThemeWrapper;-><init>(Landroid/content/Context;I)V
iput-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPopupContext:Landroid/content/Context;
:cond_1
return-void
.end method
.method public setPresenter(Landroidx/appcompat/widget/ActionMenuPresenter;)V
.locals 0
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
iput-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
iget-object p1, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {p1, p0}, Landroidx/appcompat/widget/ActionMenuPresenter;->setMenuView(Landroidx/appcompat/widget/ActionMenuView;)V
return-void
.end method
.method public showOverflowMenu()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
if-eqz v0, :cond_0
iget-object v0, p0, Landroidx/appcompat/widget/ActionMenuView;->mPresenter:Landroidx/appcompat/widget/ActionMenuPresenter;
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionMenuPresenter;->showOverflowMenu()Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method