mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-03 15:24:58 +08:00
Add support to measure shadow nodes in the FabricUIManager
Summary: In this diff I added support to be able to measure C++ shadowNode in Android. As an example I implemented the measurement of TextViews Reviewed By: shergin Differential Revision: D9583972 fbshipit-source-id: 1344782d4c586c94a4576b18a4acfa4775e46952
This commit is contained in:
committed by
Facebook Github Bot
parent
52dd7dbbcf
commit
5c0da011cb
@@ -10,7 +10,9 @@ package com.facebook.react.uimanager;
|
||||
import android.view.View;
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableNativeMap;
|
||||
import com.facebook.react.touch.JSResponderHandler;
|
||||
import com.facebook.react.touch.ReactInterceptingViewGroup;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
@@ -202,4 +204,16 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
|
||||
public Map<String, String> getNativeProps() {
|
||||
return ViewManagerPropertyUpdater.getNativeProps(getClass(), getShadowNodeClass());
|
||||
}
|
||||
|
||||
public float[] measure(
|
||||
ReactContext context,
|
||||
T view,
|
||||
ReadableNativeMap localData,
|
||||
ReadableNativeMap props,
|
||||
float width,
|
||||
int widthMode,
|
||||
float height,
|
||||
int heightMode) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user