ad8cbb6dea
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 |
||
---|---|---|
.. | ||
libs | ||
src | ||
.npmignore | ||
DEFS | ||
DevExperience.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
release.gradle |
README.md
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.