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

Abhishek Kumar

01/03/2022, 6:06 PM
@channel I have implemented 
HorizontalPager
 with 
TabRow
 in my project. My HorizontalPager uses default fling behaviour from 
PagerDefaults.flingBehavior(state)
. I have not overridden the fling behavior. This is how the code looks like:
Copy code
val pagerState = rememberPagerState()
    HorizontalPager(
                count = profileState.tabs.size,
                state = pagerState
            ) {..grid item..}
I have to scroll very hard to scroll between the pager items. I want the pager to scroll to next/previous screen on even slight scroll. After debugging and logging, I found that 
initialVelocity
 in 
performFling
 method is coming out to be 
-0.0
 (same for left and right fling) all the time for some reason. Can anyone help with this? Thread in Slack Conversation