rename SuperNode method

This commit is contained in:
pengfei.zhou 2019-11-13 17:26:59 +08:00
parent 0887ba72e8
commit 460030fc4f
5 changed files with 8 additions and 8 deletions

View File

@ -36,8 +36,8 @@ public class LinearNode extends GroupNode<LinearLayout> {
}
@Override
protected void blendChildLayoutConfig(ViewNode viewNode, JSObject layoutConfig) {
super.blendChildLayoutConfig(viewNode, layoutConfig);
protected void blendSubLayoutConfig(ViewNode viewNode, JSObject layoutConfig) {
super.blendSubLayoutConfig(viewNode, layoutConfig);
JSValue jsValue = layoutConfig.getProperty("alignment");
if (jsValue.isNumber()) {
((LinearLayout.LayoutParams) viewNode.getLayoutParams()).gravity = jsValue.asNumber().toInt();

View File

@ -36,8 +36,8 @@ public class StackNode extends GroupNode<FrameLayout> {
}
@Override
protected void blendChildLayoutConfig(ViewNode viewNode, JSObject jsObject) {
super.blendChildLayoutConfig(viewNode, jsObject);
protected void blendSubLayoutConfig(ViewNode viewNode, JSObject jsObject) {
super.blendSubLayoutConfig(viewNode, jsObject);
JSValue jsValue = jsObject.getProperty("alignment");
if (jsValue.isNumber()) {
((FrameLayout.LayoutParams) viewNode.getLayoutParams()).gravity = jsValue.asNumber().toInt();

View File

@ -38,7 +38,7 @@ public abstract class SuperNode<V extends View> extends ViewNode<V> {
return new ViewGroup.LayoutParams(0, 0);
}
protected void blendChildLayoutConfig(ViewNode viewNode, JSObject jsObject) {
protected void blendSubLayoutConfig(ViewNode viewNode, JSObject jsObject) {
JSValue jsValue = jsObject.getProperty("margin");
JSValue widthSpec = jsObject.getProperty("widthSpec");
JSValue heightSpec = jsObject.getProperty("heightSpec");

View File

@ -129,7 +129,7 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
break;
case "layoutConfig":
if (prop.isObject() && mSuperNode != null) {
mSuperNode.blendChildLayoutConfig(this, prop.asObject());
mSuperNode.blendSubLayoutConfig(this, prop.asObject());
}
break;
case "border":

View File

@ -82,7 +82,7 @@ public class ListNode extends SuperNode<RecyclerView> {
}
@Override
protected void blendChildLayoutConfig(ViewNode viewNode, JSObject jsObject) {
super.blendChildLayoutConfig(viewNode, jsObject);
protected void blendSubLayoutConfig(ViewNode viewNode, JSObject jsObject) {
super.blendSubLayoutConfig(viewNode, jsObject);
}
}