android:fix type cast error
This commit is contained in:
parent
fc6b465b92
commit
ed5c2103b0
@ -354,6 +354,9 @@ public class ImageNode extends ViewNode<ImageView> {
|
||||
loadImageUrl(prop.asString().value());
|
||||
break;
|
||||
case "scaleType":
|
||||
if (!prop.isNumber()) {
|
||||
return;
|
||||
}
|
||||
int scaleType = prop.asNumber().toInt();
|
||||
switch (scaleType) {
|
||||
case 1:
|
||||
|
@ -267,7 +267,7 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
}
|
||||
|
||||
JSValue orientation = dict.asObject().getProperty("orientation");
|
||||
|
||||
if (orientation.isNumber()) {
|
||||
switch (orientation.asNumber().toInt()) {
|
||||
case 0:
|
||||
linearGradient = new LinearGradient(0.f, 0.f, 0.f, height, colors, locations, Shader.TileMode.CLAMP);
|
||||
@ -294,6 +294,7 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
linearGradient = new LinearGradient(0.f, 0.f, width, height, colors, locations, Shader.TileMode.CLAMP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return linearGradient;
|
||||
}
|
||||
|
Reference in New Issue
Block a user