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

Slow Transition when swiper on android. pls help me :'( #907

Closed
minhphung210 opened this issue Jul 11, 2018 · 11 comments
Closed

Slow Transition when swiper on android. pls help me :'( #907

minhphung210 opened this issue Jul 11, 2018 · 11 comments

Comments

@minhphung210
Copy link

minhphung210 commented Jul 11, 2018

I have a tabStack that uses reactive navigation. It is structured as follows:

const AccountTab = createStackNavigator(
  {
    Account: { screen: Account },
    UserManager: { screen: UserManager },
    History: { screen: History },
    HistoryDetail: { screen: HistoryDetail },
    Point: { screen: Point }
  },
  {
    initialRouteName: "Account",
    headerMode: "none"
  }
);
const TabNav = createBottomTabNavigator(
  {
    ProductTab: {
      screen: ProductTab,
      navigationOptions: {
        title: "Sản Phẩm",
        tabBarIcon: ({ tintColor }) => (
          <Image
            resizeMode="contain"
            source={Images.productIcon}
            style={[styles.icon, { tintColor: tintColor }]}
          />
        )
      }
    },
    SaleTab: {
      screen: SaleTab,
      navigationOptions: {
        title: "Khuyến mãi",
        tabBarIcon: ({ tintColor }) => (
          <Image
            resizeMode="contain"
            source={Images.gitfIcon}
            style={[styles.icon, { tintColor: tintColor }]}
          />
        )
      }
    },
    HomeTab: {
      screen: HomeTab,
      navigationOptions: {
        title: "Home",
        tabBarIcon: ({ tintColor }) => (
          <Image
            resizeMode="contain"
            source={Images.homeIcon}
            style={[styles.icon, { tintColor: tintColor }]}
          />
        )
      }
    },
    TransferTab: {
      screen: TransferTab,
      navigationOptions: {
        title: "Nhượng quyền",
        tabBarIcon: ({ tintColor }) => (
          <Image
            resizeMode="contain"
            source={Images.transferIcon}
            style={[styles.icon, { tintColor: tintColor }]}
          />
        )
      }
    },
    AccountTab: {
      screen: AccountTab,
      navigationOptions: {
        title: "Tài khoản",
        tabBarIcon: ({ tintColor }) => (
          <Image
            resizeMode="contain"
            source={Images.accountIcon}
            style={[styles.icon, { tintColor: tintColor }]}
          />
        )
      }
    }
  },
  {
    initialRouteName: "HomeTab",
    tabBarOptions: {
      activeTintColor: Colors.leetee,
      inactiveTintColor: Colors.charcoal,
      swipeEnabled: true
    }
  }
);

When I navigate to the "Point" screen containing the ScrollableTabView inside AccountTab , it works very well. But if I switch to another tab and navigate inside these tabs. Then go back to AccountTab and watch the delay. If I unmount the screen, then back it is fine.

here is my video demo : https://www.youtube.com/watch?v=W2oOQu-Ri5k&feature=youtu.be

and here is my code :

screen shot 2018-07-11 at 10 51 10 am

update : when i delete the === Platform case 'android' and lumped it with the same instances with IOS in the index.js inside the node_module / native-scrollable-tab-view. it works perfectly
I think the problem is due to ViewPagerAndroid.

Who has a better resolution?

sorry about my english :))

@hungdev
Copy link

hungdev commented Jul 16, 2018

i get same issue.

@hungdev
Copy link

hungdev commented Jul 16, 2018

@minhphung210
I know the reason. in my case, the reason is the old react native version.
My react native version is 0.54.2. After update to 0.56.0, it runs fine.
You can try update to newest react native version.

@minhphung210
Copy link
Author

thank for reply. I will try

@phil-hodgson-1st
Copy link

Any luck with the update @minhphung210 ?

@minhphung210
Copy link
Author

@phil-hodgson-1st I encountered a bit of error when updating version 0.56 of react-native so I decided to keep the version and fix it in the way of the above mentioned

@renandelmonico
Copy link

@minhphung210 Which version are you using?

@koo1006
Copy link

koo1006 commented Sep 26, 2018

Having same same issue. Using react native "react-native": "0.57.0" . Anyone got solution?

@hungdev
Copy link

hungdev commented Oct 25, 2018

@ptomasroos why do you close this issue?

@ptomasroos
Copy link
Owner

Would be great if we could open a new issue with a repository so this is reproducable. If someone wants us to help out with this please at least provide a repository which is runnable, will make the life easier for everyone!

@ibubbo
Copy link

ibubbo commented Nov 19, 2019

solution to the do?

@ibubbo
Copy link

ibubbo commented Nov 19, 2019

@ptomasroos After setting this property (prerenderingSiblingsNumber={Infinity}), you can see the delay

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

7 participants