react-native/ReactAndroid
Gaëtan Renaudeau af28de5300 Implement addUIBlock to allow third party to resolve a view
Summary:
This PR follows the work started in #6431 but instead of implementing the snapshot for Android, will just allow that feature to be implemented by a third party library.

The missing feature is the ability to resolve a View for a given tag integer. which is now possible with a `addUIBlock` on the `UIManagerModule` method where you give a `UIBlock` instance (a new class) that implements a `execute(NativeViewHierarchyManager)` function.

This is already possible in iOS API. a third party can use the `addUIBlock` too.
I have kept the name `addUIBlock` so it's the same as in the [iOS' API](https://github.com/facebook/react-native/search?q=addUIBlock&type=Code&utf8=%E2%9C%93).

 ---

With this PR a third party lib can now do...

```java
UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class);
uiManager.addUIBlock(new UIBlock() {
  public void execute (NativeViewHierarchyManager nvhm) {
    View view = nvhm.resolveView(tag);
    ...do something with view... like... screenshot t
Closes https://github.com/facebook/react-native/pull/8217

Differential Revision: D3469311

Pulled By: astreet

fbshipit-source-id: bb56ecc7e8936299337af47ca8114875ee1fd2b0
2016-06-22 06:28:28 -07:00
..
libs Add BUCK files 2016-01-22 16:20:13 +00:00
src Implement addUIBlock to allow third party to resolve a view 2016-06-22 06:28:28 -07:00
.npmignore Don't publish /ReactAndroid/build to npm, update version on master 2015-10-12 11:11:40 -07:00
DEFS Move cxx module support into oss 2016-05-24 19:28:59 -07:00
DevExperience.md CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
README.md Add scripts for running tests locally 2016-05-04 08:58:18 -07:00
build.gradle Update fresco from 0.10.0 to 0.11.0 2016-06-17 02:58:24 -07:00
gradle.properties E2e android 2016-04-13 08:20:05 -07:00
release.gradle CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00

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.