-
- private class guidePagerAdapter extends FragmentPagerAdapter {
- private guidePagerAdapter(FragmentManager fm) {
- super(fm);
- }
-
- @Override
- // Get the count of the number of tabs.
- public int getCount() {
- return 9;
- }
-
- @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.overview);
-
- case 1:
- return getString(R.string.javascript);
-
- case 2:
- return getString(R.string.local_storage);
-
- case 3:
- return getString(R.string.user_agent);
-
- case 4:
- return getString(R.string.domain_settings);
-
- case 5:
- return getString(R.string.ssl_certificates);
-
- case 6:
- return getString(R.string.tor);
-
- case 7:
- return getString(R.string.tracking_ids);
-
- case 8:
- return getString(R.string.bookmarks);
-
- default:
- return "";
- }
- }
-
- @Override
- // Setup each tab.
- public Fragment getItem(int tab) {
- return GuideTabFragment.createTab(tab);
- }
- }