https://kotlinlang.org logo
#compose
Title
# compose
v

Vsevolod Ganin

10/02/2020, 9:45 PM
Hi, is there a way to have an effect equivalent to
clipChildren=false
? I have a
Column
composed of scrollable
LazyColumnFor
+
FloatingActionButton
and I want the scrollable column to be seen behind the FAB. But scrolling should end just above the FAB, not below
z

Zach Klippenstein (he/him) [MOD]

10/02/2020, 10:21 PM
Add an empty item at the bottom of your list equal to the height of the FAB?
v

Vsevolod Ganin

10/02/2020, 10:27 PM
But I need to calculate the size of the FAB then, right? I think this is not done very easely in Compose
z

Zach Klippenstein (he/him) [MOD]

10/02/2020, 10:35 PM
v

Vsevolod Ganin

10/02/2020, 11:10 PM
I guess there is also a need to add some
MutableState
variable which stores the laid out height of FAB (modified by
onPositioned
). And then the item list should be comprised with original list + one special item which get its height updated. And then in `LazyColumnFor`’s
itemContent
we should add some kind of
when
which inspects what kind of item we got to choose the right composable. Please correct me if I overcomplicated something. Oh boy this is hard 😅
z

Zach Klippenstein (he/him) [MOD]

10/03/2020, 6:34 AM
That sounds right. I would expect this to get easier eventually, the lazy column APIs are still pretty early, and the scaffold stuff is going through some changes too I believe.
👍 1
z

zoha131

10/03/2020, 8:58 AM
@Zach Klippenstein (he/him) [MOD] is it possible to see the issues? to get an idea what they are thinking for the future.
z

Zach Klippenstein (he/him) [MOD]

10/03/2020, 9:21 AM
Yes, you can look at the pull request tracker or the issue tracker, The latter is linked from the channel description, the former is https://android-review.googlesource.com/q/project:platform%252Fframeworks%252Fsupport+status:open
49 Views