ExpandedMenuViewpublic final class ExpandedMenuView extends android.widget.ListView implements android.widget.AdapterView.OnItemClickListener, com.android.internal.view.menu.MenuBuilder.ItemInvoker, MenuViewThe 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 | mAnimationsDefault 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.
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 int | getWindowAnimations()
return mAnimations;
| public void | initialize(MenuBuilder menu)
mMenu = menu;
| public boolean | invokeItem(MenuItemImpl item)
return mMenu.performItemAction(item, 0);
| protected void | onDetachedFromWindow()
super.onDetachedFromWindow();
// Clear the cached bitmaps of children
setChildrenDrawingCacheEnabled(false);
| public void | onItemClick(android.widget.AdapterView parent, android.view.View v, int position, long id)
invokeItem((MenuItemImpl) getAdapter().getItem(position));
|
|