335 lines
10 KiB
Smali
335 lines
10 KiB
Smali
.class public Landroid/support/v7/view/menu/SubMenuBuilder;
|
|
.super Landroid/support/v7/view/menu/MenuBuilder;
|
|
.source "SubMenuBuilder.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/view/SubMenu;
|
|
|
|
|
|
# instance fields
|
|
.field private mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
.field private mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/support/v7/view/menu/MenuBuilder;Landroid/support/v7/view/menu/MenuItemImpl;)V
|
|
.locals 0
|
|
.param p1, "context" # Landroid/content/Context;
|
|
.param p2, "parentMenu" # Landroid/support/v7/view/menu/MenuBuilder;
|
|
.param p3, "item" # Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1}, Landroid/support/v7/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object p2, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
iput-object p3, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public collapseItemActionView(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
.locals 1
|
|
.param p1, "item" # Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->collapseItemActionView(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method dispatchMenuItemSelected(Landroid/support/v7/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
|
|
.locals 1
|
|
.param p1, "menu" # Landroid/support/v7/view/menu/MenuBuilder;
|
|
.param p2, "item" # Landroid/view/MenuItem;
|
|
|
|
.prologue
|
|
invoke-super {p0, p1, p2}, Landroid/support/v7/view/menu/MenuBuilder;->dispatchMenuItemSelected(Landroid/support/v7/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1, p2}, Landroid/support/v7/view/menu/MenuBuilder;->dispatchMenuItemSelected(Landroid/support/v7/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public expandItemActionView(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
.locals 1
|
|
.param p1, "item" # Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->expandItemActionView(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getActionViewStatesKey()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.prologue
|
|
iget-object v1, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v1, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
invoke-virtual {v1}, Landroid/support/v7/view/menu/MenuItemImpl;->getItemId()I
|
|
|
|
move-result v0
|
|
|
|
.local v0, "itemId":I
|
|
:goto_0
|
|
if-nez v0, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
return-object v1
|
|
|
|
.end local v0 # "itemId":I
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.restart local v0 # "itemId":I
|
|
:cond_1
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-super {p0}, Landroid/support/v7/view/menu/MenuBuilder;->getActionViewStatesKey()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, ":"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_1
|
|
.end method
|
|
|
|
.method public getItem()Landroid/view/MenuItem;
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getParentMenu()Landroid/view/Menu;
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getRootMenu()Landroid/support/v7/view/menu/MenuBuilder;
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isQwertyMode()Z
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/view/menu/MenuBuilder;->isQwertyMode()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isShortcutsVisible()Z
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0}, Landroid/support/v7/view/menu/MenuBuilder;->isShortcutsVisible()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public setCallback(Landroid/support/v7/view/menu/MenuBuilder$Callback;)V
|
|
.locals 1
|
|
.param p1, "callback" # Landroid/support/v7/view/menu/MenuBuilder$Callback;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setCallback(Landroid/support/v7/view/menu/MenuBuilder$Callback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setHeaderIcon(I)Landroid/view/SubMenu;
|
|
.locals 1
|
|
.param p1, "iconRes" # I
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Landroid/support/v7/view/menu/SubMenuBuilder;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p1}, Landroid/support/v4/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-super {p0, v0}, Landroid/support/v7/view/menu/MenuBuilder;->setHeaderIconInt(Landroid/graphics/drawable/Drawable;)Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setHeaderIcon(Landroid/graphics/drawable/Drawable;)Landroid/view/SubMenu;
|
|
.locals 0
|
|
.param p1, "icon" # Landroid/graphics/drawable/Drawable;
|
|
|
|
.prologue
|
|
invoke-super {p0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setHeaderIconInt(Landroid/graphics/drawable/Drawable;)Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setHeaderTitle(I)Landroid/view/SubMenu;
|
|
.locals 1
|
|
.param p1, "titleRes" # I
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Landroid/support/v7/view/menu/SubMenuBuilder;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-super {p0, v0}, Landroid/support/v7/view/menu/MenuBuilder;->setHeaderTitleInt(Ljava/lang/CharSequence;)Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setHeaderTitle(Ljava/lang/CharSequence;)Landroid/view/SubMenu;
|
|
.locals 0
|
|
.param p1, "title" # Ljava/lang/CharSequence;
|
|
|
|
.prologue
|
|
invoke-super {p0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setHeaderTitleInt(Ljava/lang/CharSequence;)Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setHeaderView(Landroid/view/View;)Landroid/view/SubMenu;
|
|
.locals 0
|
|
.param p1, "view" # Landroid/view/View;
|
|
|
|
.prologue
|
|
invoke-super {p0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setHeaderViewInt(Landroid/view/View;)Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setIcon(I)Landroid/view/SubMenu;
|
|
.locals 1
|
|
.param p1, "iconRes" # I
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuItemImpl;->setIcon(I)Landroid/view/MenuItem;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setIcon(Landroid/graphics/drawable/Drawable;)Landroid/view/SubMenu;
|
|
.locals 1
|
|
.param p1, "icon" # Landroid/graphics/drawable/Drawable;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mItem:Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuItemImpl;->setIcon(Landroid/graphics/drawable/Drawable;)Landroid/view/MenuItem;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setQwertyMode(Z)V
|
|
.locals 1
|
|
.param p1, "isQwerty" # Z
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setQwertyMode(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setShortcutsVisible(Z)V
|
|
.locals 1
|
|
.param p1, "shortcutsVisible" # Z
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/SubMenuBuilder;->mParentMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/support/v7/view/menu/MenuBuilder;->setShortcutsVisible(Z)V
|
|
|
|
return-void
|
|
.end method
|