https://kotlinlang.org logo
#compose-wear
Title
# compose-wear
j

Jonathan

11/01/2023, 3:48 PM
I was able to achieve what I wanted but I had to copy Picker source code into my app. Is there a particular reason why
PickerState.scalingLazyListState
is marked internal? I assume this same limitation is why Horologist has an internal copy of Picker.
s

stevebower

11/01/2023, 4:10 PM
Hi - it's an implementation detail of Picker that it uses ScalingLazyColumn, so it's right that scalingLazyListState is internal. We are working on rotary support for Picker, which will provide similar functionality to the rotary modifiers already available in Horologist.
j

Jonathan

11/01/2023, 4:13 PM
Do you know why Picker is private inside of Horologist?
y

yschimke

11/01/2023, 6:04 PM
It's an implementation detail to support date and time pickers. Bit confusing if we copy and paste another one.
j

Jonathan

11/01/2023, 6:05 PM
Understood.
s

stevebower

11/01/2023, 6:28 PM
Thanks for highlighting the issue - it is something we're working on, the ideal situation is that the Picker supports rotary with snapping by default.
j

Jonathan

11/01/2023, 6:29 PM
Could you also add in support for rotary snapping w/ Horizontal & Vertical Pager
y

yschimke

11/01/2023, 6:37 PM
I forgot. Horologist has a public API to convert so you can use it with the other modifiers.
public fun androidx.wear.compose.material.PickerState.toRotaryScrollAdapter(): RotaryScrollAdapter =
j

Jonathan

11/01/2023, 6:39 PM
What version of the library includes this function? I am unable to call this function using “0.5.9”
y

yschimke

11/01/2023, 6:41 PM
Compostables library