com.taobao.weex.ui.view.refresh.core.WXRefreshView Java Examples
The following examples show how to use
com.taobao.weex.ui.view.refresh.core.WXRefreshView.
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: BaseBounceView.java From ucar-weex-core with Apache License 2.0 | 6 votes |
/** * * @param refresh should be {@link WXRefreshView} */ public void setHeaderView(WXComponent refresh) { setRefreshEnable(true); if (swipeLayout != null) { WXRefreshView refreshView = swipeLayout.getHeaderView(); if (refreshView != null) { ImmutableDomObject immutableDomObject = refresh.getDomObject(); if (immutableDomObject != null) { int refreshHeight = (int) immutableDomObject.getLayoutHeight(); swipeLayout.setRefreshHeight(refreshHeight); String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR); String bgColor = WXUtils.getString(colorStr, null); if (bgColor != null) { if (!TextUtils.isEmpty(bgColor)) { int colorInt = WXResourceUtils.getColor(bgColor); if (!(colorInt == Color.TRANSPARENT)) { swipeLayout.setRefreshBgColor(colorInt); } } } refreshView.setRefreshView(refresh.getHostView()); } } } }
Example #2
Source File: BaseBounceView.java From ucar-weex-core with Apache License 2.0 | 6 votes |
/** * * @param loading should be {@link WXRefreshView} */ public void setFooterView(WXComponent loading) { setLoadmoreEnable(true); if (swipeLayout != null) { WXRefreshView refreshView = swipeLayout.getFooterView(); if (refreshView != null) { ImmutableDomObject immutableDomObject = loading.getDomObject(); if (immutableDomObject != null) { int loadingHeight = (int) immutableDomObject.getLayoutHeight(); swipeLayout.setLoadingHeight(loadingHeight); String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR); String bgColor = WXUtils.getString(colorStr, null); if (bgColor != null) { if (!TextUtils.isEmpty(bgColor)) { int colorInt = WXResourceUtils.getColor(bgColor); if (!(colorInt == Color.TRANSPARENT)) { swipeLayout.setLoadingBgColor(colorInt); } } } refreshView.setRefreshView(loading.getHostView()); } } } }