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 @Override
protected void blendChildLayoutConfig(ViewNode viewNode, JSObject layoutConfig) { protected void blendSubLayoutConfig(ViewNode viewNode, JSObject layoutConfig) {
super.blendChildLayoutConfig(viewNode, layoutConfig); super.blendSubLayoutConfig(viewNode, layoutConfig);
JSValue jsValue = layoutConfig.getProperty("alignment"); JSValue jsValue = layoutConfig.getProperty("alignment");
if (jsValue.isNumber()) { if (jsValue.isNumber()) {
((LinearLayout.LayoutParams) viewNode.getLayoutParams()).gravity = jsValue.asNumber().toInt(); ((LinearLayout.LayoutParams) viewNode.getLayoutParams()).gravity = jsValue.asNumber().toInt();

View File

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

View File

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

View File

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