class MaterialPopupMenuBuilder
Builder for creating a MaterialPopupMenu.
The MaterialPopupMenu must have at least one section. All sections must also have at least one item and each item must have a non-null label set.
Author
Piotr Zawadzki
abstract class AbstractItemHolder |
|
class CustomItemHolder : MaterialPopupMenuBuilder.AbstractItemHolder
Holds section custom item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuCustomItem. |
|
class ItemHolder : MaterialPopupMenuBuilder.AbstractItemHolder
Holds section item info for the builder. This gets converted to MaterialPopupMenu.PopupMenuItem. |
|
class SectionHolder
Holds section info for the builder. This gets converted to MaterialPopupMenu.PopupMenuSection. |
MaterialPopupMenuBuilder()
Builder for creating a MaterialPopupMenu. |
var dropdownGravity: Int
Gravity of the dropdown list. This is commonly used to set gravity to START or END for alignment with the anchor. Setting Gravity.BOTTOM will anchor the dropdown list below the view. |
|
var dropDownHorizontalOffset: Int?
Setting this to non- |
|
var dropDownVerticalOffset: Int?
Setting this to non- |
|
var fixedContentWidthInPx: Int
Setting this to a non-zero value will force the width of the popup menu to be exactly this value. If set to 0, the default mechanism for measuring popup menu width will be applied. |
|
var style: Int
Style of the popup menu. |
fun build(): MaterialPopupMenu
Creates a MaterialPopupMenu with the already configured params. |
|
fun section(: MaterialPopupMenuBuilder.SectionHolder.() -> Unit): Unit
Adds a new section to the popup menu. |