title: Compose LazyColumn scrolling behavior inside of CoordinatorLayout via ComposeView interop
body: <p>Problem - scrolling downward causes the bottom sheet to scroll rather than giving scroll priority to the LazyColumn (RecyclerView did not have this problem. It was wrapped by a NestedScrollView)</p>
  <p>I've just introduced a Compose LazyColumn replacement of a Recycler inside of a CoordinatorLayout. The Coordinator (implemented as a bottom sheet) can itself scroll freely between peek and expanded states. My issue is when dragging the items area downward in the LazyColumn, the bottom sheet picks up the scrolling rather than the LazyColumn . If I scroll upward first and then downward (without releasing) on the LazyColumn, the scrolling is picked up by the LazyColumn and scrolling priority is given to the LazyColumn (expected behavior.)</p>
  <pre><code>BottomSheetFragment
  |-CoordinatorLayout
  |--ConstraintLayout (BottomSheetBehavior)
  |---MyListFragment
  |----ComposeView
  |-----Theme
  |------Surface
  |-------Box
  |--------LazyColumn
  </code></pre>
  <p>New to Compose, so I'm hoping someone can tell me how to approach correcting this new scroll behavior?</p>
  <p>**<strong>Edit</strong>
  I'm getting part of the way to having this work by toggling the Coordinator's ^^ BottomSheetBehavior.isDragglable, but it does require that I release the drag rather than smoothly transitioning from the list scroll to the bottom sheet scroll - anyone suggest a fix?:</p>
  <pre><code>fun MyUi(listener:Listener) {
      val listState = rememberLazyListState()
  
      LaunchedEffect(listState) {
          listState.interactionSource.interactions.collect {
              //at the top of the list so allow sheet scrolling
              listener.allowSheetDrag(listState.firstVisibleItemScrollOffset == 0)
          }
      }
  
      val nestedScrollConnection = remember {
          object : NestedScrollConnection {
              override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
                  Timber.i(&quot;NestedScrollConnection onPreScroll($available: Offset, $source: NestedScrollSource)&quot;)
                  return super.onPreScroll(available, source)
              }
  
              override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset {
                  Timber.i(&quot;NestedScrollConnection onPostScroll($consumed: Offset, $available: Offset, $source: NestedScrollSource)&quot;)
                  if (available.y &gt; 0.0 &amp;&amp; consumed.y == 0.0f) {
                      //scolling down up but we're already at the top - kick over to sheet scrolling
                      listener.allowSheetDrag(true)
                  }
                  return super.onPostScroll(consumed, available, source)
              }
          }
      }
      Box(
          modifier = Modifier
              .fillMaxSize()
              .nestedScroll(nestedScrollConnection)
      ) {
          LazyColumn(
              modifier =
              Modifier
                  .fillMaxSize()
                  .padding(vertical = 12.dp), state = listState
          ) {
              item {
                  Row() {}
              }
          }
      }
  }
  </code></pre>
  <p>And then in the Fragment:</p>
  <pre><code>override fun allowSheetDrag(allowSheetDrag: Boolean) {
      bottomSheetFragment?.bottomSheetBehavior?.isDraggable = allowSheetDrag
  }
  </code></pre>