Package org.robolectric.fakes
Class RoboMenuItem
java.lang.Object
org.robolectric.fakes.RoboMenuItem
- All Implemented Interfaces:
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
boolean
boolean
char
int
getIcon()
int
char
int
getOrder()
getTitle()
boolean
boolean
boolean
boolean
boolean
boolean
setActionProvider
(ActionProvider actionProvider) setActionView
(int resId) setActionView
(View view) setAlphabeticShortcut
(char alphaChar) setCheckable
(boolean checkable) setChecked
(boolean checked) setEnabled
(boolean enabled) void
setGroupId
(int groupId) setIcon
(int iconRes) void
setItemId
(int itemId) setNumericShortcut
(char numericChar) setOnMenuItemClickListener
(MenuItem.OnMenuItemClickListener menuItemClickListener) void
setOrder
(int order) setShortcut
(char numericChar, char alphaChar) void
setShowAsAction
(int actionEnum) setShowAsActionFlags
(int actionEnum) void
setSubMenu
(SubMenu subMenu) setTitle
(int title) setTitle
(CharSequence title) setTitleCondensed
(CharSequence title) setVisible
(boolean visible) 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
-
icon
-
-
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
-