Abhishek Kumar
01/03/2022, 7:24 AMHorizontalPager
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:
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?Andrey Kulikov
01/10/2022, 6:01 PM