-
- private class aboutPagerAdapter extends FragmentPagerAdapter {
- private aboutPagerAdapter(FragmentManager fragmentManager) {
- // Run the default commands.
- super(fragmentManager);
- }
-
- @Override
- // Get the count of the number of tabs.
- public int getCount() {
- return 7;
- }
-
- @Override
- // Get the name of each tab. Tab numbers start at 0.
- public CharSequence getPageTitle(int tab) {
- switch (tab) {
- case 0:
- return getString(R.string.version);
-
- case 1:
- return getString(R.string.permissions);
-
- case 2:
- return getString(R.string.privacy_policy);
-
- case 3:
- return getString(R.string.changelog);
-
- case 4:
- return getString(R.string.licenses);
-
- case 5:
- return getString(R.string.contributors);
-
- case 6:
- return getString(R.string.links);
-
- default:
- return "";
- }
- }
-
- @Override
- // Setup each tab.
- public Fragment getItem(int tab) {
- return AboutTabFragment.createTab(tab);
- }
- }
-}