I am trying to implement the scaffold appBar collapsedScrollBehavior and it's working perfectly fine when the content is in compose like LazyColumn.
But in my use case, I am inflating the fragment with RecyclerView inside the Scaffold Content using Android Compose Interop APIs. Scaffold appBar is not collapsing/expanding when I am scrolling the RecyclerView which is inside the fragment.
I know it's a unique scenario and could found any documentation under Android Compose Interop APIs. Kindly let me know if there is anything I can try to make this work.
That should be possible using NestedScrollConnection
. You'll need to do two things:
ViewCompat.setNestedScrollEnabled
in the root View you are inflating within AndroidView
nestedScroll
modifier to the parent Scaffold
and provide your NestedScrollConnection
You can read about this more in the documentation page A parent composable containing a child AndroidView.