use of com.taobao.weex.ui.component.WXVContainer in project weex-example by KalicyZhou.
the class WXRenderStatement method move.
/**
* @see com.taobao.weex.dom.WXDomStatement#moveDom(String, String, int)
*/
void move(String ref, String parentRef, int index) {
WXComponent component = mRegistry.get(ref);
WXComponent newParent = mRegistry.get(parentRef);
if (component == null || component.getParent() == null || newParent == null || !(newParent instanceof WXVContainer)) {
return;
}
WXVContainer oldParent = component.getParent();
oldParent.remove(component, false);
((WXVContainer) newParent).addChild(component, index);
}
use of com.taobao.weex.ui.component.WXVContainer in project weex-example by KalicyZhou.
the class WXRenderStatement method addComponent.
/**
* @see com.taobao.weex.dom.WXDomStatement#addDom(JSONObject, String, int)
*/
void addComponent(WXDomObject dom, String parentRef, int index) {
WXVContainer parent = (WXVContainer) mRegistry.get(parentRef);
WXComponent component = generateComponentTree(dom, parent);
parent.addChild(component, index);
}
Aggregations