FileDocCategorySizeDatePackage
ExpandedMenuView.javaAPI DocAndroid 5.1 API2568Thu Mar 12 22:22:10 GMT 2015com.android.internal.view.menu

ExpandedMenuView

public final class ExpandedMenuView extends android.widget.ListView implements android.widget.AdapterView.OnItemClickListener, com.android.internal.view.menu.MenuBuilder.ItemInvoker, MenuView
The expanded menu view is a list-like menu with all of the available menu items. It is opened by the user clicking no the 'More' button on the icon menu view.

Fields Summary
private MenuBuilder
mMenu
private int
mAnimations
Default animations for this menu
Constructors Summary
public ExpandedMenuView(android.content.Context context, android.util.AttributeSet attrs)
Instantiates the ExpandedMenuView that is linked with the provided MenuBuilder.

param
menu The model for the menu which this MenuView will display

        super(context, attrs);
        
        TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.MenuView, 0, 0);
        mAnimations = a.getResourceId(com.android.internal.R.styleable.MenuView_windowAnimationStyle, 0);
        a.recycle();

        setOnItemClickListener(this);
    
Methods Summary
public intgetWindowAnimations()

        return mAnimations;
    
public voidinitialize(MenuBuilder menu)

        mMenu = menu;
    
public booleaninvokeItem(MenuItemImpl item)

        return mMenu.performItemAction(item, 0);
    
protected voidonDetachedFromWindow()

        super.onDetachedFromWindow();
        
        // Clear the cached bitmaps of children
        setChildrenDrawingCacheEnabled(false);
    
public voidonItemClick(android.widget.AdapterView parent, android.view.View v, int position, long id)

        invokeItem((MenuItemImpl) getAdapter().getItem(position));