]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/AboutTabFragment.java
German translation by Aaron Gerlach <aaron@gerlach.com>.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / AboutTabFragment.java
index eda3e30a4dbffb5ac42ce139b271716971e054d1..ab29dd0ddfd23742a61ddf52a5249ca1fd0090cb 100644 (file)
@@ -35,13 +35,14 @@ public class AboutTabFragment extends Fragment {
     public static AboutTabFragment createTab(int tab) {
         Bundle thisTabArguments = new Bundle();
         thisTabArguments.putInt("Tab", tab);
+
         AboutTabFragment thisTab = new AboutTabFragment();
         thisTab.setArguments(thisTabArguments);
         return thisTab;
     }
 
     @Override
-    public void onCreate (Bundle savedInstanceState) {
+    public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         // Store the tab number in tabNumber.
@@ -52,7 +53,7 @@ public class AboutTabFragment extends Fragment {
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         View tabLayout;
 
-        // Load the about tab layout.
+        // Load the about tab layout.  Tab numbers start at 0.
         if (tabNumber == 0) {
             // Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.
             // The fragment will take care of attaching the root automatically.
@@ -130,7 +131,7 @@ public class AboutTabFragment extends Fragment {
             // Select the substring that begins after "Chrome/" and goes until the next " ".
             String chromeVersion = userAgentString.substring(userAgentString.indexOf("Chrome/") + 7, userAgentString.indexOf(" ", userAgentString.indexOf("Chrome/")));
             versionChromeText.setText(chromeVersion);
-        } else { // load a WebView for all the other tabs.
+        } else { // load a WebView for all the other tabs.  Tab numbers start at 0.
             // Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.
             // The fragment will take care of attaching the root automatically.
             tabLayout = inflater.inflate(R.layout.about_tab_webview, container, false);
@@ -138,19 +139,27 @@ public class AboutTabFragment extends Fragment {
 
             switch (tabNumber) {
                 case 1:
-                    tabWebView.loadUrl("file:///android_asset/about_permissions.html");
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_permissions.html");
                     break;
 
                 case 2:
-                    tabWebView.loadUrl("file:///android_asset/about_changelog.html");
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_privacy_policy.html");
                     break;
 
                 case 3:
-                    tabWebView.loadUrl("file:///android_asset/about_license.html");
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_changelog.html");
                     break;
 
                 case 4:
-                    tabWebView.loadUrl("file:///android_asset/about_contributors.html");
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_licenses.html");
+                    break;
+
+                case 5:
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_contributors.html");
+                    break;
+
+                case 6:
+                    tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/about_links.html");
                     break;
 
                 default: