public class MaterialPopupMenu
Holds all the required information for showing a popup menu.
| Modifier and Type | Method and Description |
|---|---|
void |
dismiss()
Dismisses the popup window.
|
void |
setOnDismissListener(kotlin.jvm.functions.Function0<kotlin.Unit> listener)
Sets a listener that is called when this popup window is dismissed.
|
void |
show(android.content.Context context,
android.view.View anchor)
Shows a popup menu in the UI.
|
@UiThread
public void show(@NotNull
android.content.Context context,
@NotNull
android.view.View anchor)
Shows a popup menu in the UI.
This must be called on the UI thread.
context - Contextanchor - view used to anchor the popup@UiThread public void dismiss()
Dismisses the popup window.
public void setOnDismissListener(@Nullable
kotlin.jvm.functions.Function0<kotlin.Unit> listener)
Sets a listener that is called when this popup window is dismissed.
listener - Listener that is called when this popup window is dismissed.