Package org.robolectric.fakes
Class RoboMenu
java.lang.Object
org.robolectric.fakes.RoboMenu
- All Implemented Interfaces:
Menu
- Direct Known Subclasses:
RoboSubMenu
public class RoboMenu extends Object implements Menu
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 Type Method Description MenuItem
add(int titleRes)
MenuItem
add(int groupId, int itemId, int order, int titleRes)
MenuItem
add(int groupId, int itemId, int order, CharSequence title)
MenuItem
add(CharSequence title)
int
addIntentOptions(int groupId, int itemId, int order, ComponentName caller, Intent[] specifics, Intent intent, int flags, MenuItem[] outSpecificItems)
SubMenu
addSubMenu(int titleRes)
SubMenu
addSubMenu(int groupId, int itemId, int order, int titleRes)
SubMenu
addSubMenu(int groupId, int itemId, int order, CharSequence title)
SubMenu
addSubMenu(CharSequence title)
void
clear()
void
close()
MenuItem
findItem(int id)
RoboMenuItem
findMenuItem(CharSequence title)
RoboMenuItem
findMenuItemContaining(CharSequence desiredText)
MenuItem
getItem(int index)
boolean
hasVisibleItems()
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()
-
Constructor Details
-
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
-