Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

CarMenuItem.DisplayBehavior

public static final enum CarMenuItem.DisplayBehavior
extends Enum<CarMenuItem.DisplayBehavior>

java.lang.Object
   ↳ java.lang.Enum<androidx.car.widget.CarMenuItem.DisplayBehavior>
     ↳ androidx.car.widget.CarMenuItem.DisplayBehavior


Display behaviors for CarMenuItems. describes whether the items will be displayed on the toolbar or in the overflow menu.

Summary

Enum values

CarMenuItem.DisplayBehavior  ALWAYS

The item is always displayed on the toolbar, never in the overflow menu. 

CarMenuItem.DisplayBehavior  IF_ROOM

The item is displayed on the toolbar if there's room, otherwise in the overflow menu. 

CarMenuItem.DisplayBehavior  NEVER

The item is always displayed in the overflow menu, never on the toolbar. 

Public methods

static CarMenuItem.DisplayBehavior valueOf(String name)
static final DisplayBehavior[] values()

Inherited methods

Enum values

ALWAYS

public static final CarMenuItem.DisplayBehavior ALWAYS

The item is always displayed on the toolbar, never in the overflow menu.

IF_ROOM

public static final CarMenuItem.DisplayBehavior IF_ROOM

The item is displayed on the toolbar if there's room, otherwise in the overflow menu.

NEVER

public static final CarMenuItem.DisplayBehavior NEVER

The item is always displayed in the overflow menu, never on the toolbar.

Public methods

valueOf

public static CarMenuItem.DisplayBehavior valueOf (String name)

Parameters
name String

Returns
CarMenuItem.DisplayBehavior

values

public static final DisplayBehavior[] values ()

Returns
DisplayBehavior[]