private void setAppearanceWatch(WXComponent component, int event, boolean enable) { AppearanceHelper item = mAppearComponents.get(component.getRef()); if (item != null) { item.setWatchEvent(event, enable); } else if (!enable) { // Do nothing if disable target not exist. } else { WXComponent dChild = findDirectListChild(component); int index = mChildren.indexOf(dChild); if (index != -1) { item = new AppearanceHelper(component, index); item.setWatchEvent(event, true); mAppearComponents.put(component.getRef(), item); } } }
/** * Update the specified component's dom and mark it as old. * * @param component the component to be updated */ private void updateDomObj(WXComponent component) { if (component == null) { return; } WXDomObject domObject = mRegistry.get(component.getRef()); if (domObject == null) { return; } domObject.old(); component.updateDom(domObject.clone()); if (component instanceof WXVContainer) { WXVContainer container = (WXVContainer) component; int count = container.childCount(); for (int i = 0; i < count; ++i) { updateDomObj(container.getChild(i)); } } }