7

I am migrating an app to Jetpack Compose and I have the following situation on a view/compose hybrid screen:

  • The layout root element is a CoordinatorLayout that has a top bar which is collapsible.
  • The content is a FragmentViewPager, and one of the pages is the Fragment I am migrating to Compose.
  • When I scroll the LazyColumn inside this fragment, the top bar won't collapse/expand.

My question is: Can I do something to make both pieces work together? i.e: When I scroll a LazyColumn, a CoordinatorLayout that contains it will make it's top bar collapse/expand.

  • 1
    https://stackoverflow.com/questions/67227755/jetpack-compose-collapsing-toolbar – Gabriele Mariotti May 13 '21 at 07:31
  • 2
    Thanks, but I am not sure this is what I am after. This seems to a be a way to implement a collapsing toolbar behavior in compose. What I am looking for is a way to make the LazyColumn work with an actual CoordinatorLayout on a hybrid implementation. I need this because I am migrating the screen and reimplementing the whole thing would be undoable atm. – BrenoBridges May 13 '21 at 16:59
  • 1
    Hey @BrenoBridges - I currently have the same UX bug with an Android CoordinatorLayout and Compose LazyColumn interop architecture. Did you find a solution? – click_whir Oct 01 '21 at 17:21

1 Answers1

3

It looks like the Compose Interop Android Documentation was recently updated with a subsection on Nested Scrolling With Views. At this time, Android CoordinatorLayout and Compose LazyColumn interop UX is not officially supported. The official Google Issue Tracker is here.

vrickey123
  • 31
  • 3