ForegroundLinearLayout.smali
.class public Lcom/google/android/material/internal/ForegroundLinearLayout;
.super Landroidx/appcompat/widget/LinearLayoutCompat;
.source "ForegroundLinearLayout.java"
# instance fields
.field private foreground:Landroid/graphics/drawable/Drawable;
.field foregroundBoundsChanged:Z
.field private foregroundGravity:I
.field protected mForegroundInPadding:Z
.field private final overlayBounds:Landroid/graphics/Rect;
.field private final selfBounds:Landroid/graphics/Rect;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.param p1, "context" # Landroid/content/Context;
.line 53
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/google/android/material/internal/ForegroundLinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 54
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 4
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.line 57
const/4 v0, 0x0
invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/internal/ForegroundLinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 58
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.registers 12
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.param p3, "defStyle" # I
.line 61
invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/LinearLayoutCompat;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 42
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->selfBounds:Landroid/graphics/Rect;
.line 44
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->overlayBounds:Landroid/graphics/Rect;
.line 46
const/16 v0, 0x77
iput v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
.line 48
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->mForegroundInPadding:Z
.line 50
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
.line 63
sget-object v4, Lcom/google/android/material/R$styleable;->ForegroundLinearLayout:[I
new-array v7, v1, [I
.line 64
const/4 v6, 0x0
move-object v2, p1
move-object v3, p2
move v5, p3
invoke-static/range {v2 .. v7}, Lcom/google/android/material/internal/ThemeEnforcement;->obtainStyledAttributes(Landroid/content/Context;Landroid/util/AttributeSet;[III[I)Landroid/content/res/TypedArray;
move-result-object v1
.line 67
.local v1, "a":Landroid/content/res/TypedArray;
sget v2, Lcom/google/android/material/R$styleable;->ForegroundLinearLayout_android_foregroundGravity:I
iget v3, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
.line 68
invoke-virtual {v1, v2, v3}, Landroid/content/res/TypedArray;->getInt(II)I
move-result v2
iput v2, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
.line 70
sget v2, Lcom/google/android/material/R$styleable;->ForegroundLinearLayout_android_foreground:I
invoke-virtual {v1, v2}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v2
.line 71
.local v2, "d":Landroid/graphics/drawable/Drawable;
if-eqz v2, :cond_3c
.line 72
invoke-virtual {p0, v2}, Lcom/google/android/material/internal/ForegroundLinearLayout;->setForeground(Landroid/graphics/drawable/Drawable;)V
.line 75
:cond_3c
sget v3, Lcom/google/android/material/R$styleable;->ForegroundLinearLayout_foregroundInsidePadding:I
.line 76
invoke-virtual {v1, v3, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
move-result v0
iput-boolean v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->mForegroundInPadding:Z
.line 78
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
.line 79
return-void
.end method
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.registers 11
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 202
invoke-super {p0, p1}, Landroidx/appcompat/widget/LinearLayoutCompat;->draw(Landroid/graphics/Canvas;)V
.line 204
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_59
.line 205
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
.line 207
.local v0, "foreground":Landroid/graphics/drawable/Drawable;
iget-boolean v1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
if-eqz v1, :cond_56
.line 208
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
.line 209
iget-object v2, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->selfBounds:Landroid/graphics/Rect;
.line 210
.local v2, "selfBounds":Landroid/graphics/Rect;
iget-object v3, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->overlayBounds:Landroid/graphics/Rect;
.line 212
.local v3, "overlayBounds":Landroid/graphics/Rect;
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getRight()I
move-result v4
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getLeft()I
move-result v5
sub-int/2addr v4, v5
.line 213
.local v4, "w":I
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getBottom()I
move-result v5
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getTop()I
move-result v6
sub-int/2addr v5, v6
.line 215
.local v5, "h":I
iget-boolean v6, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->mForegroundInPadding:Z
if-eqz v6, :cond_2e
.line 216
invoke-virtual {v2, v1, v1, v4, v5}, Landroid/graphics/Rect;->set(IIII)V
goto :goto_46
.line 218
:cond_2e
nop
.line 219
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getPaddingLeft()I
move-result v1
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getPaddingTop()I
move-result v6
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getPaddingRight()I
move-result v7
sub-int v7, v4, v7
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getPaddingBottom()I
move-result v8
sub-int v8, v5, v8
.line 218
invoke-virtual {v2, v1, v6, v7, v8}, Landroid/graphics/Rect;->set(IIII)V
.line 222
:goto_46
iget v1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
.line 224
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
move-result v6
.line 225
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
move-result v7
.line 222
invoke-static {v1, v6, v7, v2, v3}, Landroid/view/Gravity;->apply(IIILandroid/graphics/Rect;Landroid/graphics/Rect;)V
.line 228
invoke-virtual {v0, v3}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V
.line 231
.end local v2 # "selfBounds":Landroid/graphics/Rect;
.end local v3 # "overlayBounds":Landroid/graphics/Rect;
.end local v4 # "w":I
.end local v5 # "h":I
:cond_56
invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V
.line 233
.end local v0 # "foreground":Landroid/graphics/drawable/Drawable;
:cond_59
return-void
.end method
.method public drawableHotspotChanged(FF)V
.registers 4
.param p1, "x" # F
.param p2, "y" # F
.line 239
invoke-super {p0, p1, p2}, Landroidx/appcompat/widget/LinearLayoutCompat;->drawableHotspotChanged(FF)V
.line 240
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_a
.line 241
invoke-virtual {v0, p1, p2}, Landroid/graphics/drawable/Drawable;->setHotspot(FF)V
.line 243
:cond_a
return-void
.end method
.method protected drawableStateChanged()V
.registers 3
.line 136
invoke-super {p0}, Landroidx/appcompat/widget/LinearLayoutCompat;->drawableStateChanged()V
.line 137
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_16
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->isStateful()Z
move-result v0
if-eqz v0, :cond_16
.line 138
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getDrawableState()[I
move-result-object v1
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setState([I)Z
.line 140
:cond_16
return-void
.end method
.method public getForeground()Landroid/graphics/drawable/Drawable;
.registers 2
.line 185
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
return-object v0
.end method
.method public getForegroundGravity()I
.registers 2
.line 89
iget v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
return v0
.end method
.method public jumpDrawablesToCurrentState()V
.registers 2
.line 128
invoke-super {p0}, Landroidx/appcompat/widget/LinearLayoutCompat;->jumpDrawablesToCurrentState()V
.line 129
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_a
.line 130
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->jumpToCurrentState()V
.line 132
:cond_a
return-void
.end method
.method protected onLayout(ZIIII)V
.registers 7
.param p1, "changed" # Z
.param p2, "left" # I
.param p3, "top" # I
.param p4, "right" # I
.param p5, "bottom" # I
.line 190
invoke-super/range {p0 .. p5}, Landroidx/appcompat/widget/LinearLayoutCompat;->onLayout(ZIIII)V
.line 191
iget-boolean v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
or-int/2addr v0, p1
iput-boolean v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
.line 192
return-void
.end method
.method protected onSizeChanged(IIII)V
.registers 6
.param p1, "w" # I
.param p2, "h" # I
.param p3, "oldw" # I
.param p4, "oldh" # I
.line 196
invoke-super {p0, p1, p2, p3, p4}, Landroidx/appcompat/widget/LinearLayoutCompat;->onSizeChanged(IIII)V
.line 197
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundBoundsChanged:Z
.line 198
return-void
.end method
.method public setForeground(Landroid/graphics/drawable/Drawable;)V
.registers 4
.param p1, "drawable" # Landroid/graphics/drawable/Drawable;
.line 151
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eq v0, p1, :cond_40
.line 152
if-eqz v0, :cond_f
.line 153
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
.line 154
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
invoke-virtual {p0, v0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->unscheduleDrawable(Landroid/graphics/drawable/Drawable;)V
.line 157
:cond_f
iput-object p1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
.line 159
if-eqz p1, :cond_36
.line 160
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->setWillNotDraw(Z)V
.line 161
invoke-virtual {p1, p0}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V
.line 162
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
move-result v0
if-eqz v0, :cond_27
.line 163
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->getDrawableState()[I
move-result-object v0
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
.line 165
:cond_27
iget v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
const/16 v1, 0x77
if-ne v0, v1, :cond_3a
.line 166
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 167
.local v0, "padding":Landroid/graphics/Rect;
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->getPadding(Landroid/graphics/Rect;)Z
.line 168
.end local v0 # "padding":Landroid/graphics/Rect;
goto :goto_3a
.line 170
:cond_36
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->setWillNotDraw(Z)V
.line 172
:cond_3a
:goto_3a
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->requestLayout()V
.line 173
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->invalidate()V
.line 175
:cond_40
return-void
.end method
.method public setForegroundGravity(I)V
.registers 4
.param p1, "foregroundGravity" # I
.line 100
iget v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
if-eq v0, p1, :cond_2b
.line 101
const v0, 0x800007
and-int/2addr v0, p1
if-nez v0, :cond_e
.line 102
const v0, 0x800003
or-int/2addr p1, v0
.line 105
:cond_e
and-int/lit8 v0, p1, 0x70
if-nez v0, :cond_14
.line 106
or-int/lit8 p1, p1, 0x30
.line 109
:cond_14
iput p1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foregroundGravity:I
.line 111
const/16 v0, 0x77
if-ne p1, v0, :cond_28
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-eqz v0, :cond_28
.line 112
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 113
.local v0, "padding":Landroid/graphics/Rect;
iget-object v1, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
invoke-virtual {v1, v0}, Landroid/graphics/drawable/Drawable;->getPadding(Landroid/graphics/Rect;)Z
.line 116
.end local v0 # "padding":Landroid/graphics/Rect;
:cond_28
invoke-virtual {p0}, Lcom/google/android/material/internal/ForegroundLinearLayout;->requestLayout()V
.line 118
:cond_2b
return-void
.end method
.method protected verifyDrawable(Landroid/graphics/drawable/Drawable;)Z
.registers 3
.param p1, "who" # Landroid/graphics/drawable/Drawable;
.line 122
invoke-super {p0, p1}, Landroidx/appcompat/widget/LinearLayoutCompat;->verifyDrawable(Landroid/graphics/drawable/Drawable;)Z
move-result v0
if-nez v0, :cond_d
iget-object v0, p0, Lcom/google/android/material/internal/ForegroundLinearLayout;->foreground:Landroid/graphics/drawable/Drawable;
if-ne p1, v0, :cond_b
goto :goto_d
:cond_b
const/4 v0, 0x0
goto :goto_e
:cond_d
:goto_d
const/4 v0, 0x1
:goto_e
return v0
.end method