Java Code Examples for com.taobao.weex.ui.component.WXComponent#removeAllEvent()

The following examples show how to use com.taobao.weex.ui.component.WXComponent#removeAllEvent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WXRenderStatement.java    From weex-uikit with MIT License 6 votes vote down vote up
/**
 * Clear registry information that current instance contains.
 */
private void clearRegistryForComponent(WXComponent component) {
  WXComponent removedComponent = mRegistry.remove(component.getDomObject().getRef());
  if (removedComponent != null) {
    removedComponent.removeAllEvent();
    removedComponent.removeStickyStyle();
  }
  if (component instanceof WXVContainer) {
    WXVContainer container = (WXVContainer) component;
    int count = container.childCount();
    for (int i = count - 1; i >= 0; --i) {
      clearRegistryForComponent(container.getChild(i));
    }
  }

}
 
Example 2
Source File: WXRenderStatement.java    From weex with Apache License 2.0 6 votes vote down vote up
/**
 * Clear registry information that current instance contains.
 */
private void clearRegistryForComponent(WXComponent component) {
  WXComponent removedComponent = mRegistry.remove(component.getDomObject().ref);
  if (removedComponent != null) {
    removedComponent.removeAllEvent();
    removedComponent.removeStickyStyle();
  }
  if (component instanceof WXVContainer) {
    WXVContainer container = (WXVContainer) component;
    int count = container.childCount();
    for (int i = count - 1; i >= 0; --i) {
      clearRegistryForComponent(container.getChild(i));
    }
  }

}
 
Example 3
Source File: RemoveElementAction.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
private void clearRegistryForComponent(RenderActionContext context, WXComponent component) {
  WXComponent removedComponent = context.unregisterComponent(component.getDomObject().getRef());
  if (removedComponent != null) {
    removedComponent.removeAllEvent();
    removedComponent.removeStickyStyle();
  }
  if (component instanceof WXVContainer) {
    WXVContainer container = (WXVContainer) component;
    int count = container.childCount();
    for (int i = count - 1; i >= 0; --i) {
      clearRegistryForComponent(context, container.getChild(i));
    }
  }

}