1

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 the onClick handler, it only works when clicked with the remote control.

  • Scrolling long text in an item of TvLazyColumn doesn't work with either a mouse or remote control. But changing to LazyColumn 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?

vighnesh153
  • 4,354
  • 2
  • 13
  • 27
Arsenius
  • 4,972
  • 4
  • 26
  • 39

1 Answers1

0

Currently, pointer and touch input methods are not supported in TvLazyColumn as the component is specifically designed for TV. We are tracking this issue.

Thanks for this feedback!

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187