mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00: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:
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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user