belongs to Maven artifact androidx.core:core:1.0.0-alpha1

MenuCompat

public final class MenuCompat
extends Object

java.lang.Object
   ↳ androidx.core.view.MenuCompat


Helper for accessing features in Menu.

Summary

Public methods

static void setGroupDividerEnabled(Menu menu, boolean enabled)

Enable or disable the group dividers.

static void setShowAsAction(MenuItem item, int actionEnum)

This method is deprecated. Use MenuItem.setShowAsAction(int) directly.

Inherited methods

Public methods

setGroupDividerEnabled

void setGroupDividerEnabled (Menu menu, 
                boolean enabled)

Enable or disable the group dividers.

Parameters
menu Menu: Menu to enable/disable dividers on.

enabled boolean: True if enabled

setShowAsAction

void setShowAsAction (MenuItem item, 
                int actionEnum)

This method is deprecated.
Use MenuItem.setShowAsAction(int) directly.

Call MenuItem.setShowAsAction().

Parameters
item MenuItem

actionEnum int