Package icyllis.modernui.widget

# Class MenuPopupWindow

java.lang.Object
icyllis.modernui.widget.ListPopupWindow
icyllis.modernui.widget.MenuPopupWindow

All Implemented Interfaces:
  `ShowableListMenu`, `MenuItemHoverListener`

public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverListener
A MenuPopupWindow represents the popup window for menu.

MenuPopupWindow is mostly same as ListPopupWindow, but it has customized behaviors specific to menus,

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `MenuPopupWindow.MenuDropDownListView`

- ## Field Summary

  ### Fields inherited from class icyllis.modernui.widget.ListPopupWindow

  `POSITION_PROMPT_ABOVE, POSITION_PROMPT_BELOW`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MenuPopupWindow(Context context)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onItemHoverEnter(MenuBuilder menu, MenuItem item)`
  Called when hover enters a menu item.
  `void`
  `onItemHoverExit(MenuBuilder menu, MenuItem item)`
  Called when hover exits a menu item.
  `void`
  `setEnterTransition(Transition enterTransition)`
  `void`
  `setExitTransition(Transition exitTransition)`
  `void`
  `setHoverListener(MenuItemHoverListener hoverListener)`
  `void`
  `setTouchModal(boolean touchModal)`
  Set whether this window is touch modal or if outside touches will be sent to other windows behind it.

  ### Methods inherited from class icyllis.modernui.widget.ListPopupWindow

  `clearListSelection, dismiss, dismissImmediate, getAnchorView, getBackground, getEpicenterBounds, getHeight, getHorizontalOffset, getListView, getPromptPosition, getSelectedItem, getSelectedItemId, getSelectedItemPosition, getSelectedView, getVerticalOffset, getWidth, isDropDownAlwaysVisible, isModal, isShowing, performItemClick, postShow, setAdapter, setAnchorView, setBackgroundDrawable, setContentWidth, setDropDownAlwaysVisible, setDropDownGravity, setEpicenterBounds, setForceIgnoreOutsideTouch, setHeight, setHorizontalOffset, setListSelector, setModal, setOnDismissListener, setOnItemClickListener, setOnItemSelectedListener, setOverlapAnchor, setPromptPosition, setPromptView, setSelection, setVerticalOffset, setWidth, show`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MenuPopupWindow

    public MenuPopupWindow(Context context)

- ## Method Details

  - ### setEnterTransition

    public void setEnterTransition(Transition enterTransition)

  - ### setExitTransition

    public void setExitTransition(Transition exitTransition)

  - ### setHoverListener

    public void setHoverListener(MenuItemHoverListener hoverListener)

  - ### setTouchModal

    public void setTouchModal(boolean touchModal)
    Set whether this window is touch modal or if outside touches will be sent to other windows behind it.

  - ### onItemHoverEnter

    public void onItemHoverEnter(@Nonnull MenuBuilder menu, @Nonnull MenuItem item)
    Description copied from interface: `MenuItemHoverListener`
    Called when hover enters a menu item.
    Specified by:
      `onItemHoverEnter` in interface `MenuItemHoverListener`
    Parameters:
      `menu` - the item's parent menu
      `item` - the hovered menu item

  - ### onItemHoverExit

    public void onItemHoverExit(@Nonnull MenuBuilder menu, @Nonnull MenuItem item)
    Description copied from interface: `MenuItemHoverListener`
    Called when hover exits a menu item.

    If hover is moving to another item, this method will be called before `MenuItemHoverListener.onItemHoverEnter(MenuBuilder, MenuItem)` for the newly-hovered item.

    Specified by:
      `onItemHoverExit` in interface `MenuItemHoverListener`
    Parameters:
      `menu` - the item's parent menu
      `item` - the hovered menu item