Search in sources :

Example 11 with WXComponentProp

use of com.taobao.weex.ui.component.WXComponentProp 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());
    }
}
Also used : WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 12 with WXComponentProp

use of com.taobao.weex.ui.component.WXComponentProp in project incubator-weex by apache.

the class WXListComponent method setColumnCount.

@WXComponentProp(name = Constants.Name.COLUMN_COUNT)
public void setColumnCount(int columnCount) {
    if (mRecyclerDom != null && mRecyclerDom.getColumnCount() != mColumnCount) {
        markComponentUsable();
        updateRecyclerAttr();
        WXRecyclerView wxRecyclerView = getHostView().getInnerView();
        wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
    }
}
Also used : WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 13 with WXComponentProp

use of com.taobao.weex.ui.component.WXComponentProp in project incubator-weex by apache.

the class WXListComponent method setLeftGap.

@WXComponentProp(name = Constants.Name.LEFT_GAP)
public void setLeftGap(float leftGap) {
    if (mRecyclerDom != null && mRecyclerDom.getLeftGap() != mLeftGap) {
        markComponentUsable();
        mRecyclerDom.preCalculateCellWidth();
        updateRecyclerAttr();
        WXRecyclerView wxRecyclerView = getHostView().getInnerView();
        wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
    }
}
Also used : WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 14 with WXComponentProp

use of com.taobao.weex.ui.component.WXComponentProp in project WeexErosFramework by bmfe.

the class HookWxScroller method setLoad.

// iCoastline 下拉加载更多
@WXComponentProp(name = HookConstants.NAME.SHOW_LOADMORE)
public void setLoad(String showLoadMore) {
    boolean customerLoad = WXUtils.getBoolean(showLoadMore, false);
    if (customerLoad && mLoadMore == null) {
        mLoadMore = new LoadingLoadMore(getContext(), this);
        ((HookBounceScrollerView) this.getHostView()).setOnLoadingListener(mLoadMore);
        Runnable runnable = WXThread.secure(new Runnable() {

            public void run() {
                ((HookBounceScrollerView) getHostView()).setCustomFootView(mLoadMore);
            }
        });
        this.handler.postDelayed(runnable, 100L);
    }
}
Also used : LoadingLoadMore(com.eros.framework.extend.hook.ui.view.refresh.loadmore.LoadingLoadMore) HookBounceScrollerView(com.eros.framework.extend.hook.ui.view.HookBounceScrollerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 15 with WXComponentProp

use of com.taobao.weex.ui.component.WXComponentProp in project WeexErosFramework by bmfe.

the class HookWxScroller method setPagingEnable.

@WXComponentProp(name = HookConstants.NAME.PAGINGENABLED)
public void setPagingEnable(boolean pagingEnable) {
    this.mPagingEnable = pagingEnable;
    ViewGroup innerView = getInnerView();
    if (innerView instanceof WXHorizontalScrollView) {
        ((HookWXHorizontalScrollView) innerView).setPageEnable(this.mPagingEnable);
    }
}
Also used : HookWXHorizontalScrollView(com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView) ViewGroup(android.view.ViewGroup) WXHorizontalScrollView(com.taobao.weex.ui.view.WXHorizontalScrollView) HookWXHorizontalScrollView(com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Aggregations

WXComponentProp (com.taobao.weex.ui.component.WXComponentProp)29 WXRecyclerView (com.taobao.weex.ui.view.listview.WXRecyclerView)13 Calendar (java.util.Calendar)4 HookBounceScrollerView (com.eros.framework.extend.hook.ui.view.HookBounceScrollerView)3 Drawable (android.graphics.drawable.Drawable)2 Uri (android.net.Uri)2 SpannableString (android.text.SpannableString)2 URLSpan (android.text.style.URLSpan)2 Pair (android.util.Pair)2 EditText (android.widget.EditText)2 TextView (android.widget.TextView)2 HookWXHorizontalScrollView (com.eros.framework.extend.hook.ui.view.HookWXHorizontalScrollView)2 JSMethod (com.taobao.weex.annotation.JSMethod)2 Invoker (com.taobao.weex.bridge.Invoker)2 MethodInvoker (com.taobao.weex.bridge.MethodInvoker)2 WXDomObject (com.taobao.weex.dom.WXDomObject)2 WXHorizontalScrollView (com.taobao.weex.ui.view.WXHorizontalScrollView)2 Annotation (java.lang.annotation.Annotation)2 Field (java.lang.reflect.Field)2 Method (java.lang.reflect.Method)2