react-native/Libraries
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
..
ART Better error for ART <Group /> 2016-12-07 17:13:42 -08:00
ActionSheetIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
AdSupport Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Alert Add one more parameter(keyboardType) to AlertIOS.promot(). 2017-01-19 14:43:37 -08:00
Animated Drive any numerical prop via NativeAnimated 2017-01-26 18:28:53 -08:00
AppState docs(AppState.js): update example to ES6 2017-01-23 11:58:33 -08:00
BatchedBridge Remove obsolete mocks 2017-01-26 11:28:33 -08:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Add iOS permission information to CameraRoll.js 2016-12-22 17:13:31 -08:00
Components Support ScrollView.scrollToEnd on Android natively 2017-01-30 10:28:32 -08:00
Core Fix the suppress comment regex for react_native 2017-01-19 10:28:28 -08:00
CustomComponents Add scrollToEnd to ScrollView and ListView 2017-01-27 10:13:29 -08:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
EventEmitter RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Experimental Fix Scrollblocking on Android 2017-01-19 14:43:37 -08:00
Geolocation Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Image fix type on => one 2017-01-23 15:13:32 -08:00
Inspector Remove usages of RecyclerViewBackedScrollView in UIExplorer and NetworkOverlay 2017-01-28 10:43:35 -08:00
Interaction Replace jest.resetModuleRegistry() with jest.resetModules() 2016-12-18 17:13:38 -08:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation Mention that LayoutAnimation has to be explicitly enabled on A… 2016-11-25 15:28:28 -08:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Modal Add property to force HW acceleration on Android for modal windows 2016-12-14 10:28:33 -08:00
NativeAnimation Drive any numerical prop via NativeAnimated 2017-01-26 18:28:53 -08:00
NavigationExperimental Fix the suppress comment regex for react_native 2017-01-19 10:28:28 -08:00
Network XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
Performance Updated Systrace and RCTRenderingPerf to sync w/ React changes 2017-01-22 09:58:32 -08:00
PermissionsAndroid Update PermissionsAndroid docs to use new APIs 2017-01-09 00:43:31 -08:00
PushNotificationIOS Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
RCTTest Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
ReactNative The warning 'cannot calculate shadow efficiently' is not a warning anymore 2017-01-25 12:28:50 -08:00
Renderer Remove obsolete mocks 2017-01-26 11:28:33 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
Share Update Share.js. Fixed bad grammar 2016-11-23 11:28:29 -08:00
Storage result in RCTAsyncStorage.multiGet could be null. 2016-12-15 22:43:30 -08:00
StyleSheet Drive any numerical prop via NativeAnimated 2017-01-26 18:28:53 -08:00
Text Fixed calling TextInput.onChange() on applying autocorrection (iOS) 2017-01-24 16:58:27 -08:00
Utilities XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
Vibration Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08:00
WebSocket XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
react-native RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
vendor RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00