You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to implement a (not compose, so I can't use HorizontalPager) ViewPager on my screen. Each ViewPager page is a list with an infinite scroll feature implemented. I'm using the ScrollableTabRow composable for tabs.
The screen is all implemented, but I'm facing issues with the scrolling.
CollapsingToolbarScaffold lib recommends to set verticalScroll(rememberScrollState()) to the parent Column of my content. This works fine, but the ViewPager height doesn't seem to be calculated, making the scroll not happen. After some research, I found that we need to set the height explicitly if I want to use verticalScroll, but I couldn't make it work.
Here's what I've already tried:
Wrap the content in BoxWithConstraints and set the maxHeight;
Implement onGloballyPositioned modifier;
Set scrollable(rememberScrollState(), Orientation.Vertical)
Set ViewCompat.setNestedScrollingEnabled(this, true) to the ViewPager (this works, but the scroll gets no smooth at all so, certainly not an option).
Hello all.
Here's my situation:
I need to implement a (not compose, so I can't use
HorizontalPager
) ViewPager on my screen. Each ViewPager page is a list with an infinite scroll feature implemented. I'm using the ScrollableTabRow composable for tabs.The screen is all implemented, but I'm facing issues with the scrolling.
CollapsingToolbarScaffold
lib recommends to setverticalScroll(rememberScrollState())
to the parent Column of my content. This works fine, but the ViewPager height doesn't seem to be calculated, making the scroll not happen. After some research, I found that we need to set the height explicitly if I want to useverticalScroll
, but I couldn't make it work.Here's what I've already tried:
BoxWithConstraints
and set the maxHeight;onGloballyPositioned
modifier;scrollable(rememberScrollState(), Orientation.Vertical)
ViewCompat.setNestedScrollingEnabled(this, true)
to the ViewPager (this works, but the scroll gets no smooth at all so, certainly not an option).Any ideas? Here's my code:
Any help would be much appreciated.
Thanks
The text was updated successfully, but these errors were encountered: