Skip to content

Instantly share code, notes, and snippets.

@arriolac
Created October 10, 2023 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arriolac/6fd0437bb3c2bd5aecef4079daefd330 to your computer and use it in GitHub Desktop.
Save arriolac/6fd0437bb3c2bd5aecef4079daefd330 to your computer and use it in GitHub Desktop.
Using DropDownCheckboxMenuView in Compose using AndroidView
// Copyright 2023 Google LLC.
// SPDX-License-Identifier: Apache-2.0
AndroidView(
factory = { context ->
// Create DropDownCheckboxMenuView here
DropDownCheckboxMenuView(context)
},
update = { view ->
// Update DropDownCheckboxMenuView when `items` or `onItemToggled` changes here
view.setItems(items)
view.setOnItemToggled(onItemToggled)
},
modifier = Modifier.width(400.dp)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment