public class RoboMenu
extends java.lang.Object
implements android.view.Menu
Robolectric implementation of Menu
.
Constructor and Description |
---|
RoboMenu() |
RoboMenu(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
android.view.MenuItem |
add(java.lang.CharSequence title) |
android.view.MenuItem |
add(int titleRes) |
android.view.MenuItem |
add(int groupId,
int itemId,
int order,
java.lang.CharSequence title) |
android.view.MenuItem |
add(int groupId,
int itemId,
int order,
int titleRes) |
int |
addIntentOptions(int groupId,
int itemId,
int order,
android.content.ComponentName caller,
android.content.Intent[] specifics,
android.content.Intent intent,
int flags,
android.view.MenuItem[] outSpecificItems) |
android.view.SubMenu |
addSubMenu(java.lang.CharSequence title) |
android.view.SubMenu |
addSubMenu(int titleRes) |
android.view.SubMenu |
addSubMenu(int groupId,
int itemId,
int order,
java.lang.CharSequence title) |
android.view.SubMenu |
addSubMenu(int groupId,
int itemId,
int order,
int titleRes) |
void |
clear() |
void |
close() |
android.view.MenuItem |
findItem(int id) |
RoboMenuItem |
findMenuItem(java.lang.CharSequence title) |
RoboMenuItem |
findMenuItemContaining(java.lang.CharSequence desiredText) |
android.view.MenuItem |
getItem(int index) |
boolean |
hasVisibleItems() |
boolean |
isShortcutKey(int keyCode,
android.view.KeyEvent event) |
boolean |
performIdentifierAction(int id,
int flags) |
boolean |
performShortcut(int keyCode,
android.view.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() |
public RoboMenu()
public RoboMenu(android.content.Context context)
public android.view.MenuItem add(java.lang.CharSequence title)
add
in interface android.view.Menu
public android.view.MenuItem add(int titleRes)
add
in interface android.view.Menu
public android.view.MenuItem add(int groupId, int itemId, int order, java.lang.CharSequence title)
add
in interface android.view.Menu
public android.view.MenuItem add(int groupId, int itemId, int order, int titleRes)
add
in interface android.view.Menu
public android.view.SubMenu addSubMenu(java.lang.CharSequence title)
addSubMenu
in interface android.view.Menu
public android.view.SubMenu addSubMenu(int titleRes)
addSubMenu
in interface android.view.Menu
public android.view.SubMenu addSubMenu(int groupId, int itemId, int order, java.lang.CharSequence title)
addSubMenu
in interface android.view.Menu
public android.view.SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes)
addSubMenu
in interface android.view.Menu
public int addIntentOptions(int groupId, int itemId, int order, android.content.ComponentName caller, android.content.Intent[] specifics, android.content.Intent intent, int flags, android.view.MenuItem[] outSpecificItems)
addIntentOptions
in interface android.view.Menu
public void removeItem(int id)
removeItem
in interface android.view.Menu
public void removeGroup(int groupId)
removeGroup
in interface android.view.Menu
public void clear()
clear
in interface android.view.Menu
public void setGroupCheckable(int group, boolean checkable, boolean exclusive)
setGroupCheckable
in interface android.view.Menu
public void setGroupVisible(int group, boolean visible)
setGroupVisible
in interface android.view.Menu
public void setGroupEnabled(int group, boolean enabled)
setGroupEnabled
in interface android.view.Menu
public boolean hasVisibleItems()
hasVisibleItems
in interface android.view.Menu
public android.view.MenuItem findItem(int id)
findItem
in interface android.view.Menu
public int size()
size
in interface android.view.Menu
public android.view.MenuItem getItem(int index)
getItem
in interface android.view.Menu
public void close()
close
in interface android.view.Menu
public boolean performShortcut(int keyCode, android.view.KeyEvent event, int flags)
performShortcut
in interface android.view.Menu
public boolean isShortcutKey(int keyCode, android.view.KeyEvent event)
isShortcutKey
in interface android.view.Menu
public boolean performIdentifierAction(int id, int flags)
performIdentifierAction
in interface android.view.Menu
public void setQwertyMode(boolean isQwerty)
setQwertyMode
in interface android.view.Menu
public RoboMenuItem findMenuItem(java.lang.CharSequence title)
public RoboMenuItem findMenuItemContaining(java.lang.CharSequence desiredText)