apkfuckery/com.discord/smali/androidx/appcompat/widget/AppCompatSpinner$DialogPopup.smali

283 lines
7.8 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;
.super Ljava/lang/Object;
.source "AppCompatSpinner.java"
# interfaces
.implements Landroidx/appcompat/widget/AppCompatSpinner$SpinnerPopup;
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation build Landroidx/annotation/VisibleForTesting;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/appcompat/widget/AppCompatSpinner;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "DialogPopup"
.end annotation
# instance fields
.field public mListAdapter:Landroid/widget/ListAdapter;
.field public mPopup:Landroidx/appcompat/app/AlertDialog;
.annotation build Landroidx/annotation/VisibleForTesting;
.end annotation
.end field
.field public mPrompt:Ljava/lang/CharSequence;
.field public final synthetic this$0:Landroidx/appcompat/widget/AppCompatSpinner;
# direct methods
.method public constructor <init>(Landroidx/appcompat/widget/AppCompatSpinner;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public dismiss()V
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V
const/4 v0, 0x0
iput-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
:cond_0
return-void
.end method
.method public getBackground()Landroid/graphics/drawable/Drawable;
.locals 1
const/4 v0, 0x0
return-object v0
.end method
.method public getHintText()Ljava/lang/CharSequence;
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPrompt:Ljava/lang/CharSequence;
return-object v0
.end method
.method public getHorizontalOffset()I
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public getHorizontalOriginalOffset()I
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public getVerticalOffset()I
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public isShowing()Z
.locals 1
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z
move-result v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public onClick(Landroid/content/DialogInterface;I)V
.locals 3
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
invoke-virtual {p1, p2}, Landroid/widget/Spinner;->setSelection(I)V
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
invoke-virtual {p1}, Landroid/widget/Spinner;->getOnItemClickListener()Landroid/widget/AdapterView$OnItemClickListener;
move-result-object p1
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
const/4 v0, 0x0
iget-object v1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mListAdapter:Landroid/widget/ListAdapter;
invoke-interface {v1, p2}, Landroid/widget/ListAdapter;->getItemId(I)J
move-result-wide v1
invoke-virtual {p1, v0, p2, v1, v2}, Landroid/widget/Spinner;->performItemClick(Landroid/view/View;IJ)Z
:cond_0
invoke-virtual {p0}, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->dismiss()V
return-void
.end method
.method public setAdapter(Landroid/widget/ListAdapter;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mListAdapter:Landroid/widget/ListAdapter;
return-void
.end method
.method public setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.locals 1
const-string p1, "AppCompatSpinner"
const-string v0, "Cannot set popup background for MODE_DIALOG, ignoring"
invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public setHorizontalOffset(I)V
.locals 1
const-string p1, "AppCompatSpinner"
const-string v0, "Cannot set horizontal offset for MODE_DIALOG, ignoring"
invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public setHorizontalOriginalOffset(I)V
.locals 1
const-string p1, "AppCompatSpinner"
const-string v0, "Cannot set horizontal (original) offset for MODE_DIALOG, ignoring"
invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public setPromptText(Ljava/lang/CharSequence;)V
.locals 0
iput-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPrompt:Ljava/lang/CharSequence;
return-void
.end method
.method public setVerticalOffset(I)V
.locals 1
const-string p1, "AppCompatSpinner"
const-string v0, "Cannot set vertical offset for MODE_DIALOG, ignoring"
invoke-static {p1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public show(II)V
.locals 3
iget-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mListAdapter:Landroid/widget/ListAdapter;
if-nez v0, :cond_0
return-void
:cond_0
new-instance v0, Landroidx/appcompat/app/AlertDialog$Builder;
iget-object v1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
invoke-virtual {v1}, Landroidx/appcompat/widget/AppCompatSpinner;->getPopupContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1}, Landroidx/appcompat/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
iget-object v1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPrompt:Ljava/lang/CharSequence;
if-eqz v1, :cond_1
invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroidx/appcompat/app/AlertDialog$Builder;
:cond_1
iget-object v1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mListAdapter:Landroid/widget/ListAdapter;
iget-object v2, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
invoke-virtual {v2}, Landroid/widget/Spinner;->getSelectedItemPosition()I
move-result v2
invoke-virtual {v0, v1, v2, p0}, Landroidx/appcompat/app/AlertDialog$Builder;->setSingleChoiceItems(Landroid/widget/ListAdapter;ILandroid/content/DialogInterface$OnClickListener;)Landroidx/appcompat/app/AlertDialog$Builder;
move-result-object v0
invoke-virtual {v0}, Landroidx/appcompat/app/AlertDialog$Builder;->create()Landroidx/appcompat/app/AlertDialog;
move-result-object v0
iput-object v0, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
invoke-virtual {v0}, Landroidx/appcompat/app/AlertDialog;->getListView()Landroid/widget/ListView;
move-result-object v0
invoke-virtual {v0, p1}, Landroid/widget/ListView;->setTextDirection(I)V
invoke-virtual {v0, p2}, Landroid/widget/ListView;->setTextAlignment(I)V
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
invoke-virtual {p1}, Landroid/app/Dialog;->show()V
return-void
.end method