Package org.robolectric.fakes
Class RoboMenu
java.lang.Object
org.robolectric.fakes.RoboMenu
- All Implemented Interfaces:
Menu
- Direct Known Subclasses:
RoboSubMenu
Robolectric implementation of
Menu
.-
Field Summary
Fields inherited from interface android.view.Menu
CATEGORY_ALTERNATIVE, CATEGORY_CONTAINER, CATEGORY_MASK, CATEGORY_SECONDARY, CATEGORY_SHIFT, CATEGORY_SYSTEM, FIRST, FLAG_ALWAYS_PERFORM_CLOSE, FLAG_APPEND_TO_GROUP, FLAG_PERFORM_NO_CLOSE, NONE, SUPPORTED_MODIFIERS_MASK, USER_MASK, USER_SHIFT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int titleRes) add
(int groupId, int itemId, int order, int titleRes) add
(int groupId, int itemId, int order, CharSequence title) add
(CharSequence title) int
addIntentOptions
(int groupId, int itemId, int order, ComponentName caller, Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems) addSubMenu
(int titleRes) addSubMenu
(int groupId, int itemId, int order, int titleRes) addSubMenu
(int groupId, int itemId, int order, CharSequence title) addSubMenu
(CharSequence title) void
clear()
void
close()
findItem
(int id) findMenuItem
(CharSequence title) findMenuItemContaining
(CharSequence desiredText) getItem
(int index) boolean
boolean
isShortcutKey
(int keyCode, KeyEvent event) boolean
performIdentifierAction
(int id, int flags) boolean
performShortcut
(int keyCode, KeyEvent event, int flags) void
removeGroup
(int groupId) void
removeItem
(int id) void
setGroupCheckable
(int group, boolean checkable, boolean exclusive) void
setGroupEnabled
(int group, boolean enabled) void
setGroupVisible
(int group, boolean visible) void
setQwertyMode
(boolean isQwerty) int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface android.view.Menu
setGroupDividerEnabled, setOptionalIconsVisible
-
Constructor Details
-
RoboMenu
public RoboMenu() -
RoboMenu
-
-
Method Details
-
add
-
add
-
add
-
add
-
addSubMenu
- Specified by:
addSubMenu
in interfaceMenu
-
addSubMenu
- Specified by:
addSubMenu
in interfaceMenu
-
addSubMenu
- Specified by:
addSubMenu
in interfaceMenu
-
addSubMenu
- Specified by:
addSubMenu
in interfaceMenu
-
addIntentOptions
public int addIntentOptions(int groupId, int itemId, int order, ComponentName caller, Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems) - Specified by:
addIntentOptions
in interfaceMenu
-
removeItem
public void removeItem(int id) - Specified by:
removeItem
in interfaceMenu
-
removeGroup
public void removeGroup(int groupId) - Specified by:
removeGroup
in interfaceMenu
-
clear
public void clear() -
setGroupCheckable
public void setGroupCheckable(int group, boolean checkable, boolean exclusive) - Specified by:
setGroupCheckable
in interfaceMenu
-
setGroupVisible
public void setGroupVisible(int group, boolean visible) - Specified by:
setGroupVisible
in interfaceMenu
-
setGroupEnabled
public void setGroupEnabled(int group, boolean enabled) - Specified by:
setGroupEnabled
in interfaceMenu
-
hasVisibleItems
public boolean hasVisibleItems()- Specified by:
hasVisibleItems
in interfaceMenu
-
findItem
-
size
public int size() -
getItem
-
close
public void close() -
performShortcut
- Specified by:
performShortcut
in interfaceMenu
-
isShortcutKey
- Specified by:
isShortcutKey
in interfaceMenu
-
performIdentifierAction
public boolean performIdentifierAction(int id, int flags) - Specified by:
performIdentifierAction
in interfaceMenu
-
setQwertyMode
public void setQwertyMode(boolean isQwerty) - Specified by:
setQwertyMode
in interfaceMenu
-
findMenuItem
-
findMenuItemContaining
-