MenuCompat

public final class MenuCompat


Helper for accessing features in Menu.

Summary

Public constructors

Public methods

static void
setGroupDividerEnabled(@NonNull Menu menu, boolean enabled)

Enable or disable the group dividers.

static void
setShowAsAction(MenuItem item, int actionEnum)

This method is deprecated.

Use setShowAsAction directly.

Public constructors

public final MenuCompat()

Public methods

setGroupDividerEnabled

public static void setGroupDividerEnabled(@NonNull Menu menu, boolean enabled)

Enable or disable the group dividers.

Parameters
@NonNull Menu menu

Menu to enable/disable dividers on.

boolean enabled

True if enabled

setShowAsAction

public static void setShowAsAction(MenuItem item, int actionEnum)

Call MenuItem.setShowAsAction().