Take viewport offset into account in UIManager.measureInWindow

Summary:
D23021903 (https://github.com/facebook/react-native/commit/154ce789723f6e65785bcfc00da399ad9184bdfb) but for Android.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D23640968

fbshipit-source-id: 7a743ebd0ea2b573d6ef17b418ad98ec616b11d3
This commit is contained in:
Joshua Gross
2020-09-11 13:40:56 -07:00
committed by Facebook GitHub Bot
parent a315e4cd30
commit 78b42d7fb7
7 changed files with 71 additions and 7 deletions
@@ -926,10 +926,14 @@ public class UIManagerModule extends ReactContextBaseJavaModule
/**
* Updates the styles of the {@link ReactShadowNode} based on the Measure specs received by
* parameters.
* parameters. offsetX and offsetY aren't used in non-Fabric, so they're ignored here.
*/
public void updateRootLayoutSpecs(
final int rootViewTag, final int widthMeasureSpec, final int heightMeasureSpec) {
final int rootViewTag,
final int widthMeasureSpec,
final int heightMeasureSpec,
int offsetX,
int offsetY) {
ReactApplicationContext reactApplicationContext = getReactApplicationContext();
reactApplicationContext.runOnNativeModulesQueueThread(
new GuardedRunnable(reactApplicationContext) {