Introducing view property annotation.

Differential Revision: D2475680

committer: Service User <svcscm@fb.com>
This commit is contained in:
Krzysztof Magiera
2015-09-24 04:30:29 -07:00
committed by facebook-github-bot-9
parent 6c3fb77f30
commit 5623c831b3
8 changed files with 634 additions and 19 deletions

View File

@@ -64,13 +64,9 @@ import com.facebook.react.common.MapBuilder;
if (viewManagerCommands != null) {
viewManagerConstants.put("Commands", viewManagerCommands);
}
Map<String, UIProp.Type> viewManagerNativeProps = viewManager.getNativeProps();
Map<String, String> viewManagerNativeProps = viewManager.getNativeProps();
if (!viewManagerNativeProps.isEmpty()) {
Map<String, String> nativeProps = new HashMap<>();
for (Map.Entry<String, UIProp.Type> entry : viewManagerNativeProps.entrySet()) {
nativeProps.put(entry.getKey(), entry.getValue().toString());
}
viewManagerConstants.put("NativeProps", nativeProps);
viewManagerConstants.put("NativeProps", viewManagerNativeProps);
}
if (!viewManagerConstants.isEmpty()) {
constants.put(viewManager.getName(), viewManagerConstants);