Google is committed to advancing racial equity for Black communities. See how.

MenuCompat

class MenuCompat
kotlin.Any
   ↳ androidx.core.view.MenuCompat

Helper for accessing features in android.view.Menu.

Summary

Public methods
static Unit
setGroupDividerEnabled(menu: Menu!, enabled: Boolean)

Enable or disable the group dividers.

static Unit
setShowAsAction(item: MenuItem!, actionEnum: Int)

Call MenuItem.setShowAsAction().

Public methods

setGroupDividerEnabled

static fun setGroupDividerEnabled(
    menu: Menu!,
    enabled: Boolean
): Unit

Enable or disable the group dividers.

Parameters
menu Menu!: Menu to enable/disable dividers on.
enabled Boolean: True if enabled

setShowAsAction

static fun setShowAsAction(
    item: MenuItem!,
    actionEnum: Int
): Unit

Deprecated: Use MenuItem#setShowAsAction(int) directly.

Call MenuItem.setShowAsAction().