Search in sources :

Example 86 with JSMethod

use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.

the class RouterModule method setHomePage.

@JSMethod
public void setHomePage(String params) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_SET_HOMEPAGE);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJsParams(params);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 87 with JSMethod

use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.

the class RouterModule method toWebView.

@JSMethod
public void toWebView(String params) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_TOWEBVIEW);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJsParams(params);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 88 with JSMethod

use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.

the class RouterModule method clearHomePage.

@JSMethod
public void clearHomePage() {
    StorageManager storageManager = ManagerFactory.getManagerService(StorageManager.class);
    storageManager.setData(mWXSDKInstance.getContext(), Constant.SP.SP_HOMEPAGE_URL, "");
}
Also used : StorageManager(com.eros.framework.manager.StorageManager) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 89 with JSMethod

use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.

the class TabBarModule method watchIndex.

@JSMethod(uiThread = false)
public void watchIndex(JSCallback callback) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_WATCHINDEX);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setExpand(mWXSDKInstance.hashCode());
    weexEventBean.setJscallback(callback);
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 90 with JSMethod

use of com.taobao.weex.annotation.JSMethod in project WeexErosFramework by bmfe.

the class TabBarModule method hideBadge.

@JSMethod(uiThread = true)
public void hideBadge(String params) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_TABBAR_HIDBADGE);
    weexEventBean.setJsParams(params);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Aggregations

JSMethod (com.taobao.weex.annotation.JSMethod)198 WeexEventBean (com.eros.framework.model.WeexEventBean)53 WeexEventBean (com.benmu.framework.model.WeexEventBean)50 JSONObject (com.alibaba.fastjson.JSONObject)32 ArrayList (java.util.ArrayList)25 HashMap (java.util.HashMap)20 Intent (android.content.Intent)19 JSCallback (com.taobao.weex.bridge.JSCallback)12 Activity (android.app.Activity)11 WXEditText (com.taobao.weex.ui.view.WXEditText)8 Map (java.util.Map)8 Uri (android.net.Uri)7 AlertDialog (android.app.AlertDialog)6 Context (android.content.Context)6 DialogInterface (android.content.DialogInterface)6 OnClickListener (android.content.DialogInterface.OnClickListener)6 EditText (android.widget.EditText)6 JSONException (com.alibaba.fastjson.JSONException)6 Invoker (com.taobao.weex.bridge.Invoker)5 MethodInvoker (com.taobao.weex.bridge.MethodInvoker)5