nested horizontalPager Sliding not smooth

37 views Asked by At

i hava a nested HorizontalPager like this:

HorizontalPager(
   count = list.size
) {
   HorizontalPager(
    count = list2.size
   ) {
     //items
   }
 }

when i slide the page in the outPager border ,it seem like the inner pager block slide. block the slide

i try to use ,but not work

object : NestedScrollConnection {
                    override fun onPreScroll(
                        available: Offset,
                        source: NestedScrollSource
                    ): Offset {

                        if (source == NestedScrollSource.Drag && available.x != 0f) {
                            return Offset(available.x, y = 0f)
                        }
                        return Offset.Zero

                    }
                }
0

There are 0 answers