dimsuz
06/08/2021, 11:53 AMdimsuz
06/08/2021, 11:58 AMColumn {
Toolbar()
HeaderComposable()
Surface {
LazyColumn {
item { SheetHandle() }
items(bottomSheetItems) { ItemComposable() }
}
}
}
Dominaezzz
06/08/2021, 12:09 PMnitrog42
06/08/2021, 12:25 PMColton Idle
06/08/2021, 12:44 PMdimsuz
06/08/2021, 1:36 PMApple Inc
things are individual items. How would you do it? set elevation on each of those little items excluding a toolbar and the composable below?
2. BottomSheetScaffold won't work, because this is not an actual bottomwheet it's part of scrollable content, and everything above it slowly fades as it translates up. Designer vision 🙂Zun
06/08/2021, 1:36 PMdimsuz
06/08/2021, 1:36 PMnitrog42
06/08/2021, 1:42 PMnitrog42
06/08/2021, 1:44 PMdimsuz
06/08/2021, 1:44 PMdimsuz
06/08/2021, 1:44 PMZach Klippenstein (he/him) [MOD]
06/08/2021, 1:49 PMLazyRow
inside LazyColumn
items.
What’s bad is to nest lazy scrollables on the same axis, because only the outer one will actually be lazy. The reason is that the outer one measures its items without bounds on the scroll dimension, which means the inner one will always measure to its full height and never actually “use” laziness.dimsuz
06/08/2021, 2:09 PMAlbert Chang
06/08/2021, 2:19 PMModifier.nestedScroll()
I think.dimsuz
06/08/2021, 2:24 PMAlbert Chang
06/08/2021, 2:38 PMdimsuz
06/08/2021, 2:42 PMdimsuz
06/08/2021, 3:06 PMAlbert Chang
06/08/2021, 3:10 PMdimsuz
06/08/2021, 3:11 PMAlbert Chang
06/08/2021, 3:47 PMnitrog42
06/08/2021, 4:11 PMval iconPlaceable = measurables.first { it.layoutId == "icon" }.measure(constraints)
(found in JetSnack sample)dimsuz
06/08/2021, 4:34 PMWrote a quick sample.Great, thank you! I ended up with something like this, but my version doesn't do flings properly. Yours has the fling not working until the surface is fully expanded, but then it works. I tried to look how bottom sheet scaffold does it's flings and it uses SwipableState + modifier, and all this starts to overwhelm me 🙂 Need to rest.
btw I just looked how to do it when it's not a "first"/"last" item you wantNiice, didn't know about this trick!
Albert Chang
06/08/2021, 11:47 PMdimsuz
06/09/2021, 9:34 AM