mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-04 10:55:04 +08:00
Export latest Android changes
This commit is contained in:
@@ -20,6 +20,8 @@ public interface ReadableArray {
|
||||
boolean getBoolean(int index);
|
||||
double getDouble(int index);
|
||||
int getInt(int index);
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
int getColorInt(int index);
|
||||
String getString(int index);
|
||||
ReadableArray getArray(int index);
|
||||
ReadableMap getMap(int index);
|
||||
|
||||
@@ -20,6 +20,8 @@ public interface ReadableMap {
|
||||
boolean getBoolean(String name);
|
||||
double getDouble(String name);
|
||||
int getInt(String name);
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
int getColorInt(String name);
|
||||
String getString(String name);
|
||||
ReadableArray getArray(String name);
|
||||
ReadableMap getMap(String name);
|
||||
|
||||
@@ -44,4 +44,10 @@ public class ReadableNativeArray extends NativeArray implements ReadableArray {
|
||||
public int getInt(int index) {
|
||||
return (int) getDouble(index);
|
||||
}
|
||||
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
@Override
|
||||
public int getColorInt(int index) {
|
||||
return (int) (long) getDouble(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,11 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
|
||||
return (int) getDouble(name);
|
||||
}
|
||||
|
||||
// Check CatalystStylesDiffMap#getColorInt() to see why this is needed
|
||||
@Override
|
||||
public int getColorInt(String name) {
|
||||
return (int) (long) getDouble(name);
|
||||
}
|
||||
/**
|
||||
* Implementation of a {@link ReadableNativeMap} iterator in native memory.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user