Add a 25% font zoom. Implements https://redmine.stoutner.com/issues/120.
authorSoren Stoutner <soren@stoutner.com>
Thu, 20 Apr 2017 20:35:02 +0000 (13:35 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 20 Apr 2017 20:35:02 +0000 (13:35 -0700)
app/src/main/assets/es/guide_overview.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/res/menu/webview_options_menu.xml
app/src/main/res/values-de/strings.xml
app/src/main/res/values-es/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values/strings.xml

index dacfd63..85858d0 100644 (file)
@@ -47,6 +47,6 @@
         <p>Navegador Privado usa el WebView que incorpora Android para interpretar los sitios web.
             Existen algunas limitaciones en los controles que WebView expone para administrar la configuraci&oacute;n de privacidad.
             Por ejemplo, no es posible habilitar algunos comandos JavaScript mientras que se deshabilitan otros.
-            En el futuro, Navegador Privado cambiar&aacute; a un WebView personalizado llamado <a href="https://www.stoutner.com/february-2017-roadmap/">Webview Privado</a>.</p>
+            En el futuro, Navegador Privado cambiar&aacute; a un WebView personalizado llamado <a href="https://www.stoutner.com/february-2017-roadmap/">WebView Privado</a>.</p>
     </body>
 </html>
\ No newline at end of file
index 60ff281..0e6832f 100644 (file)
@@ -987,6 +987,11 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
 
         // Prepare the font size title and current size menu item.
         switch (fontSize) {
+            case 25:
+                fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.twenty_five_percent);
+                selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeTwentyFivePercent);
+                break;
+
             case 50:
                 fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.fifty_percent);
                 selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeFiftyPercent);
@@ -1191,6 +1196,10 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
                 Snackbar.make(findViewById(R.id.main_webview), R.string.form_data_deleted, Snackbar.LENGTH_SHORT).show();
                 return true;
 
+            case R.id.fontSizeTwentyFivePercent:
+                mainWebView.getSettings().setTextZoom(25);
+                return true;
+
             case R.id.fontSizeFiftyPercent:
                 mainWebView.getSettings().setTextZoom(50);
                 return true;
index fbdca4d..c134851 100644 (file)
 
         <menu>
             <group android:checkableBehavior="single">
+                <item
+                    android:id="@+id/fontSizeTwentyFivePercent"
+                    android:title="@string/twenty_five_percent"
+                    android:orderInCategory="91"
+                    app:showAsAction="never" />
+
                 <item
                     android:id="@+id/fontSizeFiftyPercent"
                     android:title="@string/fifty_percent"
-                    android:orderInCategory="91"
+                    android:orderInCategory="92"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeSeventyFivePercent"
                     android:title="@string/seventy_five_percent"
-                    android:orderInCategory="92"
+                    android:orderInCategory="93"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeOneHundredPercent"
                     android:title="@string/one_hundred_percent"
-                    android:orderInCategory="93"
+                    android:orderInCategory="94"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeOneHundredTwentyFivePercent"
                     android:title="@string/one_hundred_twenty_five_percent"
-                    android:orderInCategory="94"
+                    android:orderInCategory="95"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeOneHundredFiftyPercent"
                     android:title="@string/one_hundred_fifty_percent"
-                    android:orderInCategory="95"
+                    android:orderInCategory="96"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeOneHundredSeventyFivePercent"
                     android:title="@string/one_hundred_seventy_five_percent"
-                    android:orderInCategory="96"
+                    android:orderInCategory="97"
                     app:showAsAction="never" />
 
                 <item
                     android:id="@+id/fontSizeTwoHundredPercent"
                     android:title="@string/two_hundred_percent"
-                    android:orderInCategory="97"
+                    android:orderInCategory="98"
                     app:showAsAction="never" />
             </group>
         </menu>
index 38addd3..d43de58 100644 (file)
     <string name="clear_cookies">Cookies leeren</string>
     <string name="clear_dom_storage">DOM-Speicher leeren</string>
     <string name="clear_form_data">Formulardaten leeren</string>
-        <string name="font_size">Schriftgröße</string>
+    <string name="font_size">Schriftgröße</string>
+        <string name="twenty_five_percent">25%</string>
         <string name="fifty_percent">50%</string>
         <string name="seventy_five_percent">75%</string>
         <string name="one_hundred_percent">100%</string>
         <string name="homepage">Startseite</string>
         <string name="default_font_size">Standard-Schriftgröße</string>
         <string-array name="default_font_size_entries">
+            <item>25%</item>
             <item>50%</item>
             <item>75%</item>
             <item>100%</item>
index 03bee80..995706d 100644 (file)
     <string name="clear_dom_storage">Eliminar almacenamiento DOM</string>
     <string name="clear_form_data">Borrar datos de formulario</string>
     <string name="font_size">Tamaño de fuente</string>
+        <string name="twenty_five_percent">25%</string>
         <string name="fifty_percent">50%</string>
         <string name="seventy_five_percent">75%</string>
         <string name="one_hundred_percent">100%</string>
         <string name="homepage">Página de inicio</string>
         <string name="default_font_size">Tamaño de fuente por defecto</string>
         <string-array name="default_font_size_entries">
+            <item>25%</item>
             <item>50%</item>
             <item>75%</item>
             <item>100%</item>
index fb934a5..46b25df 100644 (file)
     <string name="clear_dom_storage">Elimina DOM Storage</string>
     <string name="clear_form_data">Elimina dati dei moduli</string>
     <string name="font_size">Dimensione Font</string>
+        <string name="twenty_five_percent">25%</string>
         <string name="fifty_percent">50%</string>
         <string name="seventy_five_percent">75%</string>
         <string name="one_hundred_percent">100%</string>
         <string name="homepage">Homepage</string>
         <string name="default_font_size">Dimensione standard carattere</string>
         <string-array name="default_font_size_entries">
+            <item>25%</item>
             <item>50%</item>
             <item>75%</item>
             <item>100%</item>
index 0f4d64b..0366367 100644 (file)
     <string name="clear_dom_storage">Clear DOM Storage</string>
     <string name="clear_form_data">Clear Form Data</string>
     <string name="font_size">Font Size</string>
+        <string name="twenty_five_percent">25%</string>
         <string name="fifty_percent">50%</string>
         <string name="seventy_five_percent">75%</string>
         <string name="one_hundred_percent">100%</string>
         <string name="homepage">Homepage</string>
         <string name="default_font_size">Default font size</string>
         <string-array name="default_font_size_entries">
+            <item>25%</item>
             <item>50%</item>
             <item>75%</item>
             <item>100%</item>
             <item>200%</item>
         </string-array>
         <string-array name="default_font_size_entry_values" translatable="false">  <!-- None of the items in this `string-array` should be translated. -->
+            <item>25</item>
             <item>50</item>
             <item>75</item>
             <item>100</item>