react-native-scrollable-tab-view icon indicating copy to clipboard operation
react-native-scrollable-tab-view copied to clipboard

scrollview jumps on orientation change

Open lenkavon opened this issue 8 years ago • 9 comments

When you enable orientation change the lock itself on pixel position, all the tabs rerender to fit the new width, but scroll is locked so in the view you see different tab than before, the animation slides to the new position of selected tab. See recording rotationbug

The code with minimal implementation to reproduce the bug is available on github.com/lenkavon/rn-orientation-playground

There is also generalised question on stackoverflow

lenkavon avatar Jan 03 '17 12:01 lenkavon

Why was this closed? Was it fixed?

coderdave avatar Nov 08 '18 21:11 coderdave

Thanks for reopening this. With locked={true} and scrollWithoutAnimation={true}, it's still causing my app scroll to the other tabs briefly on changing orientation. scrolling??? is being consoled out when the orientation changes. I would think that shouldn't be triggering? I'm using version 0.10.0 of this library and react native 0.55.3.

I have also noticed that if you leave it on the first tab and change orientation it's fine, but when you go to the other tabs, that's when it starts to act up.

          <ScrollableTabView
            tabBarPosition="bottom"
            locked={true}
            renderTabBar={() => <MyTabBar />}
            scrollWithoutAnimation={true}
            onScroll={() => console.log('scrolling???')}
          >

coderdave avatar Nov 09 '18 14:11 coderdave

There's no problem with TAB switching on ios, and not only is the content not shown on android, it's also hard to switch

xiaohaook avatar Nov 19 '18 07:11 xiaohaook

I'm having this problem on iOS.

coderdave avatar Nov 19 '18 14:11 coderdave

I fix with it code but the swipe don't work

<ScrollableTabView
 style={{
                        width:Dimensions.get('window').width,
                        height:Dimensions.get('window').height,
                    }}
                    contentStyle={{
                        width:Dimensions.get('window').width,
                        height:Dimensions.get('window').height,
                    }}

jfajardo avatar Jan 10 '19 23:01 jfajardo

@lenkavon did u get the fix for this?

nik910 avatar Jul 16 '19 09:07 nik910

Any update for this fix?

crnaidu15 avatar Aug 27 '19 09:08 crnaidu15

Any solution ??? scrollWithoutAnimation={true} make design crash while rotating

arjunramdas avatar Nov 13 '19 08:11 arjunramdas

Same here

canberkardic avatar Feb 12 '21 12:02 canberkardic