public static class MaterialPopupMenuBuilder.ItemHolder extends MaterialPopupMenuBuilder.AbstractItemHolder
Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem.
| Constructor and Description |
|---|
ItemHolder()
Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem.
|
| Modifier and Type | Method and Description |
|---|---|
com.github.zawadz88.materialpopupmenu.MaterialPopupMenu.PopupMenuItem |
convertToPopupMenuItem$module() |
boolean |
getHasNestedItems()
Optional. If set to true this will show a "menu-end" icon, which indicates that there might be a submenu shown.
false by default.
|
int |
getIcon()
Optional icon to be displayed together with the label.
|
int |
getIconColor()
Optional icon tint color.
|
android.graphics.drawable.Drawable |
getIconDrawable()
Optional icon to be displayed together with the label.
|
java.lang.CharSequence |
getLabel()
Item label.
|
int |
getLabelColor()
Optional text color of the label. If not set or 0 the default color will be used.
|
int |
getLabelRes()
Item label.
|
void |
setHasNestedItems(boolean p)
Optional. If set to true this will show a "menu-end" icon, which indicates that there might be a submenu shown.
false by default.
|
void |
setIcon(int p)
Optional icon to be displayed together with the label.
|
void |
setIconColor(int p)
Optional icon tint color.
|
void |
setIconDrawable(android.graphics.drawable.Drawable p)
Optional icon to be displayed together with the label.
|
void |
setLabel(java.lang.CharSequence p)
Item label.
|
void |
setLabelColor(int p)
Optional text color of the label. If not set or 0 the default color will be used.
|
void |
setLabelRes(int p)
Item label.
|
java.lang.String |
toString() |
getCallback, getDismissOnSelect, getViewBoundCallback, resolveViewBoundCallback, setCallback, setDismissOnSelect, setViewBoundCallbackpublic ItemHolder()
Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem.
@Nullable public java.lang.CharSequence getLabel()
Item label.
This is a required field and must not be null, unless you specify a label
using labelRes.
public void setLabel(@Nullable
java.lang.CharSequence p)
Item label.
This is a required field and must not be null, unless you specify a label
using labelRes.
public int getLabelRes()
Item label.
This must be a valid string resource ID if set.
This is a required field and must not be 0, unless you specify a label
using label.
public void setLabelRes(int p)
Item label.
This must be a valid string resource ID if set.
This is a required field and must not be 0, unless you specify a label
using label.
public int getLabelColor()
Optional text color of the label. If not set or 0 the default color will be used.
public void setLabelColor(int p)
Optional text color of the label. If not set or 0 the default color will be used.
public int getIcon()
Optional icon to be displayed together with the label.
This must be a valid drawable resource ID if set. 0 Means that no icon should be displayed.
Alternatively, you can set the drawable using iconDrawable.
If both icon and iconDrawable are set iconDrawable will be used.
iconDrawable,
icon,
iconDrawable,
iconDrawablepublic void setIcon(int p)
Optional icon to be displayed together with the label.
This must be a valid drawable resource ID if set. 0 Means that no icon should be displayed.
Alternatively, you can set the drawable using iconDrawable.
If both icon and iconDrawable are set iconDrawable will be used.
iconDrawable,
icon,
iconDrawable,
iconDrawable@Nullable public android.graphics.drawable.Drawable getIconDrawable()
Optional icon to be displayed together with the label.
null Means that no icon should be displayed.
Alternatively, you can set the drawable using icon.
If both icon and iconDrawable are set iconDrawable will be used.
icon,
icon,
iconDrawable,
iconDrawablepublic void setIconDrawable(@Nullable
android.graphics.drawable.Drawable p)
Optional icon to be displayed together with the label.
null Means that no icon should be displayed.
Alternatively, you can set the drawable using icon.
If both icon and iconDrawable are set iconDrawable will be used.
icon,
icon,
iconDrawable,
iconDrawablepublic int getIconColor()
Optional icon tint color.
This must be a valid color Int if set. 0 Means that default tinting will be applied.
public void setIconColor(int p)
Optional icon tint color.
This must be a valid color Int if set. 0 Means that default tinting will be applied.
public boolean getHasNestedItems()
Optional. If set to true this will show a "menu-end" icon, which indicates that there might be a submenu shown. false by default.
public void setHasNestedItems(boolean p)
Optional. If set to true this will show a "menu-end" icon, which indicates that there might be a submenu shown. false by default.
@NotNull public java.lang.String toString()
@NotNull public com.github.zawadz88.materialpopupmenu.MaterialPopupMenu.PopupMenuItem convertToPopupMenuItem$module()