Search in sources :

Example 51 with WeexEventBean

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

the class TitleModule method setLeftItem.

@JSMethod(uiThread = true)
public void setLeftItem(String json, final JSCallback callback) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_LEFTITEM);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJscallback(callback);
    weexEventBean.setJsParams(json);
    weexEventBean.setExpand(mWXSDKInstance.hashCode());
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 52 with WeexEventBean

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

the class TitleModule method setRightItem.

@JSMethod(uiThread = true)
public void setRightItem(String json, final JSCallback callback) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_RIGHTITEM);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJscallback(callback);
    weexEventBean.setJsParams(json);
    weexEventBean.setExpand(mWXSDKInstance.hashCode());
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 53 with WeexEventBean

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

the class TitleModule method setCenterItem.

@JSMethod(uiThread = true)
public void setCenterItem(String json, final JSCallback callback) {
    WeexEventBean weexEventBean = new WeexEventBean();
    weexEventBean.setKey(WXEventCenter.EVENT_CENTERITEM);
    weexEventBean.setContext(mWXSDKInstance.getContext());
    weexEventBean.setJscallback(callback);
    weexEventBean.setJsParams(json);
    weexEventBean.setExpand(mWXSDKInstance.hashCode());
    ManagerFactory.getManagerService(DispatchEventManager.class).getBus().post(weexEventBean);
}
Also used : WeexEventBean(com.eros.framework.model.WeexEventBean) JSMethod(com.taobao.weex.annotation.JSMethod)

Example 54 with WeexEventBean

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

the class TitleModule method setNavigationInfo.

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

Example 55 with WeexEventBean

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

the class SplashActivityProxy method toHome.

private void toHome(Activity activity) {
    String homePage = BMWXEnvironment.mPlatformConfig.getPage().getHomePage(activity);
    String NavigationColor = BMWXEnvironment.mPlatformConfig.getPage().getNavBarColor();
    RouterModel router = new RouterModel(homePage, Constant.ACTIVITIES_ANIMATION.ANIMATION_PUSH, null, null, false, null);
    DispatchEventManager dispatchEventManager = ManagerFactory.getManagerService(DispatchEventManager.class);
    WeexEventBean eventBean = new WeexEventBean();
    eventBean.setKey(WXEventCenter.EVENT_OPEN);
    eventBean.setJsParams(ManagerFactory.getManagerService(ParseManager.class).toJsonString(router));
    eventBean.setContext(activity);
    dispatchEventManager.getBus().post(eventBean);
    activity.finish();
}
Also used : RouterModel(com.eros.framework.model.RouterModel) WeexEventBean(com.eros.framework.model.WeexEventBean) DispatchEventManager(com.eros.framework.manager.impl.dispatcher.DispatchEventManager)

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