/ExposedDropdownMenu

Exposed Dropdown Menu

Primary LanguageKotlinApache License 2.0Apache-2.0

Exposed Dropdown Menu for Jetpack Compose


  • This project is deprecated!
  • Use this instead.

Release

An exposed dropdown menu for Jetpack Compose

Usage

Add it to your build.gradle with:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and:

dependencies {
    implementation 'com.github.zigellsn:exposeddropdownmenu:{latest version}'
}

and use it like this:

@Composable
fun ShowExposedDropdownMenu() {
    // ...
    ExposedDropdownMenu(
        items = listOf("A", "B", "C"),
        label = { Text(text = "Letters") },
        selectedItem = { id, text ->
            // Do something
        }
    ) { text, _ ->
        Text(text = text)
    }
    // ...
}