title: React native Android ScrollView scrollTo not working
body: <p>I am trying to use a <strong>horizontal ScrollView in React Native</strong> for Android, where the starting position is in the middle of the scrolling images rather than (0,0). </p>
  
  <p>The <code>scrollTo</code> method seems to be called correctly inside <code>componentDidMount</code> but nothing moves in the application, it still shows as starting the scroll all the way to the left.  </p>
  
  <p>Since this is Android I don't have access to contentOffset props or I would set that directly, according to the documentation.  Here is the code:</p>
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  
  var React = require('react-native');
  var {
    StyleSheet,
    View,
    Text,
    ScrollView,
    Component,
  } = React;
  var precomputeStyle = require('precomputeStyle');
  
  class Carousel extends Component {
    constructor(props, context) {
      super(props, context);
      //this.changeContent = this.changeContent.bind(this);
    }
  
    componentDidMount() {
      this.myScroll.scrollTo(100);
      console.log("called DidMount");
    }
  
    render() {
      return (
        &lt;View style={{flex: 1}}&gt;
          &lt;ScrollView ref={(ref) =&gt; this.myScroll = ref}
            contentContainerStyle={styles.container}
            horizontal={true}
            pagingEnabled={true}
            showsHorizontalScrollIndicator={false}
            bounces={true}
            onMomentumScrollEnd={this.onAnimationEnd}
          &gt;
            {this.props.children}
          &lt;/ScrollView&gt;
        &lt;/View&gt;
      );
    }
  
    onAnimationEnd(e) {
      console.log("curr offset: " + e.nativeEvent.contentOffset.x);
    }
  }
  
  var styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
    },
    page: {
      alignItems: 'center',
      justifyContent: 'center',
      borderWidth: 1,
    },
  });
  
  module.exports = Carousel;
  </code></pre>