]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/adapters/GuidePagerAdapter.java
Combine the light and dark Guide and About pages. https://redmine.stoutner.com/issue...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / adapters / GuidePagerAdapter.java
index 59ad9f31d0860f3f2c76bb8363d3a1cc5a282589..fc89cefd76d88d2b6025edf1fa05921679ff705a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -27,24 +27,25 @@ import androidx.fragment.app.FragmentManager;
 import androidx.fragment.app.FragmentPagerAdapter;
 
 import com.stoutner.privacybrowser.R;
-import com.stoutner.privacybrowser.fragments.GuideTabFragment;
+import com.stoutner.privacybrowser.fragments.GuideWebViewFragment;
 
 public class GuidePagerAdapter extends FragmentPagerAdapter {
-    // Define the class context variable.
-    private Context context;
+    // Define the class variables.
+    private final Context context;
 
+    // The default constructor.
     public GuidePagerAdapter(FragmentManager fragmentManager, Context context) {
         // Run the default commands.
         super(fragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
 
-        // Store the context in a class variable.
+        // Store the class variables.
         this.context = context;
     }
 
     @Override
     // Get the count of the number of tabs.
     public int getCount() {
-        return 10;
+        return 9;
     }
 
     @Override
@@ -78,9 +79,6 @@ public class GuidePagerAdapter extends FragmentPagerAdapter {
             case 8:
                 return context.getString(R.string.tracking_ids);
 
-            case 9:
-                return context.getString(R.string.bookmarks);
-
             default:
                 return "";
         }
@@ -90,6 +88,6 @@ public class GuidePagerAdapter extends FragmentPagerAdapter {
     @NonNull
     // Setup each tab.
     public Fragment getItem(int tabNumber) {
-        return GuideTabFragment.createTab(tabNumber);
+        return GuideWebViewFragment.createTab(tabNumber);
     }
 }
\ No newline at end of file