use of com.benmu.widget.view.BaseToolBar in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setCenterItem.
public static void setCenterItem(String params, final JSCallback jscallback) {
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
NavigatorBarModel navigatorBarModel = parseManager.parseObject(params, NavigatorBarModel.class);
BaseToolBar navigationBar = getToolBar();
if (navigationBar == null)
return;
setTextView(navigationBar.getTitleTextView(), navigatorBarModel);
if (jscallback != null)
navigationBar.setOnTitleListenner(new BaseToolBar.OnTitleClick() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(new BaseResultBean());
}
});
}
use of com.benmu.widget.view.BaseToolBar in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setRightItem.
public static void setRightItem(String params, final JSCallback jscallback) {
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
NavigatorBarModel navigatorBarModel = parseManager.parseObject(params, NavigatorBarModel.class);
BaseToolBar navigationBar = getToolBar();
if (navigationBar == null)
return;
setTextView(navigationBar.getRightText(), navigatorBarModel);
if (!TextUtils.isEmpty(navigatorBarModel.getImage())) {
setImage(BMWXEnvironment.mApplicationContext, navigatorBarModel.getImage(), navigationBar.getRightIcon());
}
if (jscallback != null) {
navigationBar.setOnRightListenner(new BaseToolBar.OnRightIconClick() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(new BaseResultBean());
}
});
}
}
use of com.benmu.widget.view.BaseToolBar in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setNavigationInfo.
public static void setNavigationInfo(String params, final JSCallback jscallback) {
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
NavigatorBarModel navigatorBarModel = parseManager.parseObject(params, NavigatorBarModel.class);
BaseToolBar navigationBar = getToolBar();
if (navigationBar == null)
return;
navigationBar.setVisibility(navigatorBarModel.isNavShow() ? View.VISIBLE : View.GONE);
if (navigationBar.getVisibility() == View.GONE)
return;
if (jscallback != null)
navigationBar.setOnTitleListenner(new BaseToolBar.OnTitleClick() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(new BaseResultBean());
}
});
}
use of com.benmu.widget.view.BaseToolBar in project WeexErosFramework by bmfe.
the class DefaultNavigationAdapter method setLeftItem.
public static void setLeftItem(String params, final JSCallback jscallback) {
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
NavigatorBarModel navigatorBarModel = parseManager.parseObject(params, NavigatorBarModel.class);
BaseToolBar navigationBar = getToolBar();
if (navigationBar == null)
return;
setTextView(navigationBar.getLeftTextView(), navigatorBarModel);
if (!TextUtils.isEmpty(navigatorBarModel.getImage())) {
setImage(BMWXEnvironment.mApplicationContext, navigatorBarModel.getImage(), navigationBar.getLeftIcon());
}
if (jscallback != null) {
navigationBar.setOnWebClosedListenner(new BaseToolBar.OnWebViewClosed() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(new BaseResultBean());
}
});
navigationBar.setOnLeftListenner(new BaseToolBar.OnLeftIconClick() {
@Override
public void onClick(View v) {
jscallback.invokeAndKeepAlive(null);
}
});
}
}
Aggregations