MenuCompat

Added in 1.1.0

public final class MenuCompat


Helper for accessing features in Menu.

Summary

Public methods

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

Enable or disable the group dividers.

static void
@ReplaceWith(expression = "item.setShowAsAction(actionEnum)")
setShowAsAction(MenuItem item, int actionEnum)

This method is deprecated.

Use setShowAsAction directly.

Public methods

setGroupDividerEnabled

Added in 1.1.0
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

Added in 1.1.0
Deprecated in 1.1.0
@ReplaceWith(expression = "item.setShowAsAction(actionEnum)")
public static void setShowAsAction(MenuItem item, int actionEnum)

Call MenuItem.setShowAsAction().