Fix measureInWindow for view-backed Nodes

Summary:
This patch fixes measureInWindow for Nodes backed by Views.
Whereas the intention was to call the super implementation when we have a
Node backed by a View, we instead called the super implementation of
measure, which doesn't measure relative to window.

Differential Revision: D3607890
This commit is contained in:
Ahmed El-Helw 2016-07-22 15:14:46 -07:00
parent 690368fc3f
commit 520f70bd57
1 changed files with 5 additions and 1 deletions

View File

@ -195,7 +195,11 @@ public class FlatUIImplementation extends UIImplementation {
FlatShadowNode node = (FlatShadowNode) resolveShadowNode(reactTag);
if (node.mountsToView()) {
mStateBuilder.ensureBackingViewIsCreated(node);
super.measure(reactTag, callback);
if (relativeToWindow) {
super.measureInWindow(reactTag, callback);
} else {
super.measure(reactTag, callback);
}
return;
}