X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FWebview.java;h=2760e346e5458f1748fcb16e85144b53a782274c;hb=81b0701dff52095ddc9ab64d39d15438a9eeb408;hp=9c51b446d8d7c88df530bc03ef4029c034a47464;hpb=b72fd06c1e378ca01c1cccd83ed0c7ae5297b8f4;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index 9c51b446..2760e346 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -1,3 +1,22 @@ +/** + * Copyright 2015 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; import android.annotation.SuppressLint; @@ -96,9 +115,11 @@ public class Webview extends AppCompatActivity implements CreateHomeScreenShortc return true; } + /* These errors do not provide any useful information and clutter the screen. public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) { - Toast.makeText(mainWebViewActivity, "Error loading " + request + " Error: " + error, Toast.LENGTH_LONG).show(); + Toast.makeText(mainWebViewActivity, "Error loading " + request + " Error: " + error, Toast.LENGTH_SHORT).show(); } + */ // Update the URL in urlTextBox when the page starts to load. @Override @@ -329,6 +350,13 @@ public class Webview extends AppCompatActivity implements CreateHomeScreenShortc startActivity(downloadManangerIntent); break; + + case R.id.about: + // Show the AboutDialog AlertDialog and name this instance aboutDialog. + AppCompatDialogFragment aboutDialog = new AboutDialog(); + aboutDialog.show(getSupportFragmentManager(), "aboutDialog"); + + break; } return super.onOptionsItemSelected(menuItem);