Koneko Toujou
02/05/2023, 2:03 PMcompose.version=1.2.2
when i expand the dropdownmenu it opens
ANDROID: when i tap the same button to expand the menu, it closes and does not re-expand until pressed again
DESKTOP: when i tap the same button to expand the menu, it closes and re-expands even though it was not pressed again
is this intended? o.o
specifically
WINDOWS:
mouse down: nothing
mouse up: OPEN (click)
mouse down: DISMISS_REQUEST
mouse up: OPEN (click)
ANDROID:
touch down: nothing
touch up: OPEN (click)
touch down: DISMISS_REQUEST
touch up: nothing
Text(items[selectedIndex],modifier = Modifier.fillMaxWidth().clickable(onClick = { expanded = true; println("OPEN") }).background(Color.Cyan).height(48.dp))
DropdownMenu(
expanded = expanded,
onDismissRequest = { expanded = false; println("DISMISS, CLOSE") },
modifier = Modifier.fillMaxWidth().background(Color.Red)
) {
items.forEachIndexed { index, s ->
DropdownMenuItem(onClick = {
selectedIndex = index
expanded = false
println("ITEM SELECTED, CLOSE")
}) {
val disabledText = if (s == disabledValue) {
" (Disabled)"
} else {
""
}
Text(text = s + disabledText)
}
}
}
1.3.0
i still get the same behaviourAlertDialog
i do NOT get this behavior
specifically it behaves as expected for both android and desktop
touch down: nothing
touch up: OPEN (click)
touch down: DISMISS_REQUEST
touch up: nothing
DropdownMenu
this DOES NOT happen for AlertDialog