Java android.widget PopupMenu fields, constructors, methods, implement or subclass

Example usage for Java android.widget PopupMenu fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget PopupMenu.

The text is from its open source code.

Subclass

android.widget.PopupMenu has subclasses.
Click this link to see all its subclasses.

Constructor

PopupMenu(Context context, View anchor)
Constructor to create a new popup menu with an anchor view.
PopupMenu(Context context, View anchor, int gravity)
Constructor to create a new popup menu with an anchor view and alignment gravity.

Method

voiddismiss()
Dismiss the menu popup.
ClassgetClass()
Returns the runtime class of this Object .
OnTouchListenergetDragToOpenListener()
Returns an OnTouchListener that can be added to the anchor view to implement drag-to-open behavior.
MenugetMenu()
Returns the Menu associated with this popup.
MenuInflatergetMenuInflater()
voidinflate(@MenuRes int menuRes)
Inflate a menu resource into this PopupMenu.
voidsetOnDismissListener(OnDismissListener listener)
Sets a listener that will be notified when this menu is dismissed.
voidsetOnMenuItemClickListener(OnMenuItemClickListener listener)
Sets a listener that will be notified when the user selects an item from the menu.
voidshow()
Show the menu popup anchored to the view specified during construction.