.class public Landroidx/appcompat/widget/c0$d;
.super Landroidx/appcompat/widget/s0;
.source ""

# interfaces
.implements Landroidx/appcompat/widget/c0$f;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroidx/appcompat/widget/c0;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "d"
.end annotation


# instance fields
.field public S:Ljava/lang/CharSequence;

.field public T:Landroid/widget/ListAdapter;

.field public final U:Landroid/graphics/Rect;

.field public V:I

.field public final synthetic W:Landroidx/appcompat/widget/c0;


# direct methods
.method public constructor <init>(Landroidx/appcompat/widget/c0;Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 6

    iput-object p1, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p2, p3, p4, v0}, Landroidx/appcompat/widget/s0;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    .line 2
    new-instance p2, Landroid/graphics/Rect;

    invoke-direct {p2}, Landroid/graphics/Rect;-><init>()V

    iput-object p2, p0, Landroidx/appcompat/widget/c0$d;->U:Landroid/graphics/Rect;

    .line 3
    iput-object p1, p0, Landroidx/appcompat/widget/s0;->F:Landroid/view/View;

    const/4 p2, 0x1

    .line 4
    invoke-virtual {p0, p2}, Landroidx/appcompat/widget/s0;->r(Z)V

    new-instance p2, Landroidx/appcompat/widget/c0$d$a;

    invoke-direct {p2, p0, p1}, Landroidx/appcompat/widget/c0$d$a;-><init>(Landroidx/appcompat/widget/c0$d;Landroidx/appcompat/widget/c0;)V

    .line 5
    iput-object p2, p0, Landroidx/appcompat/widget/s0;->G:Landroid/widget/AdapterView$OnItemClickListener;

    return-void
.end method


# virtual methods
.method public g(Ljava/lang/CharSequence;)V
    .registers 2

    iput-object p1, p0, Landroidx/appcompat/widget/c0$d;->S:Ljava/lang/CharSequence;

    return-void
.end method

.method public j(I)V
    .registers 2

    iput p1, p0, Landroidx/appcompat/widget/c0$d;->V:I

    return-void
.end method

