title: react-native scrollView - scrollToEnd - on Android
body: <p>I'm trying to call a function that will fire upon onFoucs on <code>TextInput</code> that will scroll the scrollView all the way down (using <code>scrollToEnd()</code>)</p>
  
  <p>so this is my class component</p>
  
  <pre><code>class MyCMP extends Component {
  
    constructor(props) {
      super(props);
      this.onInputFocus = this.onInputFocus.bind(this);
    }
  
    onInputFocus() {
      setTimeout(() =&gt; {
        this.refs.scroll.scrollToEnd();
        console.log('done scrolling');
      }, 1);
    }
  
    render() {
      return (
        &lt;View&gt;
          &lt;ScrollView ref="scroll"&gt;
            { /* items */ }
          &lt;/ScrollView&gt;
          &lt;TextInput onFocus={this.onInputFocus} /&gt;
        &lt;/View&gt;
      );
    }
  }
  
  export default MyCMP;
  </code></pre>
  
  <p>the component above works and it does scroll but it takes a lot of time ... I'm using <code>setTimeout</code> because without it its just going down the screen without calculating the keybaord's height so it not scrolling down enough, even when I keep typing (and triggering that focus on the input) it still doesn't scroll all the way down.</p>
  
  <p>I'm dealing with it some good hours now, I did set the <code>windowSoftInputMode</code> to <code>adjustResize</code> and I did went through some modules like <code>react-native-keyboard-aware-scroll-view</code> or <code>react-native-auto-scroll</code> but none of them really does the work as I need it.</p>
  
  <p>any direction how to make it done the right way would be really appreciated. thanks! </p>