apkfuckery/com.discord/smali/androidx/browser/browseractions/BrowserActionsFallbackMenuView.smali
2019-02-04 21:29:01 +01:00

89 lines
2.7 KiB
Smali

.class public Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;
.super Landroid/widget/LinearLayout;
.source "BrowserActionsFallbackMenuView.java"
# annotations
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
# instance fields
.field private final mBrowserActionsMenuMaxWidthPx:I
.field private final mBrowserActionsMenuMinPaddingPx:I
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 0
invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
invoke-virtual {p0}, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->getResources()Landroid/content/res/Resources;
move-result-object p1
sget p2, Landroidx/browser/R$dimen;->browser_actions_context_menu_min_padding:I
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I
move-result p1
iput p1, p0, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->mBrowserActionsMenuMinPaddingPx:I
invoke-virtual {p0}, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->getResources()Landroid/content/res/Resources;
move-result-object p1
sget p2, Landroidx/browser/R$dimen;->browser_actions_context_menu_max_width:I
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I
move-result p1
iput p1, p0, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->mBrowserActionsMenuMaxWidthPx:I
return-void
.end method
# virtual methods
.method protected onMeasure(II)V
.locals 1
invoke-virtual {p0}, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->getResources()Landroid/content/res/Resources;
move-result-object p1
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object p1
iget p1, p1, Landroid/util/DisplayMetrics;->widthPixels:I
iget v0, p0, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->mBrowserActionsMenuMinPaddingPx:I
mul-int/lit8 v0, v0, 0x2
sub-int/2addr p1, v0
iget v0, p0, Landroidx/browser/browseractions/BrowserActionsFallbackMenuView;->mBrowserActionsMenuMaxWidthPx:I
invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I
move-result p1
const/high16 v0, 0x40000000 # 2.0f
invoke-static {p1, v0}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
move-result p1
invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V
return-void
.end method