Search in sources :

Example 21 with WXComponentProp

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

the class BMCalendar method setMinDate.

@WXComponentProp(name = "minimumDate")
public void setMinDate(String minDate) {
    if (TextUtils.isEmpty(minDate))
        return;
    this.mMinDate = minDate;
    if (mBuilder != null) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(getDate(mMinDate));
        mBuilder.setMinimumDate(calendar);
        if (!TextUtils.isEmpty(mMaxDate)) {
            Calendar maxCalendar = Calendar.getInstance();
            maxCalendar.setTime(getDate(mMaxDate));
            mBuilder.setMaximumDate(maxCalendar);
            mBuilder.commit();
        }
    }
}
Also used : Calendar(java.util.Calendar) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 22 with WXComponentProp

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

the class RichText method setTelLink.

@WXComponentProp(name = "tel")
public void setTelLink(String tel) {
    SpannableString spannable = new SpannableString(tel);
    spannable.setSpan(new URLSpan("tel:" + tel), 0, tel.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    ((TextView) getHostView()).setText(spannable);
}
Also used : SpannableString(android.text.SpannableString) TextView(android.widget.TextView) URLSpan(android.text.style.URLSpan) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 23 with WXComponentProp

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

the class BasicListComponent method setScrollable.

@WXComponentProp(name = Constants.Name.SCROLLABLE)
public void setScrollable(boolean scrollable) {
    this.isScrollable = scrollable;
    WXRecyclerView inner = getHostView().getInnerView();
    if (inner != null) {
        inner.setScrollable(scrollable);
    }
}
Also used : WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 24 with WXComponentProp

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

the class WXListComponent method setScrollable.

@WXComponentProp(name = Constants.Name.SCROLLABLE)
public void setScrollable(boolean scrollable) {
    WXRecyclerView inner = getHostView().getInnerView();
    inner.setScrollable(scrollable);
}
Also used : WXRecyclerView(com.taobao.weex.ui.view.listview.WXRecyclerView) WXComponentProp(com.taobao.weex.ui.component.WXComponentProp)

Example 25 with WXComponentProp

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

the class WXListComponent method setColumnWidth.

@WXComponentProp(name = Constants.Name.COLUMN_WIDTH)
public void setColumnWidth(int columnCount) {
    if (mRecyclerDom != null && mRecyclerDom.getColumnWidth() != mColumnWidth) {
        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)

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