Search in sources :

Example 6 with TabItem

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);
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) FragmentArgs(org.aisen.android.ui.activity.container.FragmentArgs)

Example 7 with TabItem

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;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 8 with TabItem

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;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 9 with TabItem

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;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Aggregations

TabItem (org.aisen.android.support.bean.TabItem)9 ArrayList (java.util.ArrayList)7 Bundle (android.os.Bundle)1 FragmentArgs (org.aisen.android.ui.activity.container.FragmentArgs)1