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:
David Vacca authored and Facebook Github Bot committed 2018-09-17 18:49:05 -07:00
1 parent 52dd7dbbcf
commit 5c0da011cb
14 files changed
+851 -11

No files matched your search

@@ -31,6 +31,13 @@ public class PixelUtil {
return toPixelFromDIP((float) value);
}
/**
* Convert from PX to SP
*/
public static float toSPFromPixel(float value) {
return value / DisplayMetricsHolder.getScreenDisplayMetrics().scaledDensity;
}
/**
* Convert from SP to PX
*/