They know how to implement the scroll by bezel (Galaxy watch 4 Classic) in wear os 3.0 with jetpack compose
In the documentation it mentions the use of ScalingLazyListState or ScrollState but so far the scroll with the rotating bezel of my device has not been recognized.
if anyone has information or an example it would help me a lot.
In Wear Compose Alpha 15, it is now supported.
val focusRequester = remember { FocusRequester() }
ScalingLazyColumn(
modifier = modifier
.fillMaxSize()
.onRotaryScrollEvent {
coroutineScope.launch {
scrollState.scrollBy(it.verticalScrollPixels)
}
true
}
.focusRequester(focusRequester)
.focusable(),
state = scrollState,
and then either when the screen is shown, or possible driven by paging (if using HorizontalPager) call requestFocus()
LaunchedEffect(Unit) {
focusRequester.requestFocus()
}