https://kotlinlang.org logo
#compose
Title
# compose
z

Zach Klippenstein (he/him) [MOD]

02/22/2020, 10:49 PM
I’m trying to use
DropdownPopup
to create a simple Spinner control. I’ve passed
PopupProperties
with
isFocusable = true
, and the popup shows, but none of the children of the popup seem to be getting any click events and clicking outside the popup neither dismisses it nor sends click events to the underlying window. If I use
Dialog
instead of the popup, everything works as expected. Are popups broken?
👍 1
i

Ian Warwick

02/22/2020, 11:27 PM
Hey man. I am using
DropDownPopup
in quite a few places in my little playground app though I extended it a bit for items https://github.com/fluxtah/memset/blob/ff8268c54001260117850dc47282319b89662914/ui-shared/src/main/java/com/citizenwarwick/ui/widgets/DropDownMenu.kt
appreciate it might be a bit to dig through, usage is at bottom of this file https://github.com/fluxtah/memset/blob/fcebdc661bfec9c7a823f3b33f58c14bc390cb99/ui-shared/src/main/java/com/citizenwarwick/ui/card/CardList.kt composable function called
CardDropDownMenu
Menu looks like this and items are clickable with actions
@Zach Klippenstein (he/him) [MOD] did you figure this out? I think I hit what you are saying about
PopupProperties
for me when I use it it works for a while but then starts failing, popup shows and nothing else is clickable
z

Zach Klippenstein (he/him) [MOD]

02/24/2020, 6:02 PM
I don’t see anything obvious that your code is doing that mine isn’t – i mean the API is pretty simple. I’m guessing this is a bug, i just need to minimally reproduce and file it.
i

Ian Warwick

02/25/2020, 8:49 AM
@Zach Klippenstein (he/him) [MOD]yeh totally. For me it works for some of my drop downs but not others but up until now I was not using
PopupProperties
🤔
g

Gerardo Rodriguez

12/21/2022, 9:51 PM
Is this still happening to you? @Zach Klippenstein (he/him) [MOD] On Dialog, on
override fun onTouchEvent(event: MotionEvent): Boolean {
This always gives me “false”
val result = super.onTouchEvent(event)
Everytime I’m touching outside the dialog, so it “onDismissRequest” is never called
3 Views