.method public l(II)V
    .registers 6

    invoke-virtual {p0}, Landroidx/appcompat/widget/s0;->b()Z

    move-result v0

    invoke-virtual {p0}, Landroidx/appcompat/widget/c0$d;->s()V

    .line 1
    iget-object v1, p0, Landroidx/appcompat/widget/s0;->P:Landroid/widget/PopupWindow;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Landroid/widget/PopupWindow;->setInputMethodMode(I)V

    .line 2
    invoke-virtual {p0}, Landroidx/appcompat/widget/s0;->show()V

    .line 3
    iget-object v1, p0, Landroidx/appcompat/widget/s0;->t:Landroidx/appcompat/widget/n0;

    const/4 v2, 0x1

    .line 4
    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setChoiceMode(I)V

    invoke-virtual {v1, p1}, Landroid/widget/ListView;->setTextDirection(I)V

    invoke-virtual {v1, p2}, Landroid/widget/ListView;->setTextAlignment(I)V

    iget-object p1, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {p1}, Landroid/widget/Spinner;->getSelectedItemPosition()I

    move-result p1

    .line 5
    iget-object p2, p0, Landroidx/appcompat/widget/s0;->t:Landroidx/appcompat/widget/n0;

    invoke-virtual {p0}, Landroidx/appcompat/widget/s0;->b()Z

    move-result v1

    if-eqz v1, :cond_3c

    if-eqz p2, :cond_3c

    const/4 v1, 0x0

    invoke-virtual {p2, v1}, Landroidx/appcompat/widget/n0;->setListSelectionHidden(Z)V

    invoke-virtual {p2, p1}, Landroid/widget/ListView;->setSelection(I)V

    invoke-virtual {p2}, Landroid/widget/ListView;->getChoiceMode()I

    move-result v1

    if-eqz v1, :cond_3c

    invoke-virtual {p2, p1, v2}, Landroid/widget/ListView;->setItemChecked(IZ)V

    :cond_3c
    if-eqz v0, :cond_3f

    return-void

    .line 6
    :cond_3f
    iget-object p1, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {p1}, Landroid/widget/Spinner;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object p1

    if-eqz p1, :cond_59

    new-instance p2, Landroidx/appcompat/widget/c0$d$b;

    invoke-direct {p2, p0}, Landroidx/appcompat/widget/c0$d$b;-><init>(Landroidx/appcompat/widget/c0$d;)V

    invoke-virtual {p1, p2}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    new-instance p1, Landroidx/appcompat/widget/c0$d$c;

    invoke-direct {p1, p0, p2}, Landroidx/appcompat/widget/c0$d$c;-><init>(Landroidx/appcompat/widget/c0$d;Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    .line 7
    iget-object p2, p0, Landroidx/appcompat/widget/s0;->P:Landroid/widget/PopupWindow;

    invoke-virtual {p2, p1}, Landroid/widget/PopupWindow;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V

    :cond_59
    return-void
.end method

.method public n()Ljava/lang/CharSequence;
    .registers 2

    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->S:Ljava/lang/CharSequence;

    return-object v0
.end method

.method public o(Landroid/widget/ListAdapter;)V
    .registers 2

    invoke-super {p0, p1}, Landroidx/appcompat/widget/s0;->o(Landroid/widget/ListAdapter;)V

    iput-object p1, p0, Landroidx/appcompat/widget/c0$d;->T:Landroid/widget/ListAdapter;

    return-void
.end method

.method public s()V
    .registers 9

    invoke-virtual {p0}, Landroidx/appcompat/widget/s0;->e()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_26

    iget-object v1, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget-object v1, v1, Landroidx/appcompat/widget/c0;->y:Landroid/graphics/Rect;

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->getPadding(Landroid/graphics/Rect;)Z

    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-static {v0}, Landroidx/appcompat/widget/p1;->b(Landroid/view/View;)Z

    move-result v0

    if-eqz v0, :cond_1d

    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget-object v0, v0, Landroidx/appcompat/widget/c0;->y:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->right:I

    goto :goto_24

    :cond_1d
    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget-object v0, v0, Landroidx/appcompat/widget/c0;->y:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->left:I

    neg-int v0, v0

    :goto_24
    move v1, v0

    goto :goto_2e

    :cond_26
    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget-object v0, v0, Landroidx/appcompat/widget/c0;->y:Landroid/graphics/Rect;

    iput v1, v0, Landroid/graphics/Rect;->right:I

    iput v1, v0, Landroid/graphics/Rect;->left:I

    :goto_2e
    iget-object v0, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {v0}, Landroid/widget/Spinner;->getPaddingLeft()I

    move-result v0

    iget-object v2, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {v2}, Landroid/widget/Spinner;->getPaddingRight()I

    move-result v2

    iget-object v3, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {v3}, Landroid/widget/Spinner;->getWidth()I

    move-result v3

    iget-object v4, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget v5, v4, Landroidx/appcompat/widget/c0;->x:I

    const/4 v6, -0x2

    if-ne v5, v6, :cond_78

    iget-object v5, p0, Landroidx/appcompat/widget/c0$d;->T:Landroid/widget/ListAdapter;

    check-cast v5, Landroid/widget/SpinnerAdapter;

    invoke-virtual {p0}, Landroidx/appcompat/widget/s0;->e()Landroid/graphics/drawable/Drawable;

    move-result-object v6

    invoke-virtual {v4, v5, v6}, Landroidx/appcompat/widget/c0;->a(Landroid/widget/SpinnerAdapter;Landroid/graphics/drawable/Drawable;)I

    move-result v4

    iget-object v5, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-virtual {v5}, Landroid/widget/Spinner;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v5

    iget v5, v5, Landroid/util/DisplayMetrics;->widthPixels:I

    iget-object v6, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    iget-object v6, v6, Landroidx/appcompat/widget/c0;->y:Landroid/graphics/Rect;

    iget v7, v6, Landroid/graphics/Rect;->left:I

    sub-int/2addr v5, v7

    iget v6, v6, Landroid/graphics/Rect;->right:I

    sub-int/2addr v5, v6

    if-le v4, v5, :cond_70

    move v4, v5

    :cond_70
    sub-int v5, v3, v0

    sub-int/2addr v5, v2

    invoke-static {v4, v5}, Ljava/lang/Math;->max(II)I

    move-result v4

    goto :goto_7e

    :cond_78
    const/4 v4, -0x1

    if-ne v5, v4, :cond_82

    sub-int v4, v3, v0

    sub-int/2addr v4, v2

    :goto_7e
    invoke-virtual {p0, v4}, Landroidx/appcompat/widget/s0;->q(I)V

    goto :goto_85

    :cond_82
    invoke-virtual {p0, v5}, Landroidx/appcompat/widget/s0;->q(I)V

    :goto_85
    iget-object v4, p0, Landroidx/appcompat/widget/c0$d;->W:Landroidx/appcompat/widget/c0;

    invoke-static {v4}, Landroidx/appcompat/widget/p1;->b(Landroid/view/View;)Z

    move-result v4

    if-eqz v4, :cond_96

    sub-int/2addr v3, v2

    .line 1
    iget v0, p0, Landroidx/appcompat/widget/s0;->v:I

    sub-int/2addr v3, v0

    .line 2
    iget v0, p0, Landroidx/appcompat/widget/c0$d;->V:I

    sub-int/2addr v3, v0

    add-int/2addr v3, v1

    goto :goto_9b

    :cond_96
    iget v2, p0, Landroidx/appcompat/widget/c0$d;->V:I

    add-int/2addr v0, v2

    add-int v3, v0, v1

    .line 3
    :goto_9b
    iput v3, p0, Landroidx/appcompat/widget/s0;->w:I

    return-void
.end method
