use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.
the class TimelineFavoritesFragment method launch.
public static void launch(Activity from) {
TabItem bean = new TabItem();
bean.setTag("7");
bean.setTitle(GlobalContext.getInstance().getResources().getString(R.string.draw_fav_title));
bean.setType("7");
FragmentArgs args = new FragmentArgs();
args.add("bean", bean);
args.add("launch", true);
SinaCommonActivity.launch(from, TimelineFavoritesFragment.class, args);
}
use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.
the class NotificationPagerFragment method generateTabs.
@Override
protected ArrayList<TabItem> generateTabs() {
ArrayList<TabItem> items = new ArrayList<>();
// 收到的评论
if (AppContext.getAccount().getUnreadCount().getCmt() > 0) {
items.add(new TabItem("1", String.format(getString(R.string.notification_cmt_format), AppContext.getAccount().getUnreadCount().getCmt())));
} else {
items.add(new TabItem("1", getString(R.string.notification_cmt)));
}
// 提及我的微博
if (AppContext.getAccount().getUnreadCount().getMention_status() > 0) {
items.add(new TabItem("3", String.format(getString(R.string.notification_mention_status_format), AppContext.getAccount().getUnreadCount().getMention_status())));
} else {
items.add(new TabItem("3", getString(R.string.notification_mention_status)));
}
// 提及我的微博
if (AppContext.getAccount().getUnreadCount().getMention_cmt() > 0) {
items.add(new TabItem("2", String.format(getString(R.string.notification_mention_cmt_format), AppContext.getAccount().getUnreadCount().getMention_cmt())));
} else {
items.add(new TabItem("2", getString(R.string.notification_mention_cmt)));
}
items.add(new TabItem("4", getString(R.string.notification_cmt_sendbyme)));
return items;
}
use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.
the class ProfilePagerFragment method generateTabs.
@Override
protected ArrayList<TabItem> generateTabs() {
ArrayList<TabItem> tabItems = new ArrayList<>();
tabItems.add(new TabItem("1", getString(R.string.profile_tab1)));
tabItems.add(new TabItem("2", String.format("%s(%s)", getString(R.string.profile_tab2), AisenUtils.getCounter(mUser.getStatuses_count()))));
tabItems.add(new TabItem("3", getString(R.string.profile_tab3)));
if (mUser.getIdstr().equalsIgnoreCase(AppContext.getAccount().getUser().getIdstr())) {
tabItems.add(new TabItem("4", getString(R.string.profile_tab4)));
}
return tabItems;
}
use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.
the class JokesPagerFragment method generateTabs.
@Override
protected ArrayList<TabItem> generateTabs() {
ArrayList<TabItem> items = new ArrayList<>();
// 纯文
items.add(new TabItem("0", getString(R.string.jokes_text)));
// 图文
items.add(new TabItem("1", getString(R.string.jokes_image)));
return items;
}
Aggregations