【发布时间】:2015-07-11 11:57:02
【问题描述】:
我需要在标签中显示通知的数量。我如何在android中做到这一点。我的标签代码如下所示。
mTabHost = (FragmentTabHost)rootView.findViewById(android.R.id.tabhost);
mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
mTabHost.addTab(mTabHost.newTabSpec("HOME").setIndicator("HOME"),
homepage.class, null);
mTabHost.addTab(mTabHost.newTabSpec("NOTIFICATIONS").setIndicator("NOTIFICATIONS"),
notificationfragment.class, null);
return rootView;
【问题讨论】:
标签: android android-layout android-fragments android-activity