added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

MenuCompat

public final class MenuCompat
extends Object

java.lang.Object
   ↳ android.support.v4.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 22.1.0. Use setShowAsAction(int) directly.

Inherited methods

From class java.lang.Object

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

added in version 22.1.0
void setShowAsAction (MenuItem item, 
                int actionEnum)

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

Call MenuItem.setShowAsAction().

Parameters
item MenuItem

actionEnum int