285 lines
8 KiB
Smali
285 lines
8 KiB
Smali
|
.class Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "AppCompatSpinner.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Landroid/content/DialogInterface$OnClickListener;
|
||
|
.implements Landroidx/appcompat/widget/AppCompatSpinner$SpinnerPopup;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Landroidx/appcompat/widget/AppCompatSpinner;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x0
|
||
|
name = "DialogPopup"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private mListAdapter:Landroid/widget/ListAdapter;
|
||
|
|
||
|
.field mPopup:Landroidx/appcompat/app/AlertDialog;
|
||
|
|
||
|
.field private mPrompt:Ljava/lang/CharSequence;
|
||
|
|
||
|
.field final synthetic this$0:Landroidx/appcompat/widget/AppCompatSpinner;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method 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}, Landroidx/appcompat/app/AlertDialog;->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}, Landroidx/appcompat/app/AlertDialog;->isShowing()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
return v0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
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}, Landroidx/appcompat/widget/AppCompatSpinner;->setSelection(I)V
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->this$0:Landroidx/appcompat/widget/AppCompatSpinner;
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/appcompat/widget/AppCompatSpinner;->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}, Landroidx/appcompat/widget/AppCompatSpinner;->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}, Landroidx/appcompat/widget/AppCompatSpinner;->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;
|
||
|
|
||
|
iget-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
|
||
|
|
||
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
||
|
|
||
|
const/16 v2, 0x11
|
||
|
|
||
|
if-lt v1, v2, :cond_2
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroid/widget/ListView;->setTextDirection(I)V
|
||
|
|
||
|
invoke-virtual {v0, p2}, Landroid/widget/ListView;->setTextAlignment(I)V
|
||
|
|
||
|
:cond_2
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/AppCompatSpinner$DialogPopup;->mPopup:Landroidx/appcompat/app/AlertDialog;
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/appcompat/app/AlertDialog;->show()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|