X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Ffragments%2FGuideTab.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Ffragments%2FGuideTab.java;h=0000000000000000000000000000000000000000;hb=61a76e491469916f2f30aebb47b98cda7cceb557;hp=8857aca4ef9880140679c92dcbf13152bf04ae4c;hpb=348acd7bd2c9ba9638ff87b34df4e7501214ca27;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/GuideTab.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/GuideTab.java deleted file mode 100644 index 8857aca4..00000000 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/GuideTab.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright 2016 Soren Stoutner . - * - * This file is part of Privacy Browser . - * - * Privacy Browser is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Privacy Browser is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Privacy Browser. If not, see . - */ - -package com.stoutner.privacybrowser.fragments; - -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.webkit.WebView; - -import com.stoutner.privacybrowser.R; - -public class GuideTab extends Fragment { - private int tabNumber; - - // GuideTab.createTab stores the tab number in the bundle arguments so it can be referenced from onCreate(). - public static GuideTab createTab (int tab) { - Bundle thisTabArguments = new Bundle(); - thisTabArguments.putInt("Tab", tab); - - GuideTab thisTab = new GuideTab(); - thisTab.setArguments(thisTabArguments); - return thisTab; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - // Store the tab number in tabNumber. - tabNumber = getArguments().getInt("Tab"); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - // 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. - View tabLayout = inflater.inflate(R.layout.guide_tab_webview, container, false); - WebView tabWebView = (WebView) tabLayout; - - // Tab numbers start at 0. - switch (tabNumber) { - case 0: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_overview.html"); - break; - - case 1: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_javascript.html"); - break; - - case 2: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_local_storage.html"); - break; - - case 3: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_user_agent.html"); - break; - - case 4: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_tor.html"); - break; - - case 5: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_tracking_ids.html"); - break; - - case 6: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_clear_and_exit.html"); - break; - - case 7: - tabWebView.loadUrl("file:///android_asset/" + getString(R.string.android_asset_path) + "/guide_planned_features.html"); - break; - - default: - break; - } - - return tabLayout; - } -}