Class PopupToolbarMenuItem

  • All Implemented Interfaces:

    
    public class PopupToolbarMenuItem
    
                        

    A class representation of a single popup toolbar menu item.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final int id
      public final int title
      public boolean isEnabled
    • Constructor Summary

      Constructors 
      Constructor Description
      PopupToolbarMenuItem(int id, int title) Creates a menu item with given id and title.
      PopupToolbarMenuItem(int id, int title, boolean isEnabled) Creates a menu item with given id and title.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getId() Gets the menu item id.
      int getTitle() Gets the menu item title resource string.
      boolean isEnabled() Gets whether the menu item is enabled or not.
      void setEnabled(boolean enabled) Sets whether the menu item is enabled or not.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PopupToolbarMenuItem

        PopupToolbarMenuItem(int id, int title)
        Creates a menu item with given id and title.
        Parameters:
        id - The menu item id.
        title - The menu item title string resource.
      • PopupToolbarMenuItem

        PopupToolbarMenuItem(int id, int title, boolean isEnabled)
        Creates a menu item with given id and title.
        Parameters:
        id - The menu item id.
        title - The menu item title string resource.
        isEnabled - true to make the menu item enabled, false to disable it.
    • Method Detail

      • getId

         int getId()

        Gets the menu item id.

        Returns:

        Id of the menu item.

      • getTitle

         int getTitle()

        Gets the menu item title resource string.

        Returns:

        String resource of this menu item title.

      • isEnabled

         boolean isEnabled()

        Gets whether the menu item is enabled or not.

        Returns:

        true if item is enabled, false if disabled.

      • setEnabled

         void setEnabled(boolean enabled)

        Sets whether the menu item is enabled or not.

        Parameters:
        enabled - true to enable the menu item, false to disable it.