Package org.robolectric.fakes
Class RoboMenuItem
java.lang.Object
org.robolectric.fakes.RoboMenuItem
- All Implemented Interfaces:
MenuItem
public class RoboMenuItem extends Object implements MenuItem
Robolectric implementation of
MenuItem
.-
Nested Class Summary
Nested classes/interfaces inherited from interface android.view.MenuItem
MenuItem.OnActionExpandListener, MenuItem.OnMenuItemClickListener
-
Field Summary
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 Details
-
Constructor Details
-
RoboMenuItem
public RoboMenuItem() -
RoboMenuItem
-
RoboMenuItem
public RoboMenuItem(int itemId)
-
-
Method Details
-
setItemId
public void setItemId(int itemId) -
setGroupId
public void setGroupId(int groupId) -
getItemId
public int getItemId() -
getGroupId
public int getGroupId()- Specified by:
getGroupId
in interfaceMenuItem
-
getOrder
public int getOrder() -
setOrder
public void setOrder(int order) -
setTitle
-
setTitle
-
getTitle
-
setTitleCondensed
- Specified by:
setTitleCondensed
in interfaceMenuItem
-
getTitleCondensed
- Specified by:
getTitleCondensed
in interfaceMenuItem
-
setIcon
-
setIcon
-
getIcon
-
setIntent
-
getIntent
-
setShortcut
- Specified by:
setShortcut
in interfaceMenuItem
-
setNumericShortcut
- Specified by:
setNumericShortcut
in interfaceMenuItem
-
getNumericShortcut
public char getNumericShortcut()- Specified by:
getNumericShortcut
in interfaceMenuItem
-
setAlphabeticShortcut
- Specified by:
setAlphabeticShortcut
in interfaceMenuItem
-
getAlphabeticShortcut
public char getAlphabeticShortcut()- Specified by:
getAlphabeticShortcut
in interfaceMenuItem
-
setCheckable
- Specified by:
setCheckable
in interfaceMenuItem
-
isCheckable
public boolean isCheckable()- Specified by:
isCheckable
in interfaceMenuItem
-
setChecked
- Specified by:
setChecked
in interfaceMenuItem
-
isChecked
public boolean isChecked() -
setVisible
- Specified by:
setVisible
in interfaceMenuItem
-
isVisible
public boolean isVisible() -
setEnabled
- Specified by:
setEnabled
in interfaceMenuItem
-
isEnabled
public boolean isEnabled() -
hasSubMenu
public boolean hasSubMenu()- Specified by:
hasSubMenu
in interfaceMenuItem
-
getSubMenu
- Specified by:
getSubMenu
in interfaceMenuItem
-
setSubMenu
-
setOnMenuItemClickListener
- Specified by:
setOnMenuItemClickListener
in interfaceMenuItem
-
getMenuInfo
- Specified by:
getMenuInfo
in interfaceMenuItem
-
click
public void click() -
setShowAsAction
public void setShowAsAction(int actionEnum)- Specified by:
setShowAsAction
in interfaceMenuItem
-
setShowAsActionFlags
- Specified by:
setShowAsActionFlags
in interfaceMenuItem
-
setActionView
- Specified by:
setActionView
in interfaceMenuItem
-
setActionView
- Specified by:
setActionView
in interfaceMenuItem
-
getActionView
- Specified by:
getActionView
in interfaceMenuItem
-
setActionProvider
- Specified by:
setActionProvider
in interfaceMenuItem
-
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
- Specified by:
setOnActionExpandListener
in interfaceMenuItem
-