material-popup-menu / com.github.zawadz88.materialpopupmenu / MaterialPopupMenu

MaterialPopupMenu

class MaterialPopupMenu

Holds all the required information for showing a popup menu.

Parameters

style - Style of the popup menu. See MaterialPopupMenuBuilder.style

dropdownGravity - Gravity of the dropdown list. See MaterialPopupMenuBuilder.dropdownGravity

sections - a list of sections

Author
Piotr Zawadzki

Functions

dismiss

fun dismiss(): Unit

Dismisses the popup window.

setOnDismissListener

fun setOnDismissListener(listener: (() -> Unit)?): Unit

Sets a listener that is called when this popup window is dismissed.

show

fun show(context: Context, anchor: View): Unit

Shows a popup menu in the UI.