com.taobao.weex.ui.view.refresh.wrapper.BaseBounceView Java Examples

The following examples show how to use com.taobao.weex.ui.view.refresh.wrapper.BaseBounceView. 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: WXScroller.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@Override
public void remove(WXComponent child,boolean destory) {
  super.remove(child,destory);
  if(child instanceof WXLoading){
    ((BaseBounceView)getHostView()).removeFooterView(child);
  }else if(child instanceof WXRefresh){
    ((BaseBounceView)getHostView()).removeHeaderView(child);
  }
}
 
Example #2
Source File: WXRefresh.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@WXComponentProp(name = Constants.Name.DISPLAY)
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals(HIDE)) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getHostView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getHostView()).finishPullRefresh();
          ((BaseBounceView) getParent().getHostView()).onRefreshingComplete();
        }
      }
    }
  }
}
 
Example #3
Source File: WXLoading.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@WXComponentProp(name = Constants.Name.DISPLAY)
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals(HIDE)) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getHostView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getHostView()).finishPullLoad();
          ((BaseBounceView) getParent().getHostView()).onLoadmoreComplete();
        }
      }
    }
  }
}
 
Example #4
Source File: WXScroller.java    From weex-uikit with MIT License 5 votes vote down vote up
@Override
public void remove(WXComponent child,boolean destory) {
  super.remove(child,destory);
  if(child instanceof WXLoading){
    ((BaseBounceView)getHostView()).removeFooterView(child);
  }else if(child instanceof WXRefresh){
    ((BaseBounceView)getHostView()).removeHeaderView(child);
  }
}
 
Example #5
Source File: WXRefresh.java    From weex-uikit with MIT License 5 votes vote down vote up
@WXComponentProp(name = Constants.Name.DISPLAY)
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals(HIDE)) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getHostView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getHostView()).finishPullRefresh();
          ((BaseBounceView) getParent().getHostView()).onRefreshingComplete();
        }
      }
    }
  }
}
 
Example #6
Source File: WXLoading.java    From weex-uikit with MIT License 5 votes vote down vote up
@WXComponentProp(name = Constants.Name.DISPLAY)
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals(HIDE)) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getHostView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getHostView()).finishPullLoad();
          ((BaseBounceView) getParent().getHostView()).onLoadmoreComplete();
        }
      }
    }
  }
}
 
Example #7
Source File: WXRefresh.java    From weex with Apache License 2.0 5 votes vote down vote up
@WXComponentProp(name = "display")
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals("hide")) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getView()).finishPullRefresh();
          ((BaseBounceView) getParent().getView()).onRefreshingComplete();
        }
      }
    }
  }
}
 
Example #8
Source File: WXLoading.java    From weex with Apache License 2.0 5 votes vote down vote up
@WXComponentProp(name = "display")
public void setDisplay(String display) {
  if (!TextUtils.isEmpty(display)) {
    if (display.equals("hide")) {
      if (getParent() instanceof WXListComponent || getParent() instanceof WXScroller) {
        if (((BaseBounceView)getParent().getView()).getSwipeLayout().isRefreshing()) {
          ((BaseBounceView) getParent().getView()).finishPullLoad();
          ((BaseBounceView) getParent().getView()).onLoadmoreComplete();
        }
      }
    }
  }
}