Back to project page whoisit-android.
The source code is released under:
MIT License
If you think the Android project whoisit-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mitchbarry.android.whoisit.ui; //from w ww . j av a 2s .c om import android.content.res.Resources; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import com.mitchbarry.android.whoisit.R; /** * Pager adapter */ public class BootstrapPagerAdapter extends FragmentPagerAdapter { private final Resources resources; /** * Create pager adapter * * @param resources * @param fragmentManager */ public BootstrapPagerAdapter(Resources resources, FragmentManager fragmentManager) { super(fragmentManager); this.resources = resources; } @Override public int getCount() { return 1; } @Override public Fragment getItem(int position) { Bundle bundle = new Bundle(); switch (position) { case 0: PhoneGroupListFragment groupListFragment = new PhoneGroupListFragment(); groupListFragment.setArguments(bundle); return groupListFragment; default: return null; } } @Override public CharSequence getPageTitle(int position) { switch (position) { case 0: return resources.getString(R.string.page_phone_groups); default: return null; } } }