Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.0.0-rc01

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 was deprecated in API level 1.0.0. Use MenuItem.setShowAsAction(int) directly.

Inherited methods

Public methods

setGroupDividerEnabled

added in version 1.0.0
public static 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

added in version 1.0.0
public static void setShowAsAction (MenuItem item, 
                int actionEnum)

This method was deprecated in API level 1.0.0.
Use MenuItem.setShowAsAction(int) directly.

Call MenuItem.setShowAsAction().

Parameters
item MenuItem

actionEnum int