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

Scott Kruse

08/29/2021, 2:54 AM
Whats the best way to put compose into a vertically scrolling tab driven via
FragmentStateAdapter
/
CoordinatorLayout
w/
NestedScrollView
? Do we need to wrap it in some scrollable parent or should LazyColumn be sufficient?
FATAL EXCEPTION: main at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:207)
with
LazyColumn
within
ComposeView
within
NestedScrollView
If i make
ComposeView
the root layout of the fragment, inflated by
ViewPager2
, scrolls don't get propagated to the parent fragment's
CoordinatorLayout
, toolbars don't collapse, etc
Is this level of interop possible out of the box with compose?
v

Vince Rickey

10/01/2021, 9:49 PM
Thanks for posting this! I also have an Android
CoordinatorLayout
and Compose
LazyColumn
interop UX bug in a hybrid View-Compose Fragment. I found one StackOverflow post on the topic, too. https://stackoverflow.com/questions/67514824/can-lazycolumn-work-along-with-coordinatorlayout I'll subscribe to that bug tracker.
2 Views