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

ViewBoundCallback

class ViewBoundCallback : (View) -> Unit

Callback to be invoked once the custom item view gets created and bound. It is to be used when some views inside need to be updated once inflated.

This class is an extension for closure based callback that provides additional functionality such as dismissing popup.

Parameters

callback - block of the callback in which you can bind the given view

Constructors

<init>

ViewBoundCallback(callback: ViewBoundCallback.(View) -> Unit)

Callback to be invoked once the custom item view gets created and bound. It is to be used when some views inside need to be updated once inflated.

Functions

dismissPopup

fun dismissPopup(): Unit

Dismisses the shown popup.

invoke

fun invoke(view: View): Unit