react-native/Libraries/Components/ScrollView
Martin Konicek ad8cbb6dea Support ScrollView.scrollToEnd on Android natively
Summary:
This is a followup for https://github.com/facebook/react-native/pull/12088 and implements the scrolling to end on Android natively rather than sending a large scroll offset from JS.

This turned out to be an OK amount of code, and some reduction in the amount of JavaScript. The only part I'm not particularly happy about is:

```
// ScrollView always has one child - the scrollable area
int bottom = scrollView.getChildAt(0).getHeight() + scrollView.getPaddingBottom();
```

According to multiple sources (e.g. [this SO answer](http://stackoverflow.com/questions/3609297/android-total-height-of-scrollview)) it is the way to get the total size of the scrollable area, similar to`scrollView.contentSize` on iOS but more ugly and relying on the fact the ScrollView always has a single child (hopefully this won't change in future versions of Android).

An alternative is:

```
View lastChild = scrollLayout.getChildAt(scrollLayout.getChildCount() - 1);
int bottom = lastChild.getBottom() + scrollLayout.getPadd
Closes https://github.com/facebook/react-native/pull/12101

Differential Revision: D4481523

Pulled By: mkonicek

fbshipit-source-id: 8c7967a0b9e06890c1e1ea70ad573c6eceb03daf
2017-01-30 10:28:32 -08:00
..
__mocks__ Include props in new ListView and ScrollView mocks 2017-01-12 10:58:29 -08:00
RecyclerViewBackedScrollView.android.js Deprecate RecyclerViewBackedScrollView 2016-12-16 12:28:36 -08:00
RecyclerViewBackedScrollView.ios.js Expose in public interface 2015-12-23 10:07:34 -08:00
ScrollView.js Support ScrollView.scrollToEnd on Android natively 2017-01-30 10:28:32 -08:00
processDecelerationRate.js Removed unnecessary exportedConstants 2016-03-10 10:21:34 -08:00