From: Soren Stoutner Date: Thu, 22 Oct 2015 22:59:10 +0000 (-0700) Subject: Remove the "Go" button. X-Git-Tag: v1.0~42 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=9c85c8a1c93128c2727eb63f5cccf463c9067f90;p=PrivacyBrowserAndroid.git Remove the "Go" button. --- diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fb445db0..02deefac 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,8 +11,8 @@ android:label="@string/privacy_browser" android:theme="@style/AppTheme" > - // configChanges orientation and screenSize makes the app not reload when the orientation changes. - // windowSoftInputMode stateAlwaysHidden hides the keyboard when the app starts. + + - // android.intent.action.VIEW with the schemes enables processing of web intents. + diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index a783262c..09ab722b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -154,7 +154,6 @@ public class Webview extends AppCompatActivity { @Override public boolean onOptionsItemSelected(MenuItem menuItem) { int menuItemId = menuItem.getItemId(); - final WebView mainWebView = (WebView) findViewById(R.id.mainWebView); // Sets the commands that relate to the menu entries. switch (menuItemId) { @@ -163,6 +162,7 @@ public class Webview extends AppCompatActivity { urlTextBox.setText(formattedUrlString); mainWebView.loadUrl(formattedUrlString); break; + case R.id.back: mainWebView.goBack(); @@ -170,6 +170,7 @@ public class Webview extends AppCompatActivity { formattedUrlString = mainWebView.getOriginalUrl(); urlTextBox.setText(formattedUrlString); break; + case R.id.forward: mainWebView.goForward(); diff --git a/app/src/main/res/layout/activity_webview.xml b/app/src/main/res/layout/activity_webview.xml index 4eb9901b..6e22c007 100644 --- a/app/src/main/res/layout/activity_webview.xml +++ b/app/src/main/res/layout/activity_webview.xml @@ -3,7 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> - // SwipeRefreshLayout allows the user to swipe down to refresh. + - // FrameLayout lets the ProgressBar float on top of the LinearLayout. + - + + android:inputType="textUri" + android:imeOptions="actionGo" /> - // android:inputType="textUri" sets the keyboard to have a go arrow. - - -