use of com.taobao.weex.ui.view.listview.WXRecyclerView in project incubator-weex by apache.
the class WXRecyclerTemplateList method setColumnCount.
@WXComponentProp(name = Constants.Name.COLUMN_COUNT)
public void setColumnCount(int columnCount) {
if (mDomObject.getColumnCount() != mColumnCount) {
updateRecyclerAttr();
WXRecyclerView wxRecyclerView = getHostView().getInnerView();
wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
}
}
use of com.taobao.weex.ui.view.listview.WXRecyclerView in project incubator-weex by apache.
the class WXRecyclerTemplateList method setScrollDirection.
@WXComponentProp(name = Constants.Name.SCROLL_DIRECTION)
public void setScrollDirection(String direction) {
if (orientation != mDomObject.getOrientation()) {
orientation = mDomObject.getOrientation();
updateRecyclerAttr();
WXRecyclerView wxRecyclerView = getHostView().getInnerView();
wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
}
}
use of com.taobao.weex.ui.view.listview.WXRecyclerView in project incubator-weex by apache.
the class WXRecyclerTemplateList method updateProperties.
@Override
public void updateProperties(Map<String, Object> props) {
super.updateProperties(props);
if (props.containsKey(Constants.Name.PADDING) || props.containsKey(Constants.Name.PADDING_LEFT) || props.containsKey(Constants.Name.PADDING_RIGHT)) {
if (mPaddingLeft != mDomObject.getPadding().get(Spacing.LEFT) || mPaddingRight != mDomObject.getPadding().get(Spacing.RIGHT)) {
updateRecyclerAttr();
WXRecyclerView wxRecyclerView = getHostView().getInnerView();
wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
}
}
}
use of com.taobao.weex.ui.view.listview.WXRecyclerView in project incubator-weex by apache.
the class WXRecyclerTemplateList method onHostViewInitialized.
@Override
protected void onHostViewInitialized(BounceRecyclerView host) {
super.onHostViewInitialized(host);
WXRecyclerView recyclerView = host.getInnerView();
if (recyclerView == null || recyclerView.getAdapter() == null) {
WXLogUtils.e(TAG, "RecyclerView is not found or Adapter is not bound");
return;
}
}
use of com.taobao.weex.ui.view.listview.WXRecyclerView in project incubator-weex by apache.
the class WXListComponent method setRightGap.
@WXComponentProp(name = Constants.Name.RIGHT_GAP)
public void setRightGap(float rightGap) {
if (mRecyclerDom != null && mRecyclerDom.getRightGap() != mRightGap) {
markComponentUsable();
mRecyclerDom.preCalculateCellWidth();
updateRecyclerAttr();
WXRecyclerView wxRecyclerView = getHostView().getInnerView();
wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
}
}
Aggregations