Make AndroidView an interface

Summary:
The current AndroidView stipulates that the backing shadow node can't
be a FlatShadowNode. In some cases, however, we want to apply some of the same
logic (ex not adding NodeRegions, etc) to other ViewManagers that have a
FlatShadowNode backing (and that don't necessarily create a FlatViewGroup).
This commit renames AndroidView to NativeViewWrapper, and re-introduces
AndroidView as an interface, so that logic for padding, NodeRegions, etc can
be shared.

Differential Revision: D2942387
This commit is contained in:
Ahmed El-Helw
2016-02-17 19:08:19 -08:00
parent b461c70b76
commit f0535152ab
5 changed files with 142 additions and 106 deletions

View File

@@ -116,7 +116,7 @@ public class FlatUIImplementation extends UIImplementation {
}
ViewManager viewManager = resolveViewManager(className);
return new AndroidView(viewManager);
return new NativeViewWrapper(viewManager);
}
@Override