Export latest Android changes

This commit is contained in:
Martin Konicek
2015-09-17 14:33:23 +01:00
parent 3b4845f93c
commit 27ab039b6a
32 changed files with 685 additions and 792 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);
}
}

View File

@@ -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.
*/