182 lines
5.2 KiB
Smali
182 lines
5.2 KiB
Smali
.class public final Landroid/support/v7/view/menu/ExpandedMenuView;
|
|
.super Landroid/widget/ListView;
|
|
.source "ExpandedMenuView.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/support/v7/view/menu/MenuBuilder$ItemInvoker;
|
|
.implements Landroid/support/v7/view/menu/MenuView;
|
|
.implements Landroid/widget/AdapterView$OnItemClickListener;
|
|
|
|
|
|
# static fields
|
|
.field private static final TINT_ATTRS:[I
|
|
|
|
|
|
# instance fields
|
|
.field private mAnimations:I
|
|
|
|
.field private mMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.prologue
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [I
|
|
|
|
fill-array-data v0, :array_0
|
|
|
|
sput-object v0, Landroid/support/v7/view/menu/ExpandedMenuView;->TINT_ATTRS:[I
|
|
|
|
return-void
|
|
|
|
nop
|
|
|
|
:array_0
|
|
.array-data 4
|
|
0x10100d4
|
|
0x1010129
|
|
.end array-data
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
.param p1, "context" # Landroid/content/Context;
|
|
.param p2, "attrs" # Landroid/util/AttributeSet;
|
|
|
|
.prologue
|
|
const v0, 0x1010074
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/support/v7/view/menu/ExpandedMenuView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 4
|
|
.param p1, "context" # Landroid/content/Context;
|
|
.param p2, "attrs" # Landroid/util/AttributeSet;
|
|
.param p3, "defStyleAttr" # I
|
|
|
|
.prologue
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/ListView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
invoke-virtual {p0, p0}, Landroid/support/v7/view/menu/ExpandedMenuView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
|
|
|
|
sget-object v1, Landroid/support/v7/view/menu/ExpandedMenuView;->TINT_ATTRS:[I
|
|
|
|
invoke-static {p1, p2, v1, p3, v2}, Landroid/support/v7/widget/TintTypedArray;->obtainStyledAttributes(Landroid/content/Context;Landroid/util/AttributeSet;[III)Landroid/support/v7/widget/TintTypedArray;
|
|
|
|
move-result-object v0
|
|
|
|
.local v0, "a":Landroid/support/v7/widget/TintTypedArray;
|
|
invoke-virtual {v0, v2}, Landroid/support/v7/widget/TintTypedArray;->hasValue(I)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v0, v2}, Landroid/support/v7/widget/TintTypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0, v1}, Landroid/support/v7/view/menu/ExpandedMenuView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {v0, v3}, Landroid/support/v7/widget/TintTypedArray;->hasValue(I)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v0, v3}, Landroid/support/v7/widget/TintTypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0, v1}, Landroid/support/v7/view/menu/ExpandedMenuView;->setDivider(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Landroid/support/v7/widget/TintTypedArray;->recycle()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getWindowAnimations()I
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget v0, p0, Landroid/support/v7/view/menu/ExpandedMenuView;->mAnimations:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public initialize(Landroid/support/v7/view/menu/MenuBuilder;)V
|
|
.locals 0
|
|
.param p1, "menu" # Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
.prologue
|
|
iput-object p1, p0, Landroid/support/v7/view/menu/ExpandedMenuView;->mMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public invokeItem(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
.locals 2
|
|
.param p1, "item" # Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Landroid/support/v7/view/menu/ExpandedMenuView;->mMenu:Landroid/support/v7/view/menu/MenuBuilder;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/support/v7/view/menu/MenuBuilder;->performItemAction(Landroid/view/MenuItem;I)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method protected onDetachedFromWindow()V
|
|
.locals 1
|
|
|
|
.prologue
|
|
invoke-super {p0}, Landroid/widget/ListView;->onDetachedFromWindow()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, v0}, Landroid/support/v7/view/menu/ExpandedMenuView;->setChildrenDrawingCacheEnabled(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
|
|
.locals 1
|
|
.param p1, "parent" # Landroid/widget/AdapterView;
|
|
.param p2, "v" # Landroid/view/View;
|
|
.param p3, "position" # I
|
|
.param p4, "id" # J
|
|
|
|
.prologue
|
|
invoke-virtual {p0}, Landroid/support/v7/view/menu/ExpandedMenuView;->getAdapter()Landroid/widget/ListAdapter;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p3}, Landroid/widget/ListAdapter;->getItem(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/support/v7/view/menu/MenuItemImpl;
|
|
|
|
invoke-virtual {p0, v0}, Landroid/support/v7/view/menu/ExpandedMenuView;->invokeItem(Landroid/support/v7/view/menu/MenuItemImpl;)Z
|
|
|
|
return-void
|
|
.end method
|