.class public Landroidx/appcompat/view/menu/ListMenuPresenter; .super Ljava/lang/Object; .source "ListMenuPresenter.java" # interfaces .implements Landroidx/appcompat/view/menu/MenuPresenter; .implements Landroid/widget/AdapterView$OnItemClickListener; # annotations .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope; } .end annotation .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; } .end annotation # static fields .field public static final TAG:Ljava/lang/String; = "ListMenuPresenter" .field public static final VIEWS_TAG:Ljava/lang/String; = "android:menu:list" # instance fields .field public mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; .field public mCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback; .field public mContext:Landroid/content/Context; .field public mId:I .field public mInflater:Landroid/view/LayoutInflater; .field public mItemIndexOffset:I .field public mItemLayoutRes:I .field public mMenu:Landroidx/appcompat/view/menu/MenuBuilder; .field public mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; .field public mThemeRes:I # direct methods .method public constructor (II)V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()V iput p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mItemLayoutRes:I iput p2, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mThemeRes:I return-void .end method .method public constructor (Landroid/content/Context;I)V .locals 1 const/4 v0, 0x0 invoke-direct {p0, p2, v0}, Landroidx/appcompat/view/menu/ListMenuPresenter;->(II)V iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater; move-result-object p1 iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mInflater:Landroid/view/LayoutInflater; return-void .end method # virtual methods .method public collapseItemActionView(Landroidx/appcompat/view/menu/MenuBuilder;Landroidx/appcompat/view/menu/MenuItemImpl;)Z .locals 0 const/4 p1, 0x0 return p1 .end method .method public expandItemActionView(Landroidx/appcompat/view/menu/MenuBuilder;Landroidx/appcompat/view/menu/MenuItemImpl;)Z .locals 0 const/4 p1, 0x0 return p1 .end method .method public flagActionItems()Z .locals 1 const/4 v0, 0x0 return v0 .end method .method public getAdapter()Landroid/widget/ListAdapter; .locals 1 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; if-nez v0, :cond_0 new-instance v0, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; invoke-direct {v0, p0}, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter;->(Landroidx/appcompat/view/menu/ListMenuPresenter;)V iput-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; :cond_0 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; return-object v0 .end method .method public getId()I .locals 1 iget v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mId:I return v0 .end method .method public getItemIndexOffset()I .locals 1 iget v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mItemIndexOffset:I return v0 .end method .method public getMenuView(Landroid/view/ViewGroup;)Landroidx/appcompat/view/menu/MenuView; .locals 3 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; if-nez v0, :cond_1 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mInflater:Landroid/view/LayoutInflater; sget v1, Landroidx/appcompat/R$layout;->abc_expanded_menu_layout:I const/4 v2, 0x0 invoke-virtual {v0, v1, p1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View; move-result-object p1 check-cast p1, Landroidx/appcompat/view/menu/ExpandedMenuView; iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; if-nez p1, :cond_0 new-instance p1, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; invoke-direct {p1, p0}, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter;->(Landroidx/appcompat/view/menu/ListMenuPresenter;)V iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; :cond_0 iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; invoke-virtual {p1, v0}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; invoke-virtual {p1, p0}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V :cond_1 iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; return-object p1 .end method .method public initForMenu(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;)V .locals 2 iget v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mThemeRes:I if-eqz v0, :cond_0 new-instance v1, Landroid/view/ContextThemeWrapper; invoke-direct {v1, p1, v0}, Landroid/view/ContextThemeWrapper;->(Landroid/content/Context;I)V iput-object v1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater; move-result-object p1 iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mInflater:Landroid/view/LayoutInflater; goto :goto_0 :cond_0 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; if-eqz v0, :cond_1 iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mInflater:Landroid/view/LayoutInflater; if-nez p1, :cond_1 iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mContext:Landroid/content/Context; invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater; move-result-object p1 iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mInflater:Landroid/view/LayoutInflater; :cond_1 :goto_0 iput-object p2, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder; iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; if-eqz p1, :cond_2 invoke-virtual {p1}, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter;->notifyDataSetChanged()V :cond_2 return-void .end method .method public onCloseMenu(Landroidx/appcompat/view/menu/MenuBuilder;Z)V .locals 1 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback; if-eqz v0, :cond_0 invoke-interface {v0, p1, p2}, Landroidx/appcompat/view/menu/MenuPresenter$Callback;->onCloseMenu(Landroidx/appcompat/view/menu/MenuBuilder;Z)V :cond_0 return-void .end method .method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/widget/AdapterView<", "*>;", "Landroid/view/View;", "IJ)V" } .end annotation iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder; iget-object p2, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; invoke-virtual {p2, p3}, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter;->getItem(I)Landroidx/appcompat/view/menu/MenuItemImpl; move-result-object p2 const/4 p3, 0x0 invoke-virtual {p1, p2, p0, p3}, Landroidx/appcompat/view/menu/MenuBuilder;->performItemAction(Landroid/view/MenuItem;Landroidx/appcompat/view/menu/MenuPresenter;I)Z return-void .end method .method public onRestoreInstanceState(Landroid/os/Parcelable;)V .locals 0 check-cast p1, Landroid/os/Bundle; invoke-virtual {p0, p1}, Landroidx/appcompat/view/menu/ListMenuPresenter;->restoreHierarchyState(Landroid/os/Bundle;)V return-void .end method .method public onSaveInstanceState()Landroid/os/Parcelable; .locals 1 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; if-nez v0, :cond_0 const/4 v0, 0x0 return-object v0 :cond_0 new-instance v0, Landroid/os/Bundle; invoke-direct {v0}, Landroid/os/Bundle;->()V invoke-virtual {p0, v0}, Landroidx/appcompat/view/menu/ListMenuPresenter;->saveHierarchyState(Landroid/os/Bundle;)V return-object v0 .end method .method public onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z .locals 2 invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuBuilder;->hasVisibleItems()Z move-result v0 if-nez v0, :cond_0 const/4 p1, 0x0 return p1 :cond_0 new-instance v0, Landroidx/appcompat/view/menu/MenuDialogHelper; invoke-direct {v0, p1}, Landroidx/appcompat/view/menu/MenuDialogHelper;->(Landroidx/appcompat/view/menu/MenuBuilder;)V const/4 v1, 0x0 invoke-virtual {v0, v1}, Landroidx/appcompat/view/menu/MenuDialogHelper;->show(Landroid/os/IBinder;)V iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback; if-eqz v0, :cond_1 invoke-interface {v0, p1}, Landroidx/appcompat/view/menu/MenuPresenter$Callback;->onOpenSubMenu(Landroidx/appcompat/view/menu/MenuBuilder;)Z :cond_1 const/4 p1, 0x1 return p1 .end method .method public restoreHierarchyState(Landroid/os/Bundle;)V .locals 1 const-string v0, "android:menu:list" invoke-virtual {p1, v0}, Landroid/os/Bundle;->getSparseParcelableArray(Ljava/lang/String;)Landroid/util/SparseArray; move-result-object p1 if-eqz p1, :cond_0 iget-object v0, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; invoke-virtual {v0, p1}, Landroid/view/View;->restoreHierarchyState(Landroid/util/SparseArray;)V :cond_0 return-void .end method .method public saveHierarchyState(Landroid/os/Bundle;)V .locals 2 new-instance v0, Landroid/util/SparseArray; invoke-direct {v0}, Landroid/util/SparseArray;->()V iget-object v1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; if-eqz v1, :cond_0 invoke-virtual {v1, v0}, Landroid/view/View;->saveHierarchyState(Landroid/util/SparseArray;)V :cond_0 const-string v1, "android:menu:list" invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putSparseParcelableArray(Ljava/lang/String;Landroid/util/SparseArray;)V return-void .end method .method public setCallback(Landroidx/appcompat/view/menu/MenuPresenter$Callback;)V .locals 0 iput-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mCallback:Landroidx/appcompat/view/menu/MenuPresenter$Callback; return-void .end method .method public setId(I)V .locals 0 iput p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mId:I return-void .end method .method public setItemIndexOffset(I)V .locals 0 iput p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mItemIndexOffset:I iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mMenuView:Landroidx/appcompat/view/menu/ExpandedMenuView; if-eqz p1, :cond_0 const/4 p1, 0x0 invoke-virtual {p0, p1}, Landroidx/appcompat/view/menu/ListMenuPresenter;->updateMenuView(Z)V :cond_0 return-void .end method .method public updateMenuView(Z)V .locals 0 iget-object p1, p0, Landroidx/appcompat/view/menu/ListMenuPresenter;->mAdapter:Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter; if-eqz p1, :cond_0 invoke-virtual {p1}, Landroidx/appcompat/view/menu/ListMenuPresenter$MenuAdapter;->notifyDataSetChanged()V :cond_0 return-void .end method