Status Update
Comments
ap...@gmail.com <ap...@gmail.com> #2
Please ensure this works with LazyColumn
, LazyRow
and LazyVerticalGrid
when this change is implemented. Thanks!
ch...@google.com <ch...@google.com> #3
Thanks Nick, LazyList is the internal component that all these composables are built out of.
an...@google.com <an...@google.com> #4
If I could add a small additional feature request here:
Hopefully the implementation of focus scrolling in lazy lists leaves room for the easy customization / overriding of the behavior, since TV UI often has unique snapping requirements around the focused item.
I've started to come up with my own compose API for this, and while I'm happy with the results so far, I'm hoping that any future built-in scrolling functionality will play nicely with it, or as a better alternative - provide all of the necessary configurations.
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #5
To add a specific case to #4's comment on configurability:
In View Android apps, scrolling typically occurs once focus is moved to an item outside the viewport. With such behavior, however, the user is given no indication that there are more items to see. To solve this, it would be useful to be able to specify a scroll offset or similar that triggers scrolling even before reaching an item that is outside of the scroll viewport. This could for instance be a fixed dp value or .5
"list item heights" ahead. That way, the user would be informed that there is more to see.
In any case, glad to see this being of high priority!
ap...@google.com <ap...@google.com> #6
Looks like focus support for LazyLists did not make it to 1.1.0-beta01
.
Custom implementation that scrolls a LazyList to bring the focused element to view still almost works, but occasionally the focus moves to a random input node. The random input node can be uninitialized causing an exception at:
2021-11-01 09:54:51.247 E/MessageQueue-JNI: java.lang.IllegalStateException: KeyEvent can't be processed because this key input node is not active.
at androidx.compose.ui.input.key.KeyInputModifier.processKeyInput-ZmokQxo(KeyInputModifier.kt:75)
at androidx.compose.ui.platform.AndroidComposeView.sendKeyEvent-ZmokQxo(AndroidComposeView.android.kt:439)
at androidx.compose.ui.platform.AndroidComposeView.dispatchKeyEvent(AndroidComposeView.android.kt:446)
Description
Version of Gradle Plugin: 4.2.0-alpha05
Version of Gradle: 6.5
Version of Java: 1.8
OS: Linux
Version of Compose: 0.1.0-dev14
The minified APK size increased to ~1.1 MB in dev13 it was ~600 KB before.
Steps to Reproduce:
1. clone git repo: git clone git@gitlab.com:compose1/compose-minimal-hello-world.git
2. compile the release APK (Key already included)
3. See that the APK size is about 600 KB
4. change compose_version to 0.1.0-dev14 in build.gradle file
5. compile the release APK
6. APK size is about 1.1 MB