]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Colorize the status bar on proxy change. https://redmine.stoutner.com/issues/1169
authorSoren Stoutner <soren@stoutner.com>
Fri, 27 Sep 2024 22:22:47 +0000 (15:22 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 27 Sep 2024 22:22:47 +0000 (15:22 -0700)
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt
app/src/main/res/values-es/strings.xml
app/src/main/res/values-fr/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-ru/strings.xml

index 45731697d13288afa5cc5b278ad769557422d988..2f9b09e4263df03238f83436ac36c64aa4143530 100644 (file)
@@ -3592,13 +3592,15 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                 // Get the color background int from the typed value.
                 val colorBackgroundInt = colorBackgroundTypedValue.data
 
-                // Set the default app bar layout background.
+                // Set the default app bar and status bar backgrounds.
                 appBarLayout.setBackgroundColor(colorBackgroundInt)
+                window.statusBarColor = colorBackgroundInt
             }
 
             ProxyHelper.TOR -> {
-                // Set the app bar background to indicate proxying is enabled.
+                // Set the app bar and status bar backgrounds to indicate proxying is enabled.
                 appBarLayout.setBackgroundResource(R.color.blue_background)
+                window.statusBarColor = getColor(R.color.blue_background)
 
                 // Check to see if Orbot is installed.
                 try {
@@ -3647,8 +3649,9 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
             }
 
             ProxyHelper.I2P -> {
-                // Set the app bar background to indicate proxying is enabled.
+                // Set the app bar and status bar backgrounds to indicate proxying is enabled.
                 appBarLayout.setBackgroundResource(R.color.blue_background)
+                window.statusBarColor = getColor(R.color.blue_background)
 
                 // Check to see if I2P is installed.
                 try {
@@ -3677,9 +3680,11 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                 }
             }
 
-            ProxyHelper.CUSTOM ->
-                // Set the app bar background to indicate proxying is enabled.
+            ProxyHelper.CUSTOM -> {
+                // Set the app bar and status bar backgrounds to indicate proxying is enabled.
                 appBarLayout.setBackgroundResource(R.color.blue_background)
+                window.statusBarColor = getColor(R.color.blue_background)
+            }
         }
 
         // Reload the WebViews if requested and not waiting for the proxy.
index 9ea9f5a14eb9c84ddc03bc697dfbde00495e60d1..d9940aa66aaf454732406167022ba8dfd475e431 100644 (file)
     <string name="open_image_in_new_tab">Abrir imagen en nueva pestaña</string>
     <string name="share_image">Compartir imagen</string>
     <string name="copy_url">Copiar URL</string>
+    <string name="copy_text">Copiar Texto</string>
     <string name="email_address">Correo electrónico</string>
     <string name="copy_email_address">Copiar correo electrónico</string>
     <string name="write_email">Escribir correo electrónico</string>
index a26b43010457cec31ea322681710355627e791b8..12bc57e235c497b000aa4e057c4d51244a6c6e0b 100644 (file)
     <string name="open_image_in_new_tab">Ouvrir l\'image dans un nouvel onglet</string>
     <string name="share_image">Partager l\'image</string>
     <string name="copy_url">Copier l\'URL</string>
+    <string name="copy_text">Copier le texte</string>
     <string name="email_address">Addresse e-mail</string>
     <string name="copy_email_address">Copier l\'adresse e-mail</string>
     <string name="write_email">Ecrire un e-mail</string>
index 3d5099917eeeab62b0042d984275ae26ce84d9f7..b573c6bf769ff02c49bddd5167b8c6584758b15e 100644 (file)
     <string name="open_image_in_new_tab">Apri l\'immagine in una nuova scheda</string>
     <string name="share_image">Condividi Immagine</string>
     <string name="copy_url">Copia URL</string>
+    <string name="copy_text">Copia Testo</string>
     <string name="email_address">Indirizzo Email</string>
     <string name="copy_email_address">Copia Indirizzo Email</string>
     <string name="write_email">Scrivi Email</string>
index 59ef4304bb4d7337c76d5697d66d172e77cb96a0..ab040d02e2b223552b3ed8f2f6bd186c7a6ce9d9 100644 (file)
     <string name="open_image_in_new_tab">Открыть изображение в новой вкладке</string>
     <string name="share_image">Поделиться изображением</string>
     <string name="copy_url">Копировать URL</string>
+    <string name="copy_text">Скопировать текст</string>
     <string name="email_address">Адрес email</string>
     <string name="copy_email_address">Копировать адрес email</string>
     <string name="write_email">Написать email</string>