Esempio n. 1
0
 @Override
 public void destroy() {
   super.destroy();
   if (mStickyMap != null) mStickyMap.clear();
   if (mViewTypes != null) mViewTypes.clear();
   if (mRefToViewType != null) mRefToViewType.clear();
 }
Esempio n. 2
0
 /**
  * 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));
     }
   }
 }
Esempio n. 3
0
  @Override
  public void remove(WXComponent child, boolean destroy) {
    int index = mChildren.indexOf(child);
    if (destroy) {
      child.detachViewAndClearPreInfo();
    }
    unBindViewType(child);

    BounceRecyclerView view = getHostView();
    if (view == null) {
      return;
    }
    view.getAdapter().notifyItemRemoved(index);
    if (WXEnvironment.isApkDebugable()) {
      WXLogUtils.d(TAG, "removeChild child at " + index);
    }
    super.remove(child, destroy);
  }