313 lines
9.9 KiB
Smali
313 lines
9.9 KiB
Smali
.class public Landroidx/appcompat/widget/PopupMenu;
|
|
.super Ljava/lang/Object;
|
|
.source "PopupMenu.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/appcompat/widget/PopupMenu$OnDismissListener;,
|
|
Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final mAnchor:Landroid/view/View;
|
|
|
|
.field public final mContext:Landroid/content/Context;
|
|
|
|
.field public mDragListener:Landroid/view/View$OnTouchListener;
|
|
|
|
.field public final mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
.field public mMenuItemClickListener:Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;
|
|
|
|
.field public mOnDismissListener:Landroidx/appcompat/widget/PopupMenu$OnDismissListener;
|
|
|
|
.field public final mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;)V
|
|
.locals 1
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroidx/appcompat/widget/PopupMenu;-><init>(Landroid/content/Context;Landroid/view/View;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;I)V
|
|
.locals 6
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
sget v4, Landroidx/appcompat/R$attr;->popupMenuStyle:I
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
invoke-direct/range {v0 .. v5}, Landroidx/appcompat/widget/PopupMenu;-><init>(Landroid/content/Context;Landroid/view/View;III)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;III)V
|
|
.locals 9
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # I
|
|
.annotation build Landroidx/annotation/AttrRes;
|
|
.end annotation
|
|
.end param
|
|
.param p5 # I
|
|
.annotation build Landroidx/annotation/StyleRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/PopupMenu;->mContext:Landroid/content/Context;
|
|
|
|
iput-object p2, p0, Landroidx/appcompat/widget/PopupMenu;->mAnchor:Landroid/view/View;
|
|
|
|
new-instance v0, Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
invoke-direct {v0, p1}, Landroidx/appcompat/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
new-instance v1, Landroidx/appcompat/widget/PopupMenu$1;
|
|
|
|
invoke-direct {v1, p0}, Landroidx/appcompat/widget/PopupMenu$1;-><init>(Landroidx/appcompat/widget/PopupMenu;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/MenuBuilder;->setCallback(Landroidx/appcompat/view/menu/MenuBuilder$Callback;)V
|
|
|
|
new-instance v0, Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
iget-object v4, p0, Landroidx/appcompat/widget/PopupMenu;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v2, v0
|
|
|
|
move-object v3, p1
|
|
|
|
move-object v5, p2
|
|
|
|
move v7, p4
|
|
|
|
move v8, p5
|
|
|
|
invoke-direct/range {v2 .. v8}, Landroidx/appcompat/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/View;ZII)V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/appcompat/view/menu/MenuPopupHelper;->setGravity(I)V
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
new-instance p2, Landroidx/appcompat/widget/PopupMenu$2;
|
|
|
|
invoke-direct {p2, p0}, Landroidx/appcompat/widget/PopupMenu$2;-><init>(Landroidx/appcompat/widget/PopupMenu;)V
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/appcompat/view/menu/MenuPopupHelper;->setOnDismissListener(Landroid/widget/PopupWindow$OnDismissListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public dismiss()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->dismiss()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getDragToOpenListener()Landroid/view/View$OnTouchListener;
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mDragListener:Landroid/view/View$OnTouchListener;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
new-instance v0, Landroidx/appcompat/widget/PopupMenu$3;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/widget/PopupMenu;->mAnchor:Landroid/view/View;
|
|
|
|
invoke-direct {v0, p0, v1}, Landroidx/appcompat/widget/PopupMenu$3;-><init>(Landroidx/appcompat/widget/PopupMenu;Landroid/view/View;)V
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mDragListener:Landroid/view/View$OnTouchListener;
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mDragListener:Landroid/view/View$OnTouchListener;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getGravity()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->getGravity()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getMenu()Landroid/view/Menu;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMenuInflater()Landroid/view/MenuInflater;
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
new-instance v0, Landroidx/appcompat/view/SupportMenuInflater;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/widget/PopupMenu;->mContext:Landroid/content/Context;
|
|
|
|
invoke-direct {v0, v1}, Landroidx/appcompat/view/SupportMenuInflater;-><init>(Landroid/content/Context;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMenuListView()Landroid/widget/ListView;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->isShowing()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->getListView()Landroid/widget/ListView;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public inflate(I)V
|
|
.locals 2
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/MenuRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/PopupMenu;->getMenuInflater()Landroid/view/MenuInflater;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/widget/PopupMenu;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setGravity(I)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/view/menu/MenuPopupHelper;->setGravity(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnDismissListener(Landroidx/appcompat/widget/PopupMenu$OnDismissListener;)V
|
|
.locals 0
|
|
.param p1 # Landroidx/appcompat/widget/PopupMenu$OnDismissListener;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/PopupMenu;->mOnDismissListener:Landroidx/appcompat/widget/PopupMenu$OnDismissListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnMenuItemClickListener(Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;)V
|
|
.locals 0
|
|
.param p1 # Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/PopupMenu;->mMenuItemClickListener:Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public show()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/PopupMenu;->mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->show()V
|
|
|
|
return-void
|
|
.end method
|