mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 01:15:00 +08:00
Implement Local Data in Android Fabric C++
Summary: This diff introduces the concept of Local Data in Android Fabric C++ and as an example we uses it to implement Text View. Reviewed By: shergin Differential Revision: D9583970 fbshipit-source-id: ab7478b16ef4327ff574ca1467870ab9cb684ea0
This commit is contained in:
committed by
Facebook Github Bot
parent
5c0da011cb
commit
9ad193c35b
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "TextLayoutManager.h"
|
||||
|
||||
#include <fabric/attributedstring/conversions.h>
|
||||
#include <react/jni/ReadableNativeMap.h>
|
||||
|
||||
using namespace facebook::jni;
|
||||
@@ -37,7 +38,7 @@ Size TextLayoutManager::measure(
|
||||
int width = (int) layoutConstraints.maximumSize.width;
|
||||
int height = (int) layoutConstraints.maximumSize.height;
|
||||
local_ref<JString> componentName = make_jstring("RCTText");
|
||||
auto values = measure(fabricUIManager, reactTag, componentName.get(), ReadableNativeMap::newObjectCxxArgs(attributedString.toDynamic()).get(), ReadableNativeMap::newObjectCxxArgs(paragraphAttributes.toDynamic()).get(), width, height);
|
||||
auto values = measure(fabricUIManager, reactTag, componentName.get(), ReadableNativeMap::newObjectCxxArgs(toDynamic(attributedString)).get(), ReadableNativeMap::newObjectCxxArgs(toDynamic(paragraphAttributes)).get(), width, height);
|
||||
|
||||
std::vector<float> indices;
|
||||
indices.resize(values->size());
|
||||
|
||||
Reference in New Issue
Block a user