PopupMenu

Class of android.widget · PopupMenu.java · Android's reference

public class PopupMenu

A menu in a popup next to an anchor view. The popup is not drawn (see PopupWindow).

Nested types

Constructors

public PopupMenu(Context context, View anchor) source
public PopupMenu(Context context, View anchor, int gravity) source
public PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, int popupStyleRes) source

Methods

public void setGravity(int gravity) source
public int getGravity() source
public View.OnTouchListener getDragToOpenListener() source

A drag from the anchor does not open the menu: the listener takes no touch.

public void show() source
public void dismiss() source
public void setOnMenuItemClickListener(OnMenuItemClickListener listener) source
public void setOnDismissListener(OnDismissListener listener) source
public void setForceShowIcon(boolean forceShowIcon) empty body source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.