ExposedDropdownMenuBoxScope

Class
Common
@ExperimentalMaterialApi
abstract class ExposedDropdownMenuBoxScope

Scope for ExposedDropdownMenuBox.

Functions

abstract fun Modifier.exposedDropdownSize(matchTextFieldWidth: Boolean = true): Modifier

Modifier which should be applied to an ExposedDropdownMenu placed inside the scope. It's responsible for setting the width of the ExposedDropdownMenu, which will match the width of the TextField (if matchTextFieldWidth is set to true). Also it'll change the height of ExposedDropdownMenu, so it'll take the largest possible height to not overlap the TextField and the software keyboard.

Parameters

matchTextFieldWidth Whether menu should match the width of the text field to which it's attached. If set to true the width will match the width of the text field.
@Composable
    fun ExposedDropdownMenu(
        expanded: Boolean,
        onDismissRequest: () -> Unit,
        modifier: Modifier = Modifier,
        scrollState: ScrollState = rememberScrollState(),
        content: @Composable ColumnScope.() -> Unit,
    )

Popup which contains content for Exposed Dropdown Menu. Should be used inside the content of ExposedDropdownMenuBox.

Parameters

expanded Whether the menu is currently open and visible to the user
onDismissRequest Called when the user requests to dismiss the menu, such as by tapping outside the menu's bounds
modifier The modifier to apply to this layout
scrollState a ScrollState to used by the menu's content for items vertical scrolling
content The content of the ExposedDropdownMenu