Status Update
Comments
ae...@gmail.com <ae...@gmail.com> #2
Forgot to add a sample code! Here it goes:
SelectionContainer {
LazyColumn {
items(100) {
Text("Line number $it")
}
}
}
A normal column works without any issues (expected since everything is composed unlike the LazyColumn).
Edit to give more details about my use case: I'm trying to show the lines of a text document in my app, so using a column is not an option as the files can be quite large.
ma...@google.com <ma...@google.com> #3
Sean, would you be able to take the first stab at it and see what's needed?
kl...@google.com <kl...@google.com> #4
This happens because the nodes containing selection are removed from the composition when they're scrolled out of view, which causes the selection container to stop tracking them. This is one of the use cases for
se...@google.com <se...@google.com>
kl...@google.com <kl...@google.com> #5
BasicText
to pin itself when it's participating in selection.
ae...@gmail.com <ae...@gmail.com> #6
It'd be interesting to test how it can affect performance when selecting large number of lines.
Description
Setup details
Jetpack Compose version: 1.3.1 & 1.4.0-alpha02
Jetpack Compose component(s) used: Material, Foundation & compiler
Android Studio Build: 2021.3.1 Patch 1
Kotlin version: 1.7.21
Steps to Reproduce or Code Sample to Reproduce
Selection pointers are no longer visible and the copy button jumps around.
Check the attached video for a demo of the issue