android:fix cannot change width and height after rendered
This commit is contained in:
parent
1e22555248
commit
7f16aa23ae
@ -105,6 +105,7 @@ public abstract class SuperNode<V extends View> extends ViewNode<V> {
|
||||
layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
break;
|
||||
default:
|
||||
layoutParams.width = Math.max(0, layoutParams.width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -117,6 +118,7 @@ public abstract class SuperNode<V extends View> extends ViewNode<V> {
|
||||
layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
break;
|
||||
default:
|
||||
layoutParams.height = Math.max(0, layoutParams.height);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -117,6 +117,10 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
|
||||
public void blend(JSObject jsObject) {
|
||||
if (jsObject != null) {
|
||||
JSValue value = jsObject.getProperty("layoutConfig");
|
||||
if (value.isObject()) {
|
||||
setLayoutConfig(value.asObject());
|
||||
}
|
||||
for (String prop : jsObject.propertySet()) {
|
||||
blend(mView, prop, jsObject.getProperty(prop));
|
||||
}
|
||||
@ -252,9 +256,6 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "layoutConfig":
|
||||
setLayoutConfig(prop.asObject());
|
||||
break;
|
||||
case "border":
|
||||
if (prop.isObject()) {
|
||||
requireDoricLayer().setBorder(DoricUtils.dp2px(prop.asObject().getProperty("width").asNumber().toFloat()),
|
||||
|
Reference in New Issue
Block a user