FixedActionMenuItem

constructor(@NonNull context: Context, @IdRes itemId: Int, @DrawableRes drawableResId: Int, @StringRes labelResId: Int)

Create fixed menu item.

Parameters

context

Context used for retrieving drawable with drawableResId from resources.

itemId

Id used to identify this menu item.

drawableResId

Resource id of the menu item's icon.

labelResId

resource id of the menu item's label.


constructor(@NonNull context: Context, @IdRes itemId: Int, @DrawableRes drawableResId: Int, label: String)

Create fixed menu item.

Parameters

context

Context used for retrieving drawable with drawableResId from resources.

itemId

Id used to identify this menu item.

drawableResId

Resource id of the menu item's icon.

label

Label of the menu item.


constructor(@IdRes itemId: Int, @NonNull icon: Drawable, @NonNull label: String)

Create fixed menu item.

Parameters

itemId

Resource id representing menu item.

icon

Icon for the menu item, drawn as it is: unlike an icon from a drawable resource, the action menu doesn't tint it, so a full-color drawable such as a logo keeps its colors.

label

Label of the menu item.