From: Soren Stoutner Date: Fri, 27 Sep 2024 22:22:47 +0000 (-0700) Subject: Colorize the status bar on proxy change. https://redmine.stoutner.com/issues/1169 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=17032aa3bf7d84942436b254cf5ebffc2b41ce46;p=PrivacyBrowserAndroid.git Colorize the status bar on proxy change. https://redmine.stoutner.com/issues/1169 --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt index 45731697..2f9b09e4 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt @@ -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. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 9ea9f5a1..d9940aa6 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -179,6 +179,7 @@ Abrir imagen en nueva pestaña Compartir imagen Copiar URL + Copiar Texto Correo electrónico Copiar correo electrónico Escribir correo electrónico diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index a26b4301..12bc57e2 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -179,6 +179,7 @@ Ouvrir l\'image dans un nouvel onglet Partager l\'image Copier l\'URL + Copier le texte Addresse e-mail Copier l\'adresse e-mail Ecrire un e-mail diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3d509991..b573c6bf 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -179,6 +179,7 @@ Apri l\'immagine in una nuova scheda Condividi Immagine Copia URL + Copia Testo Indirizzo Email Copia Indirizzo Email Scrivi Email diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 59ef4304..ab040d02 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -176,6 +176,7 @@ Открыть изображение в новой вкладке Поделиться изображением Копировать URL + Скопировать текст Адрес email Копировать адрес email Написать email