{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/172","repository_url":"https://api.github.com/repos/react-native-community/react-native-tab-view","labels_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/172/comments","events_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/172/events","html_url":"https://github.com/react-native-community/react-native-tab-view/issues/172","id":214677842,"number":172,"title":"Only renders the initial tab (android only)","user":{"login":"jshumakerpruitt","id":957598,"avatar_url":"https://avatars2.githubusercontent.com/u/957598?v=3","gravatar_id":"","url":"https://api.github.com/users/jshumakerpruitt","html_url":"https://github.com/jshumakerpruitt","followers_url":"https://api.github.com/users/jshumakerpruitt/followers","following_url":"https://api.github.com/users/jshumakerpruitt/following{/other_user}","gists_url":"https://api.github.com/users/jshumakerpruitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jshumakerpruitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshumakerpruitt/subscriptions","organizations_url":"https://api.github.com/users/jshumakerpruitt/orgs","repos_url":"https://api.github.com/users/jshumakerpruitt/repos","events_url":"https://api.github.com/users/jshumakerpruitt/events{/privacy}","received_events_url":"https://api.github.com/users/jshumakerpruitt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-16T11:45:27Z","updated_at":"2017-03-23T09:09:46Z","closed_at":null,"body":"On android only the initial tab is visible.  By changing `state.index` in the constructor I can make any of my three scenes visible, but when I change tabs, I only get a blank screen.  Works perfectly on iOS.\r\n\r\n```javascript\r\nclass BusinessScreen extends React.Component {\r\n  constructor(props) {\r\n    super(props)\r\n\r\n    this.state = {\r\n      index: 2,\r\n      routes: [\r\n        { key: '1', title: 'Home' },\r\n        { key: '2', title: 'Menu' },\r\n        { key: '3', title: 'Contact' }\r\n      ]\r\n    };\r\n  }\r\n\r\n  componentDidMount () {\r\n    this.props.businessRequest(this.props.id)\r\n  }\r\n\r\n  _handleChangeTab = (index) => {\r\n    this.setState({ index })\r\n  };\r\n\r\n  _renderHeader = (props) => {\r\n    return <TabBar {...props} />\r\n  };\r\n\r\n  _renderScene = ({ route }) => {\r\n    console.log('route.key: ', route.key)\r\n    switch (route.key) {\r\n      case '1':\r\n        return <BusinessHome business={this.props.business} />\r\n      case '2':\r\n        return <ProductList business={this.props.business} />\r\n      case '3':\r\n        return <BusinessContact business={this.props.business} />\r\n      default:\r\n        return null\r\n    }\r\n  };\r\n\r\n  render () {\r\n    console.log(this.state)\r\n    return (\r\n      <View style={[styles.mainContainer, {\r\n        flex: 1,\r\n        backgroundColor: Colors.blueDark\r\n      }]}>\r\n        <TabViewAnimated\r\n          style={{\r\n            flex: 1,\r\n            backgroundColor: Colors.blueDark\r\n          }}\r\n          navigationState={this.state}\r\n          renderScene={this._renderScene}\r\n          renderHeader={this._renderHeader}\r\n          onRequestChangeTab={this._handleChangeTab}\r\n        />\r\n      </View>\r\n    )\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/comments/288658203","html_url":"https://github.com/react-native-community/react-native-tab-view/issues/172#issuecomment-288658203","issue_url":"https://api.github.com/repos/react-native-community/react-native-tab-view/issues/172","id":288658203,"user":{"login":"jshumakerpruitt","id":957598,"avatar_url":"https://avatars2.githubusercontent.com/u/957598?v=3","gravatar_id":"","url":"https://api.github.com/users/jshumakerpruitt","html_url":"https://github.com/jshumakerpruitt","followers_url":"https://api.github.com/users/jshumakerpruitt/followers","following_url":"https://api.github.com/users/jshumakerpruitt/following{/other_user}","gists_url":"https://api.github.com/users/jshumakerpruitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jshumakerpruitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshumakerpruitt/subscriptions","organizations_url":"https://api.github.com/users/jshumakerpruitt/orgs","repos_url":"https://api.github.com/users/jshumakerpruitt/repos","events_url":"https://api.github.com/users/jshumakerpruitt/events{/privacy}","received_events_url":"https://api.github.com/users/jshumakerpruitt/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T09:09:46Z","updated_at":"2017-03-23T09:09:46Z","body":"Additional info: If I set the tab view screen as my initial screen all tabs work, but if I navigate to the tab view screen from a different screen the problem persists.\r\n"}}
{"actor":{"display_login":"jshumakerpruitt"}}