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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations