Search in sources :

Example 6 with WeexEventBean

use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class ImageModule method preview.

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

Example 7 with WeexEventBean

use of com.eros.framework.model.WeexEventBean in project WeexErosFramework by bmfe.

the class RouterModule method open.

@JSMethod(uiThread = true)
public void open(String params, JSCallback backCallback, JSCallback resultCallback) {
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setKey(WXEventCenter.EVENT_OPEN);
    eventBean.setJsParams(params);
    ArrayList<JSCallback> callBacks = new ArrayList<>();
    callBacks.add(backCallback);
    callBacks.add(resultCallback);
    eventBean.setCallbacks(callBacks);
    eventBean.setContext(mWXSDKInstance.getContext());
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(eventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) ArrayList(java.util.ArrayList) JSCallback(com.taobao.weex.bridge.JSCallback) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 8 with WeexEventBean

use of com.eros.framework.model.WeexEventBean 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 9 with WeexEventBean

use of com.eros.framework.model.WeexEventBean 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 10 with WeexEventBean

use of com.eros.framework.model.WeexEventBean 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)

Aggregations

WeexEventBean (com.eros.framework.model.WeexEventBean)55 JSMethod (com.taobao.weex.annotation.JSMethod)53 ArrayList (java.util.ArrayList)5 DispatchEventManager (com.eros.framework.manager.impl.dispatcher.DispatchEventManager)2 JSCallback (com.taobao.weex.bridge.JSCallback)2 DialogInterface (android.content.DialogInterface)1 Intent (android.content.Intent)1 RouterModel (com.eros.framework.model.RouterModel)1