Status Update
Comments
so...@google.com <so...@google.com>
ma...@gmail.com <ma...@gmail.com> #2
si...@gmail.com <si...@gmail.com> #3
Hi, I also faced the same problem. I'm trying to navigate inside lists (Column
/LazyColumn
) using an external keyboard and I couldn't.
I've tried everything with focusable
and LocalFocusManager
and I couldn’t find a way to navigate inside a scrollable column with an external keyboard.
Here’s a simple code example. What I expect is to be able to navigate through the items using the arrow up/down on my keyboard.
val list = (1..100).map { "Item $it" }
LazyColumn {
items(list) { item -> Text(text = item, modifier = Modifier.fillMaxWidth().padding(16.dp).focusable()) }
}
ra...@google.com <ra...@google.com> #4
silva.jordan@
We currently only support moving focus in non-lazy lists. You can observe
mice777@
You can use the D-Pad keys to move between multiple focusables at the same level. You can move focus IN and OUT by using the D-Pad center and the back key.
Tab/Shift+Tab support didn't make it to 1.0 you would have to use one of the 1.1 alpha builds to get access to this feature.
ra...@google.com <ra...@google.com> #5
You should be able to move focus in LazyLists by using a DPad. There are a few remaining features remaining, which are tracked by
Description
Compose 1.0.0-beta09
Having more "focusable" composables, like TextField or Button, I'd expect that I can navigate between them using keyboard cursor keys, Tab key, or D-pad on a remote controller.
Example:
Currently cursor keys work within one component, but can't switch focus to next component. Also Tab key inserts tab character to text, but doesn't switch focus to next component (and Shift+Tab to previous).
I wonder how Compose is supposed to work on Android TV, and on devices without touch screen. With above code, I can switch focus to other component only by touching it.
Is there some special way to achieve such focus switching? I didn't find it. And I didn't find mention of this in documentation.