timomeh / react-native-material-bottom-navigation

💅🔧👌 a beautiful, customizable and easy-to-use material design bottom navigation for react-native
MIT License
709 stars 127 forks source link

Animation after TabPress seems to have too much delay #7

Closed timomeh closed 7 years ago

timomeh commented 7 years ago

Fixed with #2

(I'm speaking about the growing tab resp. the movement of icon) I think the delay of 5 Frames from the Demo-Video in the Guidelines is just caused by the easeIn. No real delay needed here.

emileNetter commented 7 years ago

Hi ! First of all thank you for this great RN component 🥇. But I still have a slight delay when pressing a new tab or swiping between the tabs.

giphy

Any advice ? Thanks

timomeh commented 7 years ago

Are you using react-navigation? If so, then it seems like react-navigation doesn't update the state to the bottom navigation soon enough, if you swipe. I actually never tested this component together with the swipe-gesture of react-navigation.
Maybe test react-navigation's own TabBar. If it behaves the same way then it's surely an issue on their side. If not, then I'll have to adjust something. My react-navigation implementation isn't something official supported on their side, I made it when react-navigation was still in an early beta.

You could also consider disabling the slide-gesture in react-navigation. The material guidelines for the bottom navigation behaivour advise against using the swipe-gesture for changing the tab.

If there's a noticeable delay between pressing the tab and the actual change of the screen, then this looks like a new bug which needs to be fixed. If so, please open a new issue.

(Note: This issue originally didn't deal with this particular thing. It was just that only the growing-animation of the icon was a few frames too late.)

emileNetter commented 7 years ago

Yes I'm using the new react-navigation and it's the same delay if I swipe or if I tap. I'll try disabling the swipe gesture and let you know if that changes anything ! Ohterwise I will open a new issue.

P.S : How would you disable the slide gesture ?

timomeh commented 7 years ago

@emileNetter Sorry for taking so long, guess I need a better way to keep track of pending comments.

Probably you figured it out by now, in case not: theres a swipeEnabled key in TabNavigatorConfig.