use of com.eros.framework.model.NatigatorModel in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setNavigationInfo.
public static void setNavigationInfo(String params, final JSCallback jscallback) {
BaseToolBar navigationBar;
if (TextUtils.isEmpty(params)) {
navigationBar = getToolBar();
if (navigationBar == null)
return;
navigationBar.setVisibility(View.GONE);
return;
}
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
// NavigatorBarModel navigatorBarModel = parseManager.parseObject(params, NavigatorBarModel
// .class);
NatigatorModel navigatorModel = parseManager.parseObject(params, NatigatorModel.class);
navigationBar = getToolBar();
if (navigationBar == null)
return;
navigationBar.setVisibility(navigatorModel.isNavShow() ? View.VISIBLE : View.GONE);
if (navigationBar.getVisibility() == View.GONE)
return;
navigationBar.getTitleTextView().setText(navigatorModel.getTitle());
if (navigatorModel.getStatusBarStyle() == null || "".equals(navigatorModel.getStatusBarStyle()) || "Default".equals(navigatorModel.getStatusBarStyle())) {
navigationBar.getTitleTextView().setTextColor(ColorUtils.getColor("#000000"));
} else {
navigationBar.getTitleTextView().setTextColor(ColorUtils.getColor("#ffffff"));
}
if (jscallback != null)
navigationBar.setOnTitleListenner(new BaseToolBar.OnTitleClick() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(new BaseResultBean());
}
});
}
use of com.eros.framework.model.NatigatorModel 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.model.NatigatorModel in project WeexErosFramework by bmfe.
the class TableView method getNavStr.
private String getNavStr(PlatformConfigBean.TabItem item) {
NatigatorModel model = new NatigatorModel();
model.setNavShow(item.isNavShow());
model.setTitle(item.getNavTitle());
return JSON.toJSONString(model);
}
Aggregations