https://kotlinlang.org logo
j

Jakub Ledwon

02/12/2021, 4:56 PM
Hi, I implemented a simple NumberPicker widget which works by using
draggable
. Now I want to use it inside a
LazyColumn
, but when I'm picking the number, column's content is scrolling as well. What is the easiest way to block scrolling for parent in this situation? Should I use
nestedScroll
modifier or something else?
v

Vsevolod Ganin

02/12/2021, 5:34 PM
Strange. I have my own
NumberPicker
implementation, it also uses
draggable
and resides as item of
LazyColumn
, but scrolling it doesn’t scroll
LazyColumn
in any way
j

Jakub Ledwon

02/12/2021, 5:38 PM
That is weird, may I ask which properties from
dragabble
did you use for your
NumberPicker
may be that can cause some troubles?
v

Vsevolod Ganin

02/12/2021, 5:40 PM
Yeah, I have my implementation public on gist, just need to update it to alpha12. Wait a sec
(It uses some of my internal garbage but it should be easy to rip it off to get the idea)
🙏 1
j

Jakub Ledwon

02/14/2021, 6:45 PM
I've tried your
NumberPicker
, although I've modified it for compose alpha11, because I use koin and it struggles with 12, and unfortunately it is scrolling column as well while flinging 😕 .
I've found a solution, I don't know if this is a proper one, but setting
startDragImmediately
to true worked like a charm for me
2 Views