Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
ma...@protonmail.com <ma...@protonmail.com> #2
This also affects DropdownMenu
, e.g. when replacing the ExposedDropdownMenuBox
content above with
DropdownMenu(expanded, { }) {
DropdownMenuItem({ }) { Text(text = "abc") }
DropdownMenuItem({ }) { Text(text = "def") }
}
rt...@squareup.com <rt...@squareup.com> #3
we're also experiencing this
ma...@google.com <ma...@google.com>
go...@umito.nl <go...@umito.nl> #4
Same here, my previews with a expanded DropDownMenu do take up space, but no menu is shown.
jg...@google.com <jg...@google.com>
jg...@google.com <jg...@google.com>
os...@adyen.com <os...@adyen.com> #5
This is still happening. However, it looks like the DropdownMenu
is rendered outside of the preview (see screenshot). Note that running the preview on a device does render it correctly.
Here is the code I'm using:
@Preview(showBackground = true)
@Composable
private fun MenuPreview() {
Column {
Row(modifier = Modifier.fillMaxWidth().padding(16.dp)) {
Text("1")
}
Row(modifier = Modifier.fillMaxWidth().padding(16.dp)) {
Text("2")
DropdownMenu(true, {}) {
DropdownMenuItem({ Text("Test") }, {})
}
}
Row(modifier = Modifier.fillMaxWidth().padding(16.dp)) {
Text("3")
}
}
}
Additional info:
- Kotlin version: 2.0.21
- AGP: 8.7.1
- Compose BoM: 2024.10.01
- Android Studio: Android Studio Ladybug | 2024.2.1 Patch 1 | Build #AI-242.23339.11.2421.12483815, built on October 10, 2024
jg...@google.com <jg...@google.com>
jg...@google.com <jg...@google.com>
an...@google.com <an...@google.com> #6
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Narwhal | 2025.1.1 Canary 2
- Android Gradle Plugin 8.11.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Jetpack Compose version: 1.6.0-beta03
Jetpack Compose component used: ExposedDropdownMenuBox
Android Studio Build: Android Studio Hedgehog | 2023.1.1 | Build #AI-231.9392.1.2311.11076708, built on November 10, 2023
Kotlin version: 1.9.21
Steps to Reproduce or Code Sample to Reproduce:
DropdownMenuItem
s in the preview window. Instead, I can only see a wireframe outline of them (see screenshots). This makes the components quite difficult to develop with.Side note, the official ExposedDropdown menu components in Material Compose have been pretty difficult to get right for a while now (e.g. subtle, difficult to diagnose focus and placement issues). My workaround has been to implement the dropdown pattern using
Column
/LazyColumn
plus bareDropdownMenuItems
, which functionally 'just works', but lacks the extra Material Design sparkle.So I'm really looking forward to when the official Material Compose ExposedDropdown implementation becomes more polished :)