question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ScrollableTab Bug Android

See original GitHub issue

I have gone through these following points

Issue Description

The ScrollableTab is not working properly in android devices

node, npm, react-native, react and native-base version, expo version if used

Node - v9.11.1 | NPM 6.1.0 | NativeBase 2.8.0 | React: 16.5.0 | ReactNative: 0.57.0

Expected behaviour

Animation run smoothly tab by tab without stuck sometimes, change slowly, or jumping tabs. Expected behaviour GIF

Actual behaviour

Is jumping tabs or sometimes the animation go really slow. Actual behaviour GIF

Steps to reproduce

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: (
      <MainHeader goBack hasTabs title={navigation.state.params.factionsName} />
    )
  });

  render() {
    return (
      <Container>
        <Tabs
          renderTabBar={() => (
            <ScrollableTab tabsContainerStyle={styles.tabsContainerStyle} />
          )}
        >
          <Tab
            tabStyle={styles.tabStyle}
            activeTextStyle={styles.textStyle}
            textStyle={styles.textStyle}
            activeTabStyle={styles.activeTabStyle}
            heading="Seu Perfil"
          >
            <ProfileTab navigation={this.props.navigation} />
          </Tab>

          {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"
  }
});

Is the bug present in both iOS and Android or in any one of them?

Android

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Matgsancommented, Aug 2, 2019

I stopped using native-base for this purpose so i dont know if its fixed or not.

2reactions
ARDcodecommented, Oct 4, 2018

@matgsan try prerenderingSiblingsNumber={Infinity} in <Tabs …>

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-scrollable-tab-view Android issue #999
Solved it! just pass the style to the scrollableTabView. style={{width: '100%' }}.
Read more >
Developers - ScrollableTab Bug Android - - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >
How to create Scrollable Tab in Flutter App? (Android & IOS)
In this video, you will see how to implement Scrollable Tab in Flutter App with these simple steps:- create a flutter project first....
Read more >
Action bar tabs inconsistent (scroll vs. drop-down list ...
Android 4.0.3 emulator, WVGA800 skin ... Another odd behavior about this bug is that if the tabs are displayed and you swipe between...
Read more >
react-native-scrollable-tab-view-modify-android-jszh - Snyk
Learn more about react-native-scrollable-tab-view-modify-android-jszh: package ... in your projects for vulnerabilities and provides automated fix advice.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found