FileDocCategorySizeDatePackage
SubMenuBuilder.javaAPI DocAndroid 1.5 API2974Wed May 06 22:41:56 BST 2009com.android.internal.view.menu

SubMenuBuilder

public class SubMenuBuilder extends MenuBuilder implements android.view.SubMenu
The model for a sub menu, which is an extension of the menu. Most methods are proxied to the parent menu.

Fields Summary
private MenuBuilder
mParentMenu
private MenuItemImpl
mItem
Constructors Summary
public SubMenuBuilder(android.content.Context context, MenuBuilder parentMenu, MenuItemImpl item)

        super(context);

        mParentMenu = parentMenu;
        mItem = item;
    
Methods Summary
public CallbackgetCallback()

        return mParentMenu.getCallback();
    
public android.view.MenuItemgetItem()

        return mItem;
    
public android.view.MenugetParentMenu()

        return mParentMenu;
    
public MenuBuildergetRootMenu()

        return mParentMenu;
    
public booleanisQwertyMode()

        return mParentMenu.isQwertyMode();
    
public booleanisShortcutsVisible()

        return mParentMenu.isShortcutsVisible();
    
public voidsetCallback(Callback callback)

        mParentMenu.setCallback(callback);
    
public android.view.SubMenusetHeaderIcon(android.graphics.drawable.Drawable icon)

        return (SubMenu) super.setHeaderIconInt(icon);
    
public android.view.SubMenusetHeaderIcon(int iconRes)

        return (SubMenu) super.setHeaderIconInt(iconRes);
    
public android.view.SubMenusetHeaderTitle(java.lang.CharSequence title)

        return (SubMenu) super.setHeaderTitleInt(title);
    
public android.view.SubMenusetHeaderTitle(int titleRes)

        return (SubMenu) super.setHeaderTitleInt(titleRes);
    
public android.view.SubMenusetHeaderView(android.view.View view)

        return (SubMenu) super.setHeaderViewInt(view);
    
public android.view.SubMenusetIcon(android.graphics.drawable.Drawable icon)

        mItem.setIcon(icon);
        return this;
    
public android.view.SubMenusetIcon(int iconRes)

        mItem.setIcon(iconRes);
        return this;
    
public voidsetQwertyMode(boolean isQwerty)

        mParentMenu.setQwertyMode(isQwerty);
    
public voidsetShortcutsVisible(boolean shortcutsVisible)

        mParentMenu.setShortcutsVisible(shortcutsVisible);