use of com.eros.framework.activity.AbstractWeexActivity in project WeexErosFramework by bmfe.
the class DefaultWXHttpAdapter method hideError.
private void hideError() {
if (!DebugableUtil.isDebug())
return;
Activity activity = RouterTracker.peekActivity();
if (activity != null && activity instanceof AbstractWeexActivity) {
AbstractWeexActivity abs = (AbstractWeexActivity) activity;
abs.hideError();
}
}
use of com.eros.framework.activity.AbstractWeexActivity in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setTabbarNavigation.
public static void setTabbarNavigation(Activity activity, NavigatorModel navigatorModel) {
if (activity instanceof AbstractWeexActivity) {
RouterModel routerModel = ((AbstractWeexActivity) activity).getRouterParam();
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
NatigatorModel model = parseManager.parseObject(navigatorModel.navigatorModel, NatigatorModel.class);
routerModel.navShow = model.isNavShow();
routerModel.navTitle = model.getTitle();
routerModel.canBack = false;
((AbstractWeexActivity) activity).setRouterParam(routerModel);
((AbstractWeexActivity) activity).setNavigationBar();
StatusBarManager.setHeaderBg(routerModel, (AbstractWeexActivity) activity);
}
}
use of com.eros.framework.activity.AbstractWeexActivity in project WeexErosFramework by bmfe.
the class DefaultRouterAdapter method back.
public boolean back(Context context, String params) {
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
RouterModel routerModel = parseManager.parseObject(params, RouterModel.class);
int backLength = routerModel.length;
if (backLength >= RouterTracker.length()) {
RouterTracker.clearActivitySurplus(1);
} else {
for (int i = 0; i < backLength; i++) {
RouterTracker.popActivity();
}
}
Object backParams = routerModel.params;
if (backParams instanceof Map) {
if (((Map) backParams).size() > 0) {
Activity activity = RouterTracker.peekActivity();
if (activity instanceof AbstractWeexActivity) {
// 设置back参数
((AbstractWeexActivity) activity).setRouterParam(routerModel);
}
}
}
return true;
}
use of com.eros.framework.activity.AbstractWeexActivity in project WeexErosFramework by bmfe.
the class GlobalEvent method eventPushMessage.
private void eventPushMessage(Context context, BaseEventBean eventBean) {
Activity activity = RouterTracker.peekActivity();
if (activity instanceof AbstractWeexActivity) {
WXSDKInstance instance = ((AbstractWeexActivity) activity).getWXSDkInstance();
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
GlobalEventManager.pushMessage(instance, parseManager.parseObject(eventBean.param));
}
}
use of com.eros.framework.activity.AbstractWeexActivity in project WeexErosFramework by bmfe.
the class TitleModule method statusBarHidden.
@JSMethod(uiThread = true)
public void statusBarHidden(String param) {
boolean isFullScreen = false;
try {
isFullScreen = Boolean.parseBoolean(param);
} catch (Exception e) {
Log.d("jsLog", "bmNavigator statusBarHidden() param is not Boolean --> " + param);
}
Context context = mWXSDKInstance.getContext();
if (context instanceof AbstractWeexActivity) {
BMWXApplication.getWXApplication().IS_FULL_SCREEN = isFullScreen;
((AbstractWeexActivity) context).statusBarHidden(isFullScreen);
}
}
Aggregations