mirror of
https://github.com/alibaba/Tangram-Android.git
synced 2026-10-29 14:49:03 +08:00
Fix NPE and update version.
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ org.gradle.jvmargs=-Xmx1536M
|
||||
GROUP=com.alibaba.android
|
||||
ARTIFACT=tangram
|
||||
VERSION=1
|
||||
VERSION_NAME=3.2.0.7
|
||||
VERSION_NAME=3.2.0.8
|
||||
PACKAGING_TYPE=aar
|
||||
systemProp.compileSdkVersion=26
|
||||
systemProp.targetSdkVersion=26
|
||||
|
||||
+2
-2
@@ -701,9 +701,9 @@ public class PojoDataParser extends DataParser<JSONObject, JSONArray> {
|
||||
@NonNull ServiceManager serviceManager) {
|
||||
BaseCell cell = null;
|
||||
String cellType = parseCellType(cellData);
|
||||
if ((resolver.resolver().getViewClass(cellType) != null) || Utils.isCard(cellData)) {
|
||||
if ((resolver.resolver().getViewClass(cellType) != null) || Utils.isCard(cellType)) {
|
||||
|
||||
if (Utils.isCard(cellData)) {
|
||||
if (Utils.isCard(cellType)) {
|
||||
switch (cellType) {
|
||||
case TangramBuilder.TYPE_CONTAINER_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_1C_FLOW:
|
||||
|
||||
@@ -195,24 +195,19 @@ public class Utils {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isCard(JSONObject cellData) {
|
||||
if (cellData != null) {
|
||||
String type = cellData.getString("type");
|
||||
switch (type) {
|
||||
case TangramBuilder.TYPE_CONTAINER_BANNER:
|
||||
case TangramBuilder.TYPE_CONTAINER_SCROLL:
|
||||
case TangramBuilder.TYPE_CONTAINER_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_1C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_2C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_3C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_4C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_5C_FLOW:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
public static boolean isCard(String type) {
|
||||
switch (type) {
|
||||
case TangramBuilder.TYPE_CONTAINER_BANNER:
|
||||
case TangramBuilder.TYPE_CONTAINER_SCROLL:
|
||||
case TangramBuilder.TYPE_CONTAINER_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_1C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_2C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_3C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_4C_FLOW:
|
||||
case TangramBuilder.TYPE_CONTAINER_5C_FLOW:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user