public class RoboMenuItem
extends java.lang.Object
implements android.view.MenuItem
Robolectric implementation of MenuItem
.
Modifier and Type | Field and Description |
---|---|
android.graphics.drawable.Drawable |
icon |
Constructor and Description |
---|
RoboMenuItem() |
RoboMenuItem(android.content.Context context) |
RoboMenuItem(int itemId) |
Modifier and Type | Method and Description |
---|---|
void |
click() |
boolean |
collapseActionView() |
boolean |
expandActionView() |
android.view.ActionProvider |
getActionProvider() |
android.view.View |
getActionView() |
char |
getAlphabeticShortcut() |
int |
getGroupId() |
android.graphics.drawable.Drawable |
getIcon() |
android.content.Intent |
getIntent() |
int |
getItemId() |
android.view.ContextMenu.ContextMenuInfo |
getMenuInfo() |
char |
getNumericShortcut() |
int |
getOrder() |
android.view.SubMenu |
getSubMenu() |
java.lang.CharSequence |
getTitle() |
java.lang.CharSequence |
getTitleCondensed() |
boolean |
hasSubMenu() |
boolean |
isActionViewExpanded() |
boolean |
isCheckable() |
boolean |
isChecked() |
boolean |
isEnabled() |
boolean |
isVisible() |
android.view.MenuItem |
setActionProvider(android.view.ActionProvider actionProvider) |
android.view.MenuItem |
setActionView(int resId) |
android.view.MenuItem |
setActionView(android.view.View view) |
android.view.MenuItem |
setAlphabeticShortcut(char alphaChar) |
android.view.MenuItem |
setCheckable(boolean checkable) |
android.view.MenuItem |
setChecked(boolean checked) |
android.view.MenuItem |
setEnabled(boolean enabled) |
void |
setGroupId(int groupId) |
android.view.MenuItem |
setIcon(android.graphics.drawable.Drawable icon) |
android.view.MenuItem |
setIcon(int iconRes) |
android.view.MenuItem |
setIntent(android.content.Intent intent) |
void |
setItemId(int itemId) |
android.view.MenuItem |
setNumericShortcut(char numericChar) |
android.view.MenuItem |
setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener listener) |
android.view.MenuItem |
setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener menuItemClickListener) |
void |
setOrder(int order) |
android.view.MenuItem |
setShortcut(char numericChar,
char alphaChar) |
void |
setShowAsAction(int actionEnum) |
android.view.MenuItem |
setShowAsActionFlags(int actionEnum) |
void |
setSubMenu(android.view.SubMenu subMenu) |
android.view.MenuItem |
setTitle(java.lang.CharSequence title) |
android.view.MenuItem |
setTitle(int title) |
android.view.MenuItem |
setTitleCondensed(java.lang.CharSequence title) |
android.view.MenuItem |
setVisible(boolean visible) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlphabeticModifiers, getContentDescription, getIconTintList, getIconTintMode, getNumericModifiers, getTooltipText, requiresActionButton, requiresOverflow, setAlphabeticShortcut, setContentDescription, setIconTintList, setIconTintMode, setNumericShortcut, setShortcut, setTooltipText
public RoboMenuItem()
public RoboMenuItem(android.content.Context context)
public RoboMenuItem(int itemId)
public void setItemId(int itemId)
public void setGroupId(int groupId)
public int getItemId()
getItemId
in interface android.view.MenuItem
public int getGroupId()
getGroupId
in interface android.view.MenuItem
public int getOrder()
getOrder
in interface android.view.MenuItem
public void setOrder(int order)
public android.view.MenuItem setTitle(java.lang.CharSequence title)
setTitle
in interface android.view.MenuItem
public android.view.MenuItem setTitle(int title)
setTitle
in interface android.view.MenuItem
public java.lang.CharSequence getTitle()
getTitle
in interface android.view.MenuItem
public android.view.MenuItem setTitleCondensed(java.lang.CharSequence title)
setTitleCondensed
in interface android.view.MenuItem
public java.lang.CharSequence getTitleCondensed()
getTitleCondensed
in interface android.view.MenuItem
public android.view.MenuItem setIcon(android.graphics.drawable.Drawable icon)
setIcon
in interface android.view.MenuItem
public android.view.MenuItem setIcon(int iconRes)
setIcon
in interface android.view.MenuItem
public android.graphics.drawable.Drawable getIcon()
getIcon
in interface android.view.MenuItem
public android.view.MenuItem setIntent(android.content.Intent intent)
setIntent
in interface android.view.MenuItem
public android.content.Intent getIntent()
getIntent
in interface android.view.MenuItem
public android.view.MenuItem setShortcut(char numericChar, char alphaChar)
setShortcut
in interface android.view.MenuItem
public android.view.MenuItem setNumericShortcut(char numericChar)
setNumericShortcut
in interface android.view.MenuItem
public char getNumericShortcut()
getNumericShortcut
in interface android.view.MenuItem
public android.view.MenuItem setAlphabeticShortcut(char alphaChar)
setAlphabeticShortcut
in interface android.view.MenuItem
public char getAlphabeticShortcut()
getAlphabeticShortcut
in interface android.view.MenuItem
public android.view.MenuItem setCheckable(boolean checkable)
setCheckable
in interface android.view.MenuItem
public boolean isCheckable()
isCheckable
in interface android.view.MenuItem
public android.view.MenuItem setChecked(boolean checked)
setChecked
in interface android.view.MenuItem
public boolean isChecked()
isChecked
in interface android.view.MenuItem
public android.view.MenuItem setVisible(boolean visible)
setVisible
in interface android.view.MenuItem
public boolean isVisible()
isVisible
in interface android.view.MenuItem
public android.view.MenuItem setEnabled(boolean enabled)
setEnabled
in interface android.view.MenuItem
public boolean isEnabled()
isEnabled
in interface android.view.MenuItem
public boolean hasSubMenu()
hasSubMenu
in interface android.view.MenuItem
public android.view.SubMenu getSubMenu()
getSubMenu
in interface android.view.MenuItem
public void setSubMenu(android.view.SubMenu subMenu)
public android.view.MenuItem setOnMenuItemClickListener(android.view.MenuItem.OnMenuItemClickListener menuItemClickListener)
setOnMenuItemClickListener
in interface android.view.MenuItem
public android.view.ContextMenu.ContextMenuInfo getMenuInfo()
getMenuInfo
in interface android.view.MenuItem
public void click()
public void setShowAsAction(int actionEnum)
setShowAsAction
in interface android.view.MenuItem
public android.view.MenuItem setShowAsActionFlags(int actionEnum)
setShowAsActionFlags
in interface android.view.MenuItem
public android.view.MenuItem setActionView(android.view.View view)
setActionView
in interface android.view.MenuItem
public android.view.MenuItem setActionView(int resId)
setActionView
in interface android.view.MenuItem
public android.view.View getActionView()
getActionView
in interface android.view.MenuItem
public android.view.MenuItem setActionProvider(android.view.ActionProvider actionProvider)
setActionProvider
in interface android.view.MenuItem
public android.view.ActionProvider getActionProvider()
getActionProvider
in interface android.view.MenuItem
public boolean expandActionView()
expandActionView
in interface android.view.MenuItem
public boolean collapseActionView()
collapseActionView
in interface android.view.MenuItem
public boolean isActionViewExpanded()
isActionViewExpanded
in interface android.view.MenuItem
public android.view.MenuItem setOnActionExpandListener(android.view.MenuItem.OnActionExpandListener listener)
setOnActionExpandListener
in interface android.view.MenuItem