From 1f1fca70679a8bcf4b717fcca5dbf9e32cc56db5 Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 21 Mar 2017 12:19:20 -0700 Subject: [PATCH] Reorder the options menu. Implements https://redmine.stoutner.com/issues/105. --- app/src/main/assets/en/about_changelog.html | 6 ++-- app/src/main/assets/es/about_changelog.html | 8 ++--- .../activities/MainWebViewActivity.java | 32 +++++++++---------- .../main/res/menu/webview_options_menu.xml | 20 ++++++------ 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/src/main/assets/en/about_changelog.html b/app/src/main/assets/en/about_changelog.html index 108a9076..96da1683 100644 --- a/app/src/main/assets/en/about_changelog.html +++ b/app/src/main/assets/en/about_changelog.html @@ -32,9 +32,9 @@
  • Only load domain settings when the domain changes.
  • Only apply domain settings to subdomains if *. is specified at the beginning of the domain name.
  • Reload domain settings when navigating with the back button.
  • -
  • Autopopulate the bookmark and create shorcut dialogues.
  • +
  • Autopopulate the create bookmark and create shortcut dialogs.
  • Updated Italian translation provided by Francesco Buratti.
  • -
  • Updated Spanish translation provided by Jose A. León Becerra.
  • +
  • Updated Spanish translation provided by Jose A. León Becerra.
  • 2.0 (version code 19)

    @@ -44,7 +44,7 @@
  • When proxying through Tor, wait until Orbot is ready before attempting to load a page.
  • Use .onion search engines when proxying through Tor.
  • Updated Italian translation provided by Francesco Buratti.
  • -
  • Updated Spanish translation provided by Jose A. León Becerra.
  • +
  • Updated Spanish translation provided by Jose A. León Becerra.
  • 1.15 (version code 18)

    diff --git a/app/src/main/assets/es/about_changelog.html b/app/src/main/assets/es/about_changelog.html index 7a648172..ef3b4663 100644 --- a/app/src/main/assets/es/about_changelog.html +++ b/app/src/main/assets/es/about_changelog.html @@ -34,9 +34,9 @@
  • Sólo cargar la configuración del dominio cuando el dominio cambie.
  • Sólo aplicar la configuración de dominio a subdominios si *. se especifica al principio del nombre de dominio.
  • Recargar la configuración de dominio cuando se navega con el botón de retroceso.
  • -
  • Autocompletar los diálogos del marcador y crear acceso directo.
  • +
  • Autorellenar las ventanas de crear marcador y de crear acceso directo.
  • +
  • Traducción al español actualizada proporcionada por Jose A. León Becerra.
  • Traducción al italiano actualizada proporcionada por Francesco Buratti.
  • -
  • Traducción al español actualizada proporcionada porJose A. León Becerra.
  • 2.0 (código de versión 19)

    @@ -45,8 +45,8 @@
  • Implementar configuración de dominio personalizado.
  • Cuando se usa proxy a través de Tor, esperar hasta que Orbot esté listo antes de intentar cargar una página.
  • Usar motores de búsqueda .onion cuando se usa proxy a través de Tor.
  • +
  • Traducción al español actualizada proporcionada por Jose A. León Becerra.
  • Traducción al italiano actualizada proporcionada por Francesco Buratti.
  • -
  • Traducción al español actualizada proporcionada porJose A. León Becerra.
  • 1.15 (código de versión 18)

    @@ -57,8 +57,8 @@
  • Localizar las fechas en los cuadros de diálogo del certificado SSL.
  • Habilitar la descarga de archivos de páginas web que requieren un inicio de sesión. Código aportado por Hendrik Knackstedt.
  • Solucionar un error al intentar descargar un archivo que no tiene un URI HTTP o HTTPS.
  • +
  • Traducción al español actualizada proporcionada por Jose A. León Becerra.
  • Traducción al italiano inicial proporcionada por Francesco Buratti.
  • -
  • Traducción al español actualizada proporcionada por <Jose A. León Becerra.
  • 1.14.1 (código de versión 17)

    diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index e06531c6..2b8009f0 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -1152,6 +1152,14 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation mainWebView.getSettings().setTextZoom(200); return true; + case R.id.share: + Intent shareIntent = new Intent(); + shareIntent.setAction(Intent.ACTION_SEND); + shareIntent.putExtra(Intent.EXTRA_TEXT, urlTextBox.getText().toString()); + shareIntent.setType("text/plain"); + startActivity(Intent.createChooser(shareIntent, "Share URL")); + return true; + case R.id.find_on_page: // Hide the URL app bar. supportAppBar.setVisibility(View.GONE); @@ -1175,20 +1183,8 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation }, 200); return true; - case R.id.share: - Intent shareIntent = new Intent(); - shareIntent.setAction(Intent.ACTION_SEND); - shareIntent.putExtra(Intent.EXTRA_TEXT, urlTextBox.getText().toString()); - shareIntent.setType("text/plain"); - startActivity(Intent.createChooser(shareIntent, "Share URL")); - return true; - - case R.id.addToHomescreen: - // Show the `CreateHomeScreenShortcutDialog` `AlertDialog` and name this instance `R.string.create_shortcut`. - AppCompatDialogFragment createHomeScreenShortcutDialogFragment = new CreateHomeScreenShortcutDialog(); - createHomeScreenShortcutDialogFragment.show(getSupportFragmentManager(), getResources().getString(R.string.create_shortcut)); - - //Everything else will be handled by `CreateHomeScreenShortcutDialog` and the associated listener below. + case R.id.refresh: + mainWebView.reload(); return true; case R.id.print: @@ -1202,8 +1198,12 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation printManager.print(getResources().getString(R.string.privacy_browser_web_page), printDocumentAdapter, null); return true; - case R.id.refresh: - mainWebView.reload(); + case R.id.addToHomescreen: + // Show the `CreateHomeScreenShortcutDialog` `AlertDialog` and name this instance `R.string.create_shortcut`. + AppCompatDialogFragment createHomeScreenShortcutDialogFragment = new CreateHomeScreenShortcutDialog(); + createHomeScreenShortcutDialogFragment.show(getSupportFragmentManager(), getResources().getString(R.string.create_shortcut)); + + //Everything else will be handled by `CreateHomeScreenShortcutDialog` and the associated listener below. return true; default: diff --git a/app/src/main/res/menu/webview_options_menu.xml b/app/src/main/res/menu/webview_options_menu.xml index 8f0df746..fbdca4d2 100644 --- a/app/src/main/res/menu/webview_options_menu.xml +++ b/app/src/main/res/menu/webview_options_menu.xml @@ -130,20 +130,20 @@ + app:showAsAction="never" /> + app:showAsAction="never|collapseActionView" /> @@ -154,8 +154,8 @@ app:showAsAction="never" /> -- 2.43.0