Package org.robolectric.fakes
Class RoboMenuItem
- java.lang.Object
-
- org.robolectric.fakes.RoboMenuItem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.view.MenuItem
MenuItem.OnActionExpandListener, MenuItem.OnMenuItemClickListener
-
-
Field Summary
Fields Modifier and Type Field Description Drawable
icon
-
Fields inherited from interface android.view.MenuItem
SHOW_AS_ACTION_ALWAYS, SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW, SHOW_AS_ACTION_IF_ROOM, SHOW_AS_ACTION_NEVER, SHOW_AS_ACTION_WITH_TEXT
-
-
Constructor Summary
Constructors Constructor Description RoboMenuItem()
RoboMenuItem(int itemId)
RoboMenuItem(Context context)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface android.view.MenuItem
getAlphabeticModifiers, getContentDescription, getIconTintBlendMode, getIconTintList, getIconTintMode, getNumericModifiers, getTooltipText, requiresActionButton, requiresOverflow, setAlphabeticShortcut, setContentDescription, setIconTintBlendMode, setIconTintList, setIconTintMode, setNumericShortcut, setShortcut, setTooltipText
-
-
-
-
Field Detail
-
icon
public Drawable icon
-
-
Constructor Detail
-
RoboMenuItem
public RoboMenuItem()
-
RoboMenuItem
public RoboMenuItem(Context context)
-
RoboMenuItem
public RoboMenuItem(int itemId)
-
-
Method Detail
-
setItemId
public void setItemId(int itemId)
-
setGroupId
public void setGroupId(int groupId)
-
getGroupId
public int getGroupId()
- Specified by:
getGroupId
in interfaceMenuItem
-
setOrder
public void setOrder(int order)
-
setTitle
public MenuItem setTitle(CharSequence title)
-
getTitle
public CharSequence getTitle()
-
setTitleCondensed
public MenuItem setTitleCondensed(CharSequence title)
- Specified by:
setTitleCondensed
in interfaceMenuItem
-
getTitleCondensed
public CharSequence getTitleCondensed()
- Specified by:
getTitleCondensed
in interfaceMenuItem
-
setShortcut
public MenuItem setShortcut(char numericChar, char alphaChar)
- Specified by:
setShortcut
in interfaceMenuItem
-
setNumericShortcut
public MenuItem setNumericShortcut(char numericChar)
- Specified by:
setNumericShortcut
in interfaceMenuItem
-
getNumericShortcut
public char getNumericShortcut()
- Specified by:
getNumericShortcut
in interfaceMenuItem
-
setAlphabeticShortcut
public MenuItem setAlphabeticShortcut(char alphaChar)
- Specified by:
setAlphabeticShortcut
in interfaceMenuItem
-
getAlphabeticShortcut
public char getAlphabeticShortcut()
- Specified by:
getAlphabeticShortcut
in interfaceMenuItem
-
setCheckable
public MenuItem setCheckable(boolean checkable)
- Specified by:
setCheckable
in interfaceMenuItem
-
isCheckable
public boolean isCheckable()
- Specified by:
isCheckable
in interfaceMenuItem
-
setChecked
public MenuItem setChecked(boolean checked)
- Specified by:
setChecked
in interfaceMenuItem
-
setVisible
public MenuItem setVisible(boolean visible)
- Specified by:
setVisible
in interfaceMenuItem
-
setEnabled
public MenuItem setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceMenuItem
-
hasSubMenu
public boolean hasSubMenu()
- Specified by:
hasSubMenu
in interfaceMenuItem
-
getSubMenu
public SubMenu getSubMenu()
- Specified by:
getSubMenu
in interfaceMenuItem
-
setSubMenu
public void setSubMenu(SubMenu subMenu)
-
setOnMenuItemClickListener
public MenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener menuItemClickListener)
- Specified by:
setOnMenuItemClickListener
in interfaceMenuItem
-
getMenuInfo
public ContextMenu.ContextMenuInfo getMenuInfo()
- Specified by:
getMenuInfo
in interfaceMenuItem
-
click
public void click()
-
setShowAsAction
public void setShowAsAction(int actionEnum)
- Specified by:
setShowAsAction
in interfaceMenuItem
-
setShowAsActionFlags
public MenuItem setShowAsActionFlags(int actionEnum)
- Specified by:
setShowAsActionFlags
in interfaceMenuItem
-
setActionView
public MenuItem setActionView(View view)
- Specified by:
setActionView
in interfaceMenuItem
-
setActionView
public MenuItem setActionView(int resId)
- Specified by:
setActionView
in interfaceMenuItem
-
getActionView
public View getActionView()
- Specified by:
getActionView
in interfaceMenuItem
-
setActionProvider
public MenuItem setActionProvider(ActionProvider actionProvider)
- Specified by:
setActionProvider
in interfaceMenuItem
-
getActionProvider
public ActionProvider getActionProvider()
- Specified by:
getActionProvider
in interfaceMenuItem
-
expandActionView
public boolean expandActionView()
- Specified by:
expandActionView
in interfaceMenuItem
-
collapseActionView
public boolean collapseActionView()
- Specified by:
collapseActionView
in interfaceMenuItem
-
isActionViewExpanded
public boolean isActionViewExpanded()
- Specified by:
isActionViewExpanded
in interfaceMenuItem
-
setOnActionExpandListener
public MenuItem setOnActionExpandListener(MenuItem.OnActionExpandListener listener)
- Specified by:
setOnActionExpandListener
in interfaceMenuItem
-
-