React-native-tab-view: Is it possible to have infinite scollable ?

Created on 14 Aug 2016  路  7Comments  路  Source: satya164/react-native-tab-view

It is my case that i have dozens of tabs , is it possible to have infinite scrolling top tab bar.

All 7 comments

If you mean just scrollable tabbar, it's possible, but we don't have a component for it yet. If you want to help implementing it, ping me :)

@ronak301 @satya164 Were you able to do proof of the concept on this? Got some suggestion to use ScrollView which I am going to give a try.

@npm-install Nope. But yeah, I think ScrollView is the way to go. Here is what I was thinking,

  1. By default give each of the tabs the width - (layout.width / 3) * 2, so that the third tab is partially visible, also allow a custom tabItemWidth prop
  2. When a tab is focused, animate (scrollTo?) the tabbar item to center of the screen (we'll need to calculate this)
  3. Ensure the scrollbars are hidden

this is something that I will need very soon, so can help on that if there is work already done on it or I might start separately

I'm working on this right now and it's a bit complex than thought, if we want smooth animations. Will keep you updated.

It needs a lot of maths and I'm poor at maths. Help is much appreciated :D

Here's a PR which implements it. Testing and feedback is appreciated - https://github.com/react-native-community/react-native-tab-view/pull/32

so far so good, testing...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t3chnoboy picture t3chnoboy  路  3Comments

ios-dev-newbie picture ios-dev-newbie  路  3Comments

karthikeyansundaram2 picture karthikeyansundaram2  路  3Comments

AndriiUhryn picture AndriiUhryn  路  3Comments

nastarfan picture nastarfan  路  3Comments