The ScrollableTab is not working properly in android devices
Node - v9.11.1 | NPM 6.1.0 | NativeBase 2.8.0 | React: 16.5.0 | ReactNative: 0.57.0
Animation run smoothly tab by tab without stuck sometimes, change slowly, or jumping tabs.
Expected behaviour GIF
Is jumping tabs or sometimes the animation go really slow.
Actual behaviour GIF
``` import React from "react";
import { createSelector } from "reselect";
import { Container, Tabs, Tab, ScrollableTab } from "native-base";
import { StyleSheet } from "react-native";
import { connect } from "react-redux";
import MainHeader from "@src/components/MainHeader";
import ProfileTab from "./tabs/ProfileTab";
import FactionTab from "./tabs/FactionTab";
import SkillsRankTab from "./tabs/SkillsRankTab";
import CoinsRankTab from "./tabs/CoinsRankTab";
import FactionsRankTab from "./tabs/FactionsRankTab";
class FactionsScreen extends React.Component {
static navigationOptions = ({ navigation }) => ({
header: (
)
});
render() {
return (
)}
>
activeTextStyle={styles.textStyle}
textStyle={styles.textStyle}
activeTabStyle={styles.activeTabStyle}
heading="Seu Perfil"
>
{this.props.hasFaction ? (
<Tab
tabStyle={styles.tabStyle}
textStyle={styles.textStyle}
activeTextStyle={styles.textStyle}
activeTabStyle={styles.activeTabStyle}
heading="Sua Fac莽茫o"
>
<FactionTab />
</Tab>
) : null}
<Tab
tabStyle={styles.tabStyle}
textStyle={styles.textStyle}
activeTextStyle={styles.textStyle}
activeTabStyle={styles.activeTabStyle}
heading="Rank de Habilidades"
>
<SkillsRankTab navigation={this.props.navigation} />
</Tab>
<Tab
tabStyle={styles.tabStyle}
textStyle={styles.textStyle}
activeTextStyle={styles.textStyle}
activeTabStyle={styles.activeTabStyle}
heading="Rank de Coins"
>
<CoinsRankTab navigation={this.props.navigation} />
</Tab>
<Tab
tabStyle={styles.tabStyle}
textStyle={styles.textStyle}
activeTextStyle={styles.textStyle}
activeTabStyle={styles.activeTabStyle}
heading="Rank de Fac莽玫es"
>
<FactionsRankTab navigation={this.props.navigation} />
</Tab>
</Tabs>
</Container>
);
}
}
const styles = StyleSheet.create({
tabsContainerStyle: {
backgroundColor: "#00a8ff"
},
tabStyle: {
backgroundColor: "#00a8ff"
},
textStyle: {
color: "white"
},
activeTabStyle: {
backgroundColor: "#00a8ff"
}
});
```
Android
Having the same issue, the only differences is that i am running on NPM 6.4.1
Please solve this ASAP
+1
@matgsan try prerenderingSiblingsNumber={Infinity} in
@matgsan try
prerenderingSiblingsNumber={Infinity}in
Tried already. It seems to be an issue with the new ReactNative version.
+1
+1
Update to react-native 0.57.2 resolve the issue for me.
I can't test this solution with an app created with expo init, since the react-native version seems locked to what expo has released (currently, sdk-30.0.0) - is there another way to upgrade the react-native version in an expo app?
I tried simply installing the official npm package for react-native, rather than expo's sdk version, but it broke the project.
Update: I recreated my project with react-native 0.57.3 (without expo), and while the issue still exists, the lag is not as noticeable, and occurs less frequently.
@Matgsan
Did you try upgrading react-native to 0.57.2...
Check the ScrollableTab example from NB docs, and test on Android Emulator, it works fine, no unexpected behaviour...You should check for version compatibility among your dependencies...


Closing the issue due to no response for a while...Hope your issue has been resolved.You can reopen the issue if you still feel the issue is exclusive to "native-base"...
@Matgsan Were you able to fix it? I am having the exact same issue
I stopped using native-base for this purpose so i dont know if its fixed or not.
@Matgsan what is your alternative? I'm facing this issue right now
@seifsg Man, tbh I don't remember what i did to solve it. I think I created my custom component with animations.
I am also facing similar lags
"react": "16.11.0",
"react-native": "0.62.2",
"native-base": "^2.13.12"
Its still very slow
Most helpful comment
I stopped using native-base for this purpose so i dont know if its fixed or not.