diff --git a/app/src/main/java/foundation/e/privacycentralapp/common/TextViewHelpers.kt b/app/src/main/java/foundation/e/privacycentralapp/common/TextViewHelpers.kt
new file mode 100644
index 0000000000000000000000000000000000000000..25a36335fc4b925c33ad352991378a9f0da9f58d
--- /dev/null
+++ b/app/src/main/java/foundation/e/privacycentralapp/common/TextViewHelpers.kt
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2022 E FOUNDATION
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package foundation.e.privacycentralapp.common
+
+import android.content.Context
+import android.content.res.ColorStateList
+import android.text.Spannable
+import android.text.SpannableString
+import android.text.style.DynamicDrawableSpan
+import android.text.style.ImageSpan
+import android.widget.TextView
+import androidx.annotation.StringRes
+import androidx.appcompat.content.res.AppCompatResources
+import androidx.appcompat.widget.TooltipCompat
+import foundation.e.privacycentralapp.R
+
+fun setToolTipForAsterisk(
+ textView: TextView,
+ @StringRes textId: Int,
+ @StringRes tooltipTextId: Int
+) {
+ textView.text = asteriskAsInfoIconSpannable(textView.context, textId, textView.textColors)
+ TooltipCompat.setTooltipText(textView, textView.context.getString(tooltipTextId))
+
+ textView.setOnClickListener { it.performLongClick() }
+}
+
+private fun asteriskAsInfoIconSpannable(
+ context: Context,
+ @StringRes textId: Int,
+ tint: ColorStateList
+): Spannable {
+ val spannable = SpannableString(context.getString(textId))
+ val index = spannable.lastIndexOf("*")
+ if (index != -1) {
+ AppCompatResources.getDrawable(context, R.drawable.ic_info_16dp)?.let {
+ it.setTintList(tint)
+ it.setBounds(0, 0, it.intrinsicWidth, it.intrinsicHeight)
+ spannable.setSpan(
+ ImageSpan(it, DynamicDrawableSpan.ALIGN_CENTER),
+ index,
+ index + 1,
+ Spannable.SPAN_INCLUSIVE_INCLUSIVE
+ )
+ }
+ }
+ return spannable
+}
\ No newline at end of file
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
index ff8e78fc5d8cd627c320d15d29d8ce42c9397d04..749fae4014a499494a6946de6da95d1e8e02bf61 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/internetprivacy/InternetPrivacyFragment.kt
@@ -33,10 +33,11 @@ import foundation.e.privacycentralapp.PrivacyCentralApplication
import foundation.e.privacycentralapp.R
import foundation.e.privacycentralapp.common.NavToolbarFragment
import foundation.e.privacycentralapp.common.ToggleAppsAdapter
+import foundation.e.privacycentralapp.common.extensions.toText
import foundation.e.privacycentralapp.common.initQuickPrivacySnackbar
+import foundation.e.privacycentralapp.common.setToolTipForAsterisk
import foundation.e.privacycentralapp.databinding.FragmentInternetActivityPolicyBinding
import foundation.e.privacycentralapp.domain.entities.InternetPrivacyMode
-import foundation.e.privacycentralapp.common.extensions.toText
import kotlinx.coroutines.launch
import java.util.Locale
@@ -82,6 +83,12 @@ class InternetPrivacyFragment : NavToolbarFragment(R.layout.fragment_internet_ac
viewModel.submitAction(InternetPrivacyViewModel.Action.UseHiddenIPAction)
}
+ setToolTipForAsterisk(
+ textView = binding.ipscramblingSelectApps,
+ textId = R.string.ipscrambling_select_app,
+ tooltipTextId = R.string.ipscrambling_app_list_infos
+ )
+
binding.ipscramblingSelectLocation.apply {
adapter = ArrayAdapter(
requireContext(), android.R.layout.simple_spinner_item,
diff --git a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFragment.kt
index 4992230fa518c2f371bbab23cb37a6325243ecf2..491f62517e606403683184a86fb6b27f9b20d279 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFragment.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/features/trackers/TrackersFragment.kt
@@ -36,6 +36,7 @@ import foundation.e.privacycentralapp.common.AppsAdapter
import foundation.e.privacycentralapp.common.GraphHolder
import foundation.e.privacycentralapp.common.NavToolbarFragment
import foundation.e.privacycentralapp.common.initQuickPrivacySnackbar
+import foundation.e.privacycentralapp.common.setToolTipForAsterisk
import foundation.e.privacycentralapp.databinding.FragmentTrackersBinding
import foundation.e.privacycentralapp.databinding.TrackersItemGraphBinding
import foundation.e.privacycentralapp.domain.entities.TrackersPeriodicStatistics
@@ -82,6 +83,12 @@ class TrackersFragment :
viewModel.submitAction(TrackersViewModel.Action.CloseQuickPrivacyDisabledMessage)
}
+ setToolTipForAsterisk(
+ textView = binding.trackersAppsListTitle,
+ textId = R.string.trackers_applist_title,
+ tooltipTextId = R.string.trackers_applist_infos
+ )
+
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
render(viewModel.state.value)
diff --git a/app/src/main/res/drawable/ic_info_16dp.xml b/app/src/main/res/drawable/ic_info_16dp.xml
new file mode 100644
index 0000000000000000000000000000000000000000..063fb73ea180973d712c10d64d2b88f4170210d1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_info_16dp.xml
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_internet_activity_policy.xml b/app/src/main/res/layout/fragment_internet_activity_policy.xml
index 328eeaec664d8e478f2eff60e9f6909299c03f8f..ee82abf8e71f0ab5f3664c5f4202b1b06ec2af0b 100644
--- a/app/src/main/res/layout/fragment_internet_activity_policy.xml
+++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml
@@ -1,7 +1,9 @@
-
-
+
Zufälliges Land
- Wende diese Einstellungen auf alle ausgewählten Anwendungen an:
+ Wende diese Einstellungen auf alle ausgewählten Anwendungen an * :
Du hast keine Standort-Berechtigung erteilt
Bitte gib einen gültigen Längen- und Breitengrad an
Schneller Datenschutz
@@ -79,7 +79,7 @@
24 Stunden
vergangener Monat
vergangenes Jahr
- Verwalte Tracker, die von Apps benutzt werden:
+ Verwalte Tracker, die von Apps benutzt werden * :
HH:mm
d\'.\' MMMM EEE
MMMM yyyy
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 6216e072cf5e78b40e6a6b4c708aebeb1dfacb19..6f0bc9090b738911c746a6364e80a6bc6a372b87 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -26,7 +26,7 @@
Soy anónimo en internet
Mi actividad en internet debe aparecer desde:
País aleatorio
- Aplicar esta configuración a todas las aplicaciones seleccionadas:
+ Aplicar esta configuración a todas las aplicaciones seleccionadas * :
Tu privacidad en linea está desprotegida
Gestiona tus permisos
Habilitar la \"Privacidad rápida\" para poder activar/desactivar los rastreadores.
@@ -56,7 +56,7 @@
24 horas
Mes pasado
Año pasado
- Gestionar rastreadores usados en aplicaciones:
+ Gestionar rastreadores usados en aplicaciones * :
HH:mm
EEE d \'de\' MMMM
MMMM yyyy
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index 008309528990f6ac90d10d7ec9268ea203a433a7..73945ffc55e5c25e8c345478f86ffd83ca585cad 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -51,7 +51,7 @@
MMMM yyyy
d MMMM EEE
HH:mm
- Hallitse sovellusten käyttämiä seuraimia:
+ Hallitse sovellusten käyttämiä seuraimia * :
kulunut vuosi
kulunut kuukausi
24 tuntia
@@ -71,7 +71,7 @@
Hallitse sijaintiani
Piilotetun IP-palvelumme käynnistäminen vie aikaa. Se voi kestää muutaman minuutin. Ruudulta poistuminen ei keskeytä prosessia.
Quick Privacy on otettu käyttöön toimintojen käyttöä varten
- Sovella tätä asetusta kaikkiin valittuihin sovelluksiin:
+ Sovella tätä asetusta kaikkiin valittuihin sovelluksiin * :
Satunnaisesta maasta
Internet-toimintani täytyy näyttää olevan peräisin:
Huomaa: Kun tämä vaihtoehto on käytössä, Internetyhteytesi nopeus todennäköisesti alenee merkittävästi.
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 23706465c783b0cf843b8ad5685d731781cc3722..336cb749cc6a439b6ea27a1ba5157cfe3e1fe0d8 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -29,7 +29,7 @@
Note : Tant que cette option est active, votre vitesse de connexion est susceptible d\'être considérablement réduite.
Mon activité internet doit apparaître depuis :
Pays aléatoire
- Appliquer ce paramètre à toutes les applications sélectionnées :
+ Appliquer ce paramètre à toutes les applications sélectionnées * :
%s pisteurs vous ont profilé au cours des dernières 24 heures
Gérer les pisteurs d\'applications
%1$d pisteurs d\'apps, %2$d pisteurs autorisés
@@ -59,7 +59,7 @@
Mode de fausse localisation
Gérer les pisteurs des applications
%d pisteurs
- Gérer les pisteurs utilisés dans les applications :
+ Gérer les pisteurs utilisés dans les applications * :
%1$d pisteurs bloqués sur %2$d, %3$d fuites
Bloquer les pisteurs
Optez pour les pisteurs que vous souhaitez activer/désactiver.
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 1dcd21417aea304fbaa049e0550956bb10d27f50..23e53cde23f09bcaf37ac417ef6a08761cd97cdf 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -30,7 +30,7 @@
Nota: Se questa scelta viene attivata, la tua velocità su Internet verrà ridotta notevolmente.
La mia attività internet deve apparire come se fosse da:
Un paese a caso
- Applica questa impostazione a tutte le app selezionate:
+ Applica questa impostazione a tutte le app selezionate * :
Gestisci la mia posizione
Usa la mia posizione reale
Usa una posizione a caso plausibile
@@ -43,7 +43,7 @@
24 ore
mese scorso
scorso anno
- Gestisci i trackers usati nelle app:
+ Gestisci i trackers usati nelle app * :
HH:mm
EEE d MMMM
MMMM yyyy
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8bcd9982e03e650d58d4672bddd4aff2e1e69b9b..79b2a98492d5adde1548716699cd678f85d81adc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -51,7 +51,8 @@
Note: While this option is active, your Internet speed is likely to be significantly reduced.
My internet activity must appear from:
Random country
- Apply this setting to all selected applications:
+ Apply this setting to all selected applications * :
+ Only apps with internet permission are listed.
Enabled Quick Privacy to use functionalities
Our scrambling IP service is taking time to launch. It can take a few minutes. Leaving the screen won\'t interrupt the process.
@@ -70,7 +71,9 @@
24 hours
past month
past year
- Manage trackers used in applications:
+ Manage trackers used in applications * :
+ @string/ipscrambling_app_list_infos
+
HH:mm
MMMM d - EEE
MMMM yyyy