Search in sources :

Example 1 with TabItem

use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.

the class CommentPagerFragment method generateTabs.

@Override
protected ArrayList<TabItem> generateTabs() {
    ArrayList<TabItem> items = new ArrayList<>();
    items.add(new TabItem("1", getString(R.string.cmts_to_me)));
    items.add(new TabItem("2", getString(R.string.cmts_by_me)));
    return items;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 2 with TabItem

use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.

the class MentionPagerFragment method generateTabs.

@Override
protected ArrayList<TabItem> generateTabs() {
    ArrayList<TabItem> items = new ArrayList<>();
    items.add(new TabItem("1", getString(R.string.mention_status)));
    items.add(new TabItem("2", getString(R.string.mention_cmt)));
    return items;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 3 with TabItem

use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.

the class FriendshipPagerFragment method generateTabs.

@Override
protected ArrayList<TabItem> generateTabs() {
    ArrayList<TabItem> beans = new ArrayList<TabItem>();
    beans.add(new TabItem("300", String.format(getString(R.string.friends_format), AisenUtils.getCounter(mUser.getFriends_count()))));
    beans.add(new TabItem("301", String.format(getString(R.string.followers_format), AisenUtils.getCounter(mUser.getFollowers_count()))));
    // 是当前授权用户时,显示互粉
    if (mUser.getIdstr().equals(AppContext.getAccount().getUser().getIdstr()))
        beans.add(new TabItem("302", String.format(getString(R.string.bilateral_format), AisenUtils.getCounter(mUser.getBi_followers_count()))));
    return beans;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 4 with TabItem

use of org.aisen.android.support.bean.TabItem in project AisenWeiBo by wangdan.

the class SettingsPagerFragment method generateTabs.

@Override
protected ArrayList<TabItem> generateTabs() {
    ArrayList<TabItem> items = new ArrayList<TabItem>();
    String[] itemArr = getResources().getStringArray(R.array.settingsPager);
    int index = 1;
    for (String item : itemArr) {
        TabItem bean = new TabItem();
        bean.setTitle(item);
        bean.setType(String.valueOf(index++));
        items.add(bean);
    }
    return items;
}
Also used : TabItem(org.aisen.android.support.bean.TabItem) ArrayList(java.util.ArrayList)

Example 5 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