Stylianos Gakis
11/17/2023, 1:01 PMSelectionContainer
(The thing that allows one to long press some text to highlight and copy-paste it) working inside a LazyColumn?
I am now doing smth like
SelectionContainer {
LazyColumn() {
items(...) { Text(...) }
}
}
And long pressing just does nothing really.
Replacing LazyColumn
with Column(….verticalScroll(…))
just works without any chages.
Tried also to add the SelectionContainer
per-item in the Lazy list, with no luck either. Since maybe it doesn’t work for lazy layouts as some things which are highlighted may just go out of scope and get removed from composition at any point.
Currently on latest BOM 2023.10.01
I am asking just to get a sanity check that it’s not just me, if it’s a known issue etc. otherwise will file a bug report.Halil Ozercan
11/17/2023, 1:31 PMStylianos Gakis
11/17/2023, 1:51 PMandroidx.compose.foundation:foundation:1.6.0-beta01
, a bit tricky since then the app doesn’t build with transitive dependencies it’s bringing in where the APIs have changed, so give me a few minutes 😅SelectionContainer
which wraps the entire LazyColumn
.
So now will just wait for the version to release to be able to use this, since the betas are breaking other parts of the app for now 😄
Thanks a lot for the links and the help!