apkfuckery/com.discord/smali/androidx/appcompat/widget/PopupMenu.smali

259 lines
7.9 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.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 private final mAnchor:Landroid/view/View;
.field private final mContext:Landroid/content/Context;
.field private mDragListener:Landroid/view/View$OnTouchListener;
.field private final mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
.field mMenuItemClickListener:Landroidx/appcompat/widget/PopupMenu$OnMenuItemClickListener;
.field mOnDismissListener:Landroidx/appcompat/widget/PopupMenu$OnDismissListener;
.field final mPopup:Landroidx/appcompat/view/menu/MenuPopupHelper;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/view/View;)V
.locals 1
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
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
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
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
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
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 getMenuListView()Landroid/widget/ListView;
.locals 1
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
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
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
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