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).
public PopupMenu(Context context, View anchor) sourcepublic PopupMenu(Context context, View anchor, int gravity) sourcepublic PopupMenu(Context context, View anchor, int gravity, int popupStyleAttr, int popupStyleRes) sourcepublic void setGravity(int gravity) sourcepublic int getGravity() sourcepublic View.OnTouchListener getDragToOpenListener() sourceA drag from the anchor does not open the menu: the listener takes no touch.
public void show() sourcepublic void dismiss() sourcepublic void setOnMenuItemClickListener(OnMenuItemClickListener listener) sourcepublic void setOnDismissListener(OnDismissListener listener) sourcepublic void setForceShowIcon(boolean forceShowIcon) empty body sourceMade 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.