android-jetpack-composeandroid-tvandroid-jetpack-compose-material3jetpack-compose-navigationandroid-jetpack-compose-lazy-column

How to switch focus from ModalNavigationDrawer to LazyColumn on Android TV using Jetpack Compose?


I am using Jetpack Compose for Android TV. For navigation drawer I use ModalNavigationDrawer. One of items in drawer is Home.

Here are two scenarios:

Custom item persist of image (as background, not focusable) and two buttons (focusable).

Why pressing right button on remote controller doesn't have the same effect when I use Box and LazyColumn? They both have the same child custom item. How to get effect from Box on LazyColumn?


Solution

  • I found solution: you have to set start padding or x offset of LazyColumn on 16.dp or higher and then it works.

    I hope it will help to someone :)