use of com.eros.framework.activity.MainActivity in project WeexErosFramework by bmfe.
the class TabbarEvent method showBadge.
private void showBadge(WeexEventBean weexEventBean) {
Context context = weexEventBean.getContext();
ParseManager parseManager = ManagerFactory.getManagerService(ParseManager.class);
TabbarBadgeModule module = parseManager.parseObject(weexEventBean.getJsParams(), TabbarBadgeModule.class);
if (context instanceof MainActivity) {
((MainActivity) context).setBadge(module);
}
}
use of com.eros.framework.activity.MainActivity in project WeexErosFramework by bmfe.
the class TabbarEvent method hideBadge.
private void hideBadge(WeexEventBean weexEventBean) {
Context context = weexEventBean.getContext();
String index = JSON.parseObject(weexEventBean.getJsParams()).get("index").toString();
if (context instanceof MainActivity) {
((MainActivity) context).hideBadge(Integer.parseInt(index));
}
}
use of com.eros.framework.activity.MainActivity in project WeexErosFramework by bmfe.
the class TabbarEvent method openPage.
private void openPage(WeexEventBean weexEventBean) {
Context context = weexEventBean.getContext();
String index = JSON.parseObject(weexEventBean.getJsParams()).get("index").toString();
RouterTracker.clearActivitySurplus(1);
Activity activity = RouterTracker.peekActivity();
if (activity instanceof MainActivity) {
((MainActivity) activity).openPage(Integer.parseInt(index));
}
}
Aggregations