I'm very new to Jetpack Compose for Android TV and don't understand how scrolling and clicking works. For example:
TvLazyColumn(
modifier = Modifier
.padding(24.dp)
.fillMaxSize(),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
item {
Text(
modifier = Modifier,
text = "very long text here which is need to scroll..."
)
}
item {
Button(
modifier = Modifier,
onClick = {
// handle click event here
}) {
Text(text = "CLICK ME")
}
}
}
I'm using Jetpack Compose tv-foundation
and tv-material
version 1.0.0-alpha07 and having these issues:
Clicking a
Button
with a mouse connected to the Android TV device never triggers theonClick
handler, it only works when clicked with the remote control.Scrolling long text in an
item
ofTvLazyColumn
doesn't work with either a mouse or remote control. But changing toLazyColumn
allows scroll with mouse but not remote control.
How can I get reliable scrolling and clicking behavior with both input methods in Jetpack Compose for Android TV? What I missed here?