Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab page swipe left and right to switch pages #66

Open
yikibug opened this issue Feb 22, 2025 · 1 comment
Open

Tab page swipe left and right to switch pages #66

yikibug opened this issue Feb 22, 2025 · 1 comment

Comments

@yikibug
Copy link

yikibug commented Feb 22, 2025

In the "Tab Scalling Header" example, how to support tab page swipe left and right to switch pages, I try to use TabView to replace content, it can't show tabview content.

@f3dm76
Copy link
Collaborator

f3dm76 commented Feb 22, 2025

Hey @yikibug, please note that ScalingScrollview is just a ScrollView under the hood, so it works similar to it. If content's height changes between tabs inside the scroll view, there is no way to keep scroll position nice and stable. TabView wouldn't work in a simple ScrollView, so it wouldn't work inside ScalingScrollview either.

I did try to make it work, since everyone asks for this, but TabView gives almost no control over itself (getting/setting its current position, getting tab's content height, etc.), so I can't use it in a way required to implement direct scroll's offset control for this component.

Please just implement your own swipe gestures, or do open a PR if you have an idea of approach. Have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants