diff --git a/OsmAnd/res/layout/bottom_sheet_item_preference_descr.xml b/OsmAnd/res/layout/bottom_sheet_item_preference_descr.xml
index b66a1ec2f7..04f0ab1d4c 100644
--- a/OsmAnd/res/layout/bottom_sheet_item_preference_descr.xml
+++ b/OsmAnd/res/layout/bottom_sheet_item_preference_descr.xml
@@ -11,7 +11,6 @@
android:paddingTop="@dimen/bottom_sheet_image_text_margin_start"
android:paddingRight="@dimen/content_padding"
android:paddingBottom="@dimen/gpx_small_text_margin"
- android:textColor="?android:textColorPrimary"
- android:textSize="@dimen/default_desc_text_size"
+ android:textAppearance="@style/TextAppearance.ListItemTitle"
app:typeface="@string/font_roboto_regular"
tools:text="@string/auto_zoom_map_descr" />
\ No newline at end of file
diff --git a/OsmAnd/res/layout/divider_half_item.xml b/OsmAnd/res/layout/divider_half_item.xml
new file mode 100644
index 0000000000..5414a81807
--- /dev/null
+++ b/OsmAnd/res/layout/divider_half_item.xml
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/osm_login_data.xml b/OsmAnd/res/layout/osm_login_data.xml
index aca7353f6a..26dbdd85e5 100644
--- a/OsmAnd/res/layout/osm_login_data.xml
+++ b/OsmAnd/res/layout/osm_login_data.xml
@@ -5,7 +5,8 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/content_padding"
- android:paddingRight="@dimen/content_padding">
+ android:paddingRight="@dimen/content_padding"
+ android:paddingBottom="@dimen/route_info_list_text_padding">
diff --git a/OsmAnd/res/layout/preference_button.xml b/OsmAnd/res/layout/preference_button.xml
index 948c7daaee..a89464d4ef 100644
--- a/OsmAnd/res/layout/preference_button.xml
+++ b/OsmAnd/res/layout/preference_button.xml
@@ -14,25 +14,15 @@
android:minHeight="@dimen/bottom_sheet_list_item_height"
tools:background="?android:attr/selectableItemBackground">
-
-
-
-
-
+ android:layout_marginLeft="@dimen/content_padding"
+ android:layout_marginRight="@dimen/content_padding"
+ tools:src="@drawable/ic_action_car_dark"
+ tools:tint="?colorAccent" />
+ tools:text="Button text" />
diff --git a/OsmAnd/res/layout/preference_description.xml b/OsmAnd/res/layout/preference_description.xml
new file mode 100644
index 0000000000..9b01ab7d37
--- /dev/null
+++ b/OsmAnd/res/layout/preference_description.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_edit_text_box.xml b/OsmAnd/res/layout/preference_edit_text_box.xml
new file mode 100644
index 0000000000..900752ee14
--- /dev/null
+++ b/OsmAnd/res/layout/preference_edit_text_box.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/layout/preference_with_descr.xml b/OsmAnd/res/layout/preference_with_descr.xml
index f9e01e34a9..98e79a12b1 100644
--- a/OsmAnd/res/layout/preference_with_descr.xml
+++ b/OsmAnd/res/layout/preference_with_descr.xml
@@ -14,25 +14,17 @@
android:minHeight="@dimen/bottom_sheet_list_item_height"
tools:background="?android:attr/selectableItemBackground">
-
-
-
-
-
+ android:layout_marginLeft="@dimen/content_padding"
+ android:layout_marginTop="@dimen/bottom_sheet_icon_margin"
+ android:layout_marginRight="@dimen/content_padding"
+ android:layout_marginBottom="@dimen/bottom_sheet_icon_margin"
+ tools:src="@drawable/ic_action_car_dark"
+ tools:tint="@color/active_color_primary_light" />
diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml
index f2d8671bba..933c75c9cf 100644
--- a/OsmAnd/res/values-ar/strings.xml
+++ b/OsmAnd/res/values-ar/strings.xml
@@ -3351,7 +3351,6 @@
تتيح لك مشاركة الموقع الحالي باستخدام تسجيل الرحلة.
تعقب عبر الانترنت
دقة التسجيل
- يمكنك العثور على جميع ملاحظاتك في القائمة — أماكني المفضلة — ملاحظات
ملاحظات الفيديو
ملاحظات الصورة
إعادة حساب الطريق
@@ -3362,7 +3361,5 @@
OSM
سترى الأيقونة فقط أثناء الملاحة أو أثناء التحرك.
معدل
- يمكنك العثور على جميع المسارات المسجلة الخاصة بك في القائمة - مكاني - المسارات أو في مجلد أوسماند باستخدام مدير الملفات.
- يمكنك عرض جميع التعديلات التي قمت بإلغاء تحميلها أو أخطاء نظام التشغيل في القائمة - الأماكن الخاصة بي - تعديلات OSM. لا يتم عرض النقاط التي تم تحميلها في أوسماند.
تظهر أيقونة الخريطة فقط على الخريطة ، وتتغير أثناء التنقل إلى أيقونة التنقل.
\ No newline at end of file
diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml
index c8cebfe34d..13b7c16422 100644
--- a/OsmAnd/res/values-ca/strings.xml
+++ b/OsmAnd/res/values-ca/strings.xml
@@ -3444,19 +3444,19 @@ Abasta l\'àrea: %1$s x %2$s
Permet compartir la ubicació actual utilitzant l\'enregistrament de viatges.
Seguiment en línia
Precisió de registre
- Pots trobar totes les teves notes a Menú — Els meus llocs — Notes
+ Pots trobar totes les teves notes a %1$s
Notes de vídeo
Notes de fotos
OSM
Inclou la direcció
Desa l\'orientació a cada fita mentre es fa un enregistrament.
- Podeu trobar els vostres enregistraments a Menú — Els meus llocs — Traces o, amb un gestor de fitxers, al directori d\'OsmAnd .
+ Podeu trobar els vostres enregistraments a %1$s o, amb un gestor de fitxers, al directori d\'OsmAnd .
Recàlcul de la ruta
Anunci
Nom d\'usuari i contrasenya
Aquesta configuració del connector és global i afecta tots els perfils.
Edició d\'OpenStreetMap
- Podeu veure totes les vostres edicions no enviades o els errors OSM a Menú — Els meus llocs — Edicions OSM. Els punts enviats no es mostren a OsmAnd.
+ Podeu veure totes les vostres edicions no enviades o els errors OSM a %1$s. Els punts enviats no es mostren a OsmAnd.
Només veureu la icona mentre navegueu o us mogueu.
La icona de mapa només es mostra al mapa i es canvia a la icona de navegació quan durant aquesta.
\ No newline at end of file
diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index c2bd3ea856..691ac3c4f2 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -3443,8 +3443,8 @@ Repræsenterer område: %1$s x %2$s
Tillader at dele den aktuelle placering ved hjælp af tur-optagelse.
Online sporing
Lognøjagtighed
- Find alle optagede spor i Menu - Foretrukne - Spor eller i OsmAnd mappen vha. filhåndtering.
- Find alle noter i Menu - Foretrukne - Noter
+ Find alle optagede spor i %1$s eller i OsmAnd mappen vha. filhåndtering.
+ Find alle noter i %1$s
Video noter
Foto noter
Genberegning af rute
@@ -3452,7 +3452,7 @@ Repræsenterer område: %1$s x %2$s
Brugernavn og adgangskode
Indstillinger for udvidelsen er globale, og gælder for alle profiler.
OpenStreetMap redigering
- Se alle ikke overførte redigeringer eller OSM fejl i Menu - Foretrukne - OSM-redigeringer. Overførte punkter vises ikke i OsmAnd.
+ Se alle ikke overførte redigeringer eller OSM fejl i %1$s. Overførte punkter vises ikke i OsmAnd.
OSM
Ikonet vises kun under navigation eller under bevægelse.
Kortikon vises kun på kortet og skifter under navigation til navigationsikon.
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index f0e10fd40b..1a762b81f2 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -3413,8 +3413,8 @@ Indikas lokon: %1$s x %2$s"
Kunhavigi vian nunan pozicion per registrado de kurso.
Perreta spurado
Precizo de registrado
- Vi povas trovi ĉiujn registritajn spurojn per la menuo → “miaj ejoj” → “spuroj” aŭ en la dosierujo OsmAnd (uzu dosier‑esplorilon).
- Vi povas trovi ĉiujn notojn per la menuo → “miaj ejoj” → “notoj”.
+ Vi povas trovi ĉiujn registritajn spurojn per la %1$s aŭ en la dosierujo OsmAnd (uzu dosier‑esplorilon).
+ Vi povas trovi ĉiujn notojn per la %1$s.
Videaj notoj
Fotaj notoj
Rekalkuli kurson
@@ -3423,7 +3423,7 @@ Indikas lokon: %1$s x %2$s"
Uzantnomo kaj pasvorto
Agordoj pri tiu ĉi kromprogramo influas al ĉiuj profiloj.
OpenStreetMap-redaktilo
- Vi povas vidi ĉiujn viajn nesenditajn redaktojn kaj rimarkojn per la menuo → “miaj ejoj” → “OSM‑redaktoj”. Senditaj punktoj malaperos el OsmAnd.
+ Vi povas vidi ĉiujn viajn nesenditajn redaktojn kaj rimarkojn per la %1$s. Senditaj punktoj malaperos el OsmAnd.
OSM
La emblemo montriĝos nur dum navigi aŭ dum moviĝi.
Map‑emblemo montriĝas nur dum foliumi mapon kaj ŝanĝiĝas dum navigi al la emblemo de navigo.
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index 273ea20904..b757bbf163 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -3445,8 +3445,8 @@ Lon %2$s
Permite compartir la ubicación actual utilizando la grabación del viaje.
Seguimiento en línea
Precisión de registro
- Puedes encontrar todas tus trazas grabadas en «Menú — Mi sitios — Trazas» o en la carpeta OsmAnd usando el administrador de archivos.
- Puedes encontrar todas tus notas en «Menú — Mis sitios — Notas»
+ Puedes encontrar todas tus trazas grabadas en «%1$s» o en la carpeta OsmAnd usando el administrador de archivos.
+ Puedes encontrar todas tus notas en «%1$s»
Notas de video
Notas fotográficas
Recálculo de la ruta
@@ -3454,7 +3454,7 @@ Lon %2$s
Nombre de usuario y contraseña
Los ajustes de este complemento es global y se aplica a todos los perfiles.
Edición de OpenStreetMap
- Puedes ver todas tus ediciones no subidas o errores de OSM en «Menú — Mis sitios — Ediciones OSM». Los puntos subidos no se muestran en OsmAnd.
+ Puedes ver todas tus ediciones no subidas o errores de OSM en «%1$s». Los puntos subidos no se muestran en OsmAnd.
OSM
Sólo verás el icono durante la navegación o mientras te mueves.
El icono del mapa aparece sólo en el mapa y cambia mientras se navega hacia el icono de navegación.
diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml
index 194ff8d16f..6cc331d621 100644
--- a/OsmAnd/res/values-es-rUS/strings.xml
+++ b/OsmAnd/res/values-es-rUS/strings.xml
@@ -3439,8 +3439,8 @@ Lon %2$s
Permite compartir la ubicación actual utilizando la grabación del viaje.
Seguimiento en línea
Precisión de registro
- Puedes encontrar todas tus trazas grabadas en «Menú — Mi sitios — Trazas» o en la carpeta OsmAnd usando el administrador de archivos.
- Puedes encontrar todas tus notas en «Menú — Mis sitios — Notas»
+ Puedes encontrar todas tus trazas grabadas en «%1$s» o en la carpeta OsmAnd usando el administrador de archivos.
+ Puedes encontrar todas tus notas en «%1$s»
Notas de video
Notas fotográficas
Recálculo de la ruta
@@ -3448,7 +3448,7 @@ Lon %2$s
Nombre de usuario y contraseña
Los ajustes de este complemento es global y se aplica a todos los perfiles.
Edición de OpenStreetMap
- Puedes ver todas tus ediciones no subidas o errores de OSM en «Menú — Mis sitios — Ediciones OSM». Los puntos subidos no se muestran en OsmAnd.
+ Puedes ver todas tus ediciones no subidas o errores de OSM en «%1$s». Los puntos subidos no se muestran en OsmAnd.
OSM
Sólo verás el icono durante la navegación o mientras te mueves.
El icono del mapa aparece sólo en el mapa y cambia mientras se navega hacia el icono de navegación.
diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml
index 76ae2ae3c9..b3dbc04ba7 100644
--- a/OsmAnd/res/values-es/strings.xml
+++ b/OsmAnd/res/values-es/strings.xml
@@ -3430,8 +3430,8 @@
Te permite compartir la ubicación actual utilizando la grabación del viaje.
Seguimiento en línea
Precisión de registro
- Puedes encontrar todas las trazas grabadas en Menú — Mis sitios — Trazas o en la carpeta OsmAnd utilizando el administrador de archivos.
- Puedes encontrar todas tus notas en Menú - Mis sitios - Notas
+ Puedes encontrar todas las trazas grabadas en %1$s o en la carpeta OsmAnd utilizando el administrador de archivos.
+ Puedes encontrar todas tus notas en %1$s
Notas de video
Notas de foto
Recálculo de la ruta
@@ -3439,7 +3439,7 @@
Nombre de usuario y clave
La configuración de este complemento es global y se aplica a todos los perfiles.
Edición de OpenStreetMap
- Puedes ver todas las ediciones y errores de osm no enviadas en Menú — Mis sitios — Ediciones OSM. Los puntos enviados no se muestran en OsmAnd.
+ Puedes ver todas las ediciones y errores de osm no enviadas en %1$s. Los puntos enviados no se muestran en OsmAnd.
OSM
Verás el icono sólo durante la navegación o mientras te estés moviendo.
El icono del mapa solo aparece en el mapa y cambia durante la navegación al icono de navegación.
diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml
index cb30bd4fba..b327fe0fc0 100644
--- a/OsmAnd/res/values-et/strings.xml
+++ b/OsmAnd/res/values-et/strings.xml
@@ -3365,8 +3365,8 @@
Lubab sul jagada praegust asukohta kasutades reisi salvestamist.
Veebis jälgimine
Logimise täpsus
- Kõik oma salvestatud rajad leiad Menüü- Minu koht - Rajad või OsmAd kataloogist failihalduri abil.
- Kõik oma märkmed leiad Menüü - Minu kohad - Märkmed
+ Kõik oma salvestatud rajad leiad %1$s või OsmAd kataloogist failihalduri abil.
+ Kõik oma märkmed leiad %1$s
Video märkmed
Foto märkmed
Teekonna ümberarvutamine
@@ -3374,7 +3374,7 @@
Kasutajanimi ja salasõna
Selle lisa seaded kehtivad kogu rakenduses ja rakenduvad kõikidele profiilidele.
OpenStreetMap muutmine
- Kõiki üleslaadimata muudatusi või osm vigu saad vaadata menüüs Menüü - Minu kohad - OSM muudatused. Üleslaaditud punkte OsmAnd ei kuva.
+ Kõiki üleslaadimata muudatusi või osm vigu saad vaadata menüüs %1$s. Üleslaaditud punkte OsmAnd ei kuva.
OSM
Ikooni näed ainult navigeerimise või liikumise ajal.
Kaardiikoon kuvatakse ainult kaardil ja muutub navigeerimise ajal navigeerimise ikooniks.
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index f7d8aa782f..51dabd88de 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -3407,8 +3407,8 @@ représentant la zone : %1$s x %2$s
Permet de partager votre position actuelle grâce à l\'enregistrement du trajet.
Suivi en ligne
Précision de l\'enregistrement
- Retrouvez toutes vos traces enregistrées dans le Menu : Mon emplacement > Traces ou dans le dossier OsmAnd via votre gestionnaire de fichiers.
- Retrouvez toutes vos notes dans le menu : Mon emplacement > Notes
+ Retrouvez toutes vos traces enregistrées dans le %1$s ou dans le dossier OsmAnd via votre gestionnaire de fichiers.
+ Retrouvez toutes vos notes dans le %1$s
Notes vidéo
Notes photo
Recalcul de l\'itinéraire
@@ -3416,7 +3416,7 @@ représentant la zone : %1$s x %2$s
Nom d\'utilisateur et mot de passe
Ces paramètres de greffon sont globaux et s\'appliquent à tous les profils.
Édition OpenStreetMap
- Vous pouvez consulter toutes vos modifications non envoyées comme vos bugs OSM dans le menu : Mes emplacements > Modifications OSM. Les points envoyés ne s\'affichent plus dans OsmAnd.
+ Vous pouvez consulter toutes vos modifications non envoyées comme vos bugs OSM dans le %1$s. Les points envoyés ne s\'affichent plus dans OsmAnd.
OSM
Vous ne verrez l\'icône que lors de la navigation ou en déplacement.
L \'icône Carte n\'apparaît que sur la carte et est remplacée par l\'icône Navigation lors de la navigation.
diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml
index 1e5bc70295..6c9e395110 100644
--- a/OsmAnd/res/values-gl/strings.xml
+++ b/OsmAnd/res/values-gl/strings.xml
@@ -3466,8 +3466,8 @@ Lon %2$s
Permite compartir a localización actual empregando a gravación da viaxe.
Seguimento en liña
Precisión de rexistro
- Podes atopar todas as túas pistas gravadas en Menú — Os meus lugares — Pista ou no cartafol OsmAnd empregando o xestor de ficheiros.
- Podes atopar todas as túas notas en Menú - Os meus lugares - Notas
+ Podes atopar todas as túas pistas gravadas en %1$s ou no cartafol OsmAnd empregando o xestor de ficheiros.
+ Podes atopar todas as túas notas en %1$s
Notas de vídeo
Notas de imaxe
Recálculo da ruta
@@ -3475,7 +3475,7 @@ Lon %2$s
Nome de usuario e contrasinal
A configuración deste engadido é global e se aplica a todos os perfís.
Edición do OpenStreetMap
- Podes ollar todas as túas edicións de erros do osm non subidas en Menú — Os meus lugares — Edicións OSM. Os puntos subidos non se amosan no OsmAnd.
+ Podes ollar todas as túas edicións de erros do osm non subidas en %1$s. Os puntos subidos non se amosan no OsmAnd.
OSM
Ollarás a icona só durante a navegación ou mentres esteas a moverte.
A icona do mapa só aparece no mapa e muda durante a navegación á icona de navegación.
diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml
index ad6be98d6e..44271bff6c 100644
--- a/OsmAnd/res/values-he/strings.xml
+++ b/OsmAnd/res/values-he/strings.xml
@@ -3424,8 +3424,6 @@
לאפשר לך לשתף את המיקום הנוכחי באמצעות הקלטת המסלול.
מעקב מקוון
דיוק תיעוד ביומן
- באפשרותך למצוא את כל המסלול שהקלטת בתפריט - המיקום שלי - מסלולים או בתיקייה של OsmAnd בעזרת מנהל קבצים.
- באפשרותך למצוא את כל ההערות שכתבת תחת תפריט - המיקומים שלי - פתקים
הערות וידאו
הערות בתמונות
חישוב מסלול מחדש
@@ -3433,7 +3431,6 @@
שם משתמש וססמה
הגדרות התוסף הזה הן גלובליות וחלות על כל הפרופילים.
עריכה של OpenStreetMap
- באפשרותך לצפות בכל העריכות שטרם העלית דרך התפריט - המקומות שלי - עריכות OSM. הנקודות שהועלו לא מופיעות ב־OsmAnd.
OSM
הסמל יופיע רק בזמן הניווט או בזמן תזוזה.
סמל המפה מופיע במפה בלבד והוא מתחלף בעת הניווט לסמל הניווט.
diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml
index 0ed369e2c8..c07d743964 100644
--- a/OsmAnd/res/values-hu/strings.xml
+++ b/OsmAnd/res/values-hu/strings.xml
@@ -3434,8 +3434,8 @@ Ha szereted az OsmAndot és az OSM-et, és szeretnéd támogatni a fejlődésük
Lehetővé teszi, hogy az útvonal rögzítésével megossza aktuális pozícióját.
Online nyomvonalrögzítés
Naplózás pontossága
- Az összes rögzített nyomvonal megtalálható a Menü > Saját helyek > Nyomvonalaim helyen vagy a fájlkezelővel az OsmAnd mappában.
- Az összes jegyzetét megtalálja a Menü > Saját helyek > Jegyzetek helyen
+ Az összes rögzített nyomvonal megtalálható a %1$s helyen vagy a fájlkezelővel az OsmAnd mappában.
+ Az összes jegyzetét megtalálja a %1$s helyen
Videojegyzetek
Fényképes jegyzetek
Útvonal újraszámítása
@@ -3443,7 +3443,7 @@ Ha szereted az OsmAndot és az OSM-et, és szeretnéd támogatni a fejlődésük
Felhasználónév és jelszó
Ezek a bővítménybeállítások globálisak, és minden profilra vonatkoznak.
OpenStreetMap-szerkesztés
- Az összes még fel nem töltött szerkesztés vagy OSM-hiba megtalálható a Menü > Saját helyek > OSM-szerkesztések helyen. A már feltöltött pontok nem láthatók az OsmAndban.
+ Az összes még fel nem töltött szerkesztés vagy OSM-hiba megtalálható a %1$s. A már feltöltött pontok nem láthatók az OsmAndban.
OSM
Az ikon csak navigáció vagy mozgás közben lesz látható.
A térképikon csak a térképen jelenik meg, navigáció közben pedig navigációs ikonra vált.
diff --git a/OsmAnd/res/values-large/sizes.xml b/OsmAnd/res/values-large/sizes.xml
index 58975895e0..13ae7b9b65 100644
--- a/OsmAnd/res/values-large/sizes.xml
+++ b/OsmAnd/res/values-large/sizes.xml
@@ -237,4 +237,7 @@
21dp
+ 108dp
+ 108dp
+
\ No newline at end of file
diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml
index 6c04639bce..5414b0c8dc 100644
--- a/OsmAnd/res/values-nb/strings.xml
+++ b/OsmAnd/res/values-nb/strings.xml
@@ -3441,8 +3441,8 @@
Tillater deg å dele nåværende plassering ved bruk av turopptak.
Nettbasert sporing
Loggingsnøyaktighet
- Du kan finne alle dine innspilte spor i Meny → Mitt sted → Spor, eller i OsmAnd-mappen.
- Du finner alle dine notater i Meny → Mine steder → Notater
+ Du kan finne alle dine innspilte spor i %1$s, eller i OsmAnd-mappen.
+ Du finner alle dine notater i %1$sr
Videonotater
Bildenotater
Ruteomberegning
@@ -3450,7 +3450,7 @@
Brukernavn og passord
Innstillinger av dette programtillegget har innvirkning på alle profiler.
OpenStreetMap-redigering
- Du kan vise alle dine uopplastede redigeringer eller OSM-feil i Meny → Mine steder → OSM-redigeringer. Opplastede punkter viser ikke i OsmAnd.
+ Du kan vise alle dine uopplastede redigeringer eller OSM-feil i %1$s. Opplastede punkter viser ikke i OsmAnd.
Du vil se ikonet kun under navigasjon eller bevegelse.
Kartikon vises kun på kartet, og endrer seg under navigasjon til navigasjonsikonet.
\ No newline at end of file
diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml
index 52f7e409e9..0e93bedb6b 100644
--- a/OsmAnd/res/values-nl/strings.xml
+++ b/OsmAnd/res/values-nl/strings.xml
@@ -3315,8 +3315,8 @@ voor Gebied: %1$s x %2$s
Laat u toe uw positie te delen dankzij reisopname.
Online volgen
Opnamenauwkeurigheid
- U kan al uw opgenomen tracks terugvinden bij Menu - Mijn plaatsen - Tracks of in OsmAnd-map met een bestand verkenner.
- U kan al uw notities terugvinden bij Menu - Mijn plaatsen - Notities
+ U kan al uw opgenomen tracks terugvinden bij %1$s of in OsmAnd-map met een bestand verkenner.
+ U kan al uw notities terugvinden bij %1$s
Videonotities
Fotonotities
Route herberekening
@@ -3324,7 +3324,7 @@ voor Gebied: %1$s x %2$s
Gebruikersnaam en wachtwoord
Deze plugin instellingen zijn globaal en hebben betrekking op alle profielen.
OpenStreetMap Bewerking
- U kan al uw niet-geüploade bewerkingen of osm fouten zien in Menu - Mijn plaatsen - OSM Bewerkingen. Geüploade punten ziet u niet in OsmAnd.
+ U kan al uw niet-geüploade bewerkingen of osm fouten zien in %1$s. Geüploade punten ziet u niet in OsmAnd.
OSM
U zal het icoon enkel zien tijdens het navigeren of bewegen.
Kaarticoon verschijnt op de kaart en wijzigt slechts bij het navigeren in het navigatie-icoon.
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 6d68a49f8a..a2047351a4 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -3421,8 +3421,8 @@ Pôr do Sol: %2$s
Permite compartilhar a localização atual usando a gravação de viagem.
Rastreamento online
Precisão de registro
- Você pode encontrar todas as suas faixas gravadas em Menu - Meu lugar - Faixas ou na pasta OsmAd usando o gerenciador de arquivos.
- Você pode encontrar todas as suas anotações em Menu - Meus lugares - Notas
+ Você pode encontrar todas as suas faixas gravadas em %1$ss ou na pasta OsmAd usando o gerenciador de arquivos.
+ Você pode encontrar todas as suas anotações em %1$s
Notas de vídeo
Notas fotográficas
Recálculo da rota
@@ -3430,7 +3430,7 @@ Pôr do Sol: %2$s
Usuário e senha
As configurações deste plug-in são globais e se aplicam a todos os perfis.
Edição de OpenStreetMap
- Você pode ver todos os erros de osm do editor carregado em Menu - Meus lugares - Edições OSM. Os pontos enviados não são exibidos no OsmAnd.
+ Você pode ver todos os erros de osm do editor carregado em %1$s. Os pontos enviados não são exibidos no OsmAnd.
OSM
Você verá o ícone apenas enquanto estiver navegando ou em movimento.
O ícone do mapa aparece apenas no mapa e é alterado enquanto estiver navegando para o ícone de navegação.
diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml
index 8cd4631505..e5afc78753 100644
--- a/OsmAnd/res/values-sc/strings.xml
+++ b/OsmAnd/res/values-sc/strings.xml
@@ -3434,8 +3434,8 @@ Pro praghere iscrie su còdighe intreu
Ti permitit de cumpartzire sa positzione atuale impreende sa registratzione de su biàgiu.
Arrastamentu in lìnia
Pretzisione de registratzione
- Podes agatare totu sas rastas registradas tuas in Menù — Logos meos — Rastas o in sa cartella de OsmAnd impreende su gestore de documentos.
- Podes agatare totu sas notas tuas in Menù — Logos meos — Notas
+ Podes agatare totu sas rastas registradas tuas in %1$s o in sa cartella de OsmAnd impreende su gestore de documentos.
+ Podes agatare totu sas notas tuas in %1$s
Vìdeo-notas
Foto-notas
Ricàlculu de s\'àndala
@@ -3443,7 +3443,7 @@ Pro praghere iscrie su còdighe intreu
Nùmene impreadore e crae
Sas impostatziones de s\'estensione sunt globales, e si aplicant a totu sos profilos.
Modìfica de OpenStreetMap
- Podes pompiare totu sas modìficas non carrigadas tuas o sos errores de osm in Menù — Logos meos — Modìficas de OSM. Sos puntos carrigados no ant a èssere ammustrados in OsmAnd.
+ Podes pompiare totu sas modìficas non carrigadas tuas o sos errores de osm in %1$s. Sos puntos carrigados no ant a èssere ammustrados in OsmAnd.
OSM
As a bìdere s\'icona petzi durante sa navigatzione o su movimentu.
S\'icona de sa mapa aparit in sa mapa ebbia, e divenit s\'icona de navigatzione durante sa navigatzione.
diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml
index d3a378707c..c9dc5a8697 100644
--- a/OsmAnd/res/values-tr/strings.xml
+++ b/OsmAnd/res/values-tr/strings.xml
@@ -3385,8 +3385,6 @@
Seyahat kaydını kullanarak geçerli konumunuzu paylaşmaya izin verin.
Çevrimiçi takip etme
Kayıt tutma doğruluğu
- Kaydedilen tüm yol-izlerinizi Menü - Benim yerim - Yol-izleri içinde veya dosya yöneticisini kullanarak OsmAnd klasöründe bulabilirsiniz.
- Tüm notlarınızı Menü - Yerlerim - Notlar bölümünde bulabilirsiniz
Video notları
Fotoğraf notları
Rotanın yeniden hesaplanması
@@ -3394,7 +3392,7 @@
Kullanıcı adı ve parola
Bu eklenti ayarları globaldir ve tüm profiller için geçerlidir.
OpenStreetMap Düzenleme
- Karşıya yüklenmemiş tüm düzenlemelerinizi veya osm hatalarınızı Menü — Yerlerim — OSM Düzenlemeleri içinde görüntüleyebilirsiniz. Yüklenen noktalar OsmAnd\'de gösterilmez.
+ Karşıya yüklenmemiş tüm düzenlemelerinizi veya osm hatalarınızı %1$s içinde görüntüleyebilirsiniz. Yüklenen noktalar OsmAnd\'de gösterilmez.
OSM
Simgeyi yalnızca navigasyon sırasında veya hareket halindeyken göreceksiniz.
Harita simgesi yalnızca haritada görünür ve navigasyon esnasında navigasyon simgesine dönüşür.
diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml
index bef9a37555..926c1a7bb4 100644
--- a/OsmAnd/res/values-uk/strings.xml
+++ b/OsmAnd/res/values-uk/strings.xml
@@ -3425,8 +3425,8 @@
Дозволяє ділитися поточним місцезнаходженням, використовуючи запис поїздки.
Мережеве відстеження
Точність часопису
- Ви можете знайти всі записи в Меню - Мої місця - Треки або в теці OsmAnd за допомогою файлового провідника.
- Ви можете знайти всі свої примітки в Меню - Мої місця - Примітки
+ Ви можете знайти всі записи в %1$s або в теці OsmAnd за допомогою файлового провідника.
+ Ви можете знайти всі свої примітки в %1$s
Відеопримітки
Світлинопримітки
Перерахунок маршруту
@@ -3434,7 +3434,7 @@
Ім\'я користувача і пароль
Налаштування цього втулка є всеохопними та стосуються всіх профілів.
OpenStreetMap редагування
- Ви можете переглянути всі не завантажені зміни або помилки в OSM в Меню - Мої місця - Правки OSM. Завантажені точки не відображаються в OsmAnd.
+ Ви можете переглянути всі не завантажені зміни або помилки в OSM в %1$s. Завантажені точки не відображаються в OsmAnd.
OSM
Ви побачите значок тільки під час навігації або під час переміщення.
Образок мапи відображається лише на мапі та змінюється під час навігації до образка навігації.
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index 39b0404882..3939f70b16 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -3422,8 +3422,6 @@
允許您使用旅程錄製來分享目前的位置。
線上追蹤
記錄精度
- 您可以在選單 → 我的收藏 → 軌跡或使用檔案管理員在 OsmAnd 的資料夾中找到您所有已紀錄的軌跡。
- 您可以在選單 → 我的收藏 → 註記中找到您所有的註記
視訊註記
照片註記
路徑重新計算
@@ -3431,7 +3429,6 @@
使用者名稱與密碼
此外掛程式設定是全域設定,並會套用到所有設定檔。
開放街圖編輯
- 您可以在選單 → 我的收藏 → OSM 編輯中檢視您所有未上傳的編輯或開放街圖的問題。已上傳的點不會在 OsmAnd 中顯示。
OSM
僅在導航或移動時,您才會看到該圖示。
地圖圖示只會顯示在地圖上,並會在導航時換成導航圖示。
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 0c433a3535..0719147898 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -350,5 +350,7 @@
64dp
18dp
+ 72dp
+ 72dp
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 9afc99031c..c017292cfb 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,6 +11,32 @@
Thx - Hardy
-->
+ This is a low-speed cut-off filter to not record points below a certain speed. This may make recorded tracks look "smoother" when viewed on the map.
+ Side effect: Your track will be missing all sections where the minimum speed criterion was not met (e.g. where you push your bike up a steep hill). Also, there will be no information about periods at rest, like breaks. This has effects on any analysis or post-processing, like when trying to determine the total length of your trip, time in motion, or your average speed.
+ Recommendation: Try using the motion detection via the "logging minimum displacement" filter (B) first, it may produce better results, and you will lose less data. If your tracks remain noisy at low speeds, try non-zero values here. Please note that some measurements may not report any speed value at all (some network-based methods), in which case you would not record anything.
+ Remark: "speed > 0" check: Most GPS chipsets report a speed value only if the algorithm determines you are in motion, and none if you are not. Hence using the "> 0" setting in this filter in a sense uses the motion detection of the GPS chipset. But even if not filtered here at recording time, we still use this feature in our GPX analysis to determine the "Distance corrected", i.e. the value displayed in that field is the "distance recorded while in motion".
+ This will record only points measured with a minimum "accuracy" indication (in meters/feet, as reported by Android for your chipset). Accuracy refers to the scatter of repeated measurements, and is not directly related to precision, which defines how close your measurements are to your "true" position.
+ Side effect: As a result of filtering by accuracy, points may be entirely missing for e.g. below bridges, under trees, between high buildings, or with certain weather conditions.
+ Recommendation: It is hard to predict what will be recorded and what not, it may be best to turn this filter off.
+ Remark: If GPS had been off immediately before a recording, the first point measured may have a decreased accuracy,so in our code we may want to wait a second or so before recording a point (or record the best of 3 consecutive points, etc.), but this is not yet implemented.
+ This filter avoids duplicate points being recorded where too little actual motion may have occurred, makes a nicer spatial appearance of tracks not post-processed later.
+ Side effects: Periods at rest are not recorded at all or by just one point each. Small (real world) movements (e.g. sideways, to mark a possile turnoff on your trip) may be filtered out. Your file contains less information for post-processing, and has worse stats by filtering out obviously redundant points at recording time, while potentially keeping artifacts caused by bad reception or GPS chipset effects.
+ Recommendation: A setting of 5 meters may work well for you if you do not require to capture details finer than that, and do not want to explicitly capture data while at rest.
+ Time buffer
+ Tracking interval
+ Web address
+ Specify the web address with parameter syntax: lat={0}, lon={1}, timestamp={2}, hdop={3}, altitude={4}, speed={5}, bearing={6}.
+ Notification
+ Minimum speed
+ Minimum accuracy
+ Minimum displacement
+ Menu — My places — Tracks
+ Menu — My places — Notes
+ Menu — My places — OSM Edits
+ Reset plugin settings to default
+ Recorder split
+ Use system app
+ Camera shutter sound
Authorization is successful
Here you can see and share logs of the application
\'%1$s\' file doesn\'t contain routing rules, please choose another file.
@@ -25,8 +51,8 @@
Allow you to share current location using trip recording.
Online tracking
Logging accuracy
- You can find all your recorded tracks in Menu — My place — Tracks or in OsmAd folder using file manager.
- You can find all your notes in Menu — My places — Notes
+ You can find all your recorded tracks in %1$s or in OsmAd folder using file manager.
+ You can find all your notes in %1$s
Video notes
Photo notes
Route recalculation
@@ -34,7 +60,7 @@
Username and password
This plugin settings are global, and apply to all profiles.
OpenStreetMap Editing
- You can view all your unuploaded edits or osm bugs in Menu — My places — OSM Edits. Uploaded points don’t show in OsmAnd.
+ You can view all your unuploaded edits or osm bugs in %1$s. Uploaded points don’t show in OsmAnd.
OSM
You will see the icon only while navigation or while moving.
Map icon appears only on the map, and changing while navigation to navigation icon.
diff --git a/OsmAnd/res/xml/accessibility_settings.xml b/OsmAnd/res/xml/accessibility_settings.xml
index c11ba73e18..f69a4fcabf 100644
--- a/OsmAnd/res/xml/accessibility_settings.xml
+++ b/OsmAnd/res/xml/accessibility_settings.xml
@@ -97,7 +97,7 @@
android:key="reset_to_default"
android:layout="@layout/preference_button"
android:persistent="false"
- android:title="@string/reset_to_default"
+ android:title="@string/reset_plugin_to_default"
tools:icon="@drawable/ic_action_reset_to_default_dark" />
\ No newline at end of file
diff --git a/OsmAnd/res/xml/live_monitoring.xml b/OsmAnd/res/xml/live_monitoring.xml
index 32352e5b6b..61c76a9fd1 100644
--- a/OsmAnd/res/xml/live_monitoring.xml
+++ b/OsmAnd/res/xml/live_monitoring.xml
@@ -6,7 +6,7 @@
@@ -14,21 +14,21 @@
diff --git a/OsmAnd/res/xml/monitoring_settings.xml b/OsmAnd/res/xml/monitoring_settings.xml
index 11be7c48ef..ffcc2df3f4 100644
--- a/OsmAnd/res/xml/monitoring_settings.xml
+++ b/OsmAnd/res/xml/monitoring_settings.xml
@@ -36,19 +36,19 @@
@@ -123,14 +123,14 @@
tools:icon="@drawable/ic_action_folder" />
+ android:title="@string/multimedia_rec_split_title" />
@@ -126,14 +126,14 @@
tools:icon="@drawable/ic_action_folder" />
diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
index 4962943b89..4137fd479d 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
@@ -418,23 +418,17 @@ public class OsmandSettings {
for (OsmandPreference pref : profilePreferences) {
if (pref instanceof CommonPreference && !((CommonPreference) pref).global) {
CommonPreference profilePref = (CommonPreference) pref;
- Object defaultFrom = profilePref.getProfileDefaultValue(modeFrom);
- Object defaultTo = profilePref.getProfileDefaultValue(modeFrom);
- if (profilePref.isSetForMode(modeFrom) || !defaultFrom.equals(defaultTo)) {
- Object copiedValue = profilePref.getModeValue(modeFrom);
- if (copiedValue instanceof String) {
- settingsEditor.putString(pref.getId(), (String) copiedValue);
- } else if (copiedValue instanceof Boolean) {
- settingsEditor.putBoolean(pref.getId(), (Boolean) copiedValue);
- } else if (copiedValue instanceof Float) {
- settingsEditor.putFloat(pref.getId(), (Float) copiedValue);
- } else if (copiedValue instanceof Integer) {
- settingsEditor.putInt(pref.getId(), (Integer) copiedValue);
- } else if (copiedValue instanceof Long) {
- settingsEditor.putLong(pref.getId(), (Long) copiedValue);
- }
- } else {
- settingsEditor.remove(pref.getId());
+ Object copiedValue = profilePref.getModeValue(modeFrom);
+ if (copiedValue instanceof String) {
+ settingsEditor.putString(pref.getId(), (String) copiedValue);
+ } else if (copiedValue instanceof Boolean) {
+ settingsEditor.putBoolean(pref.getId(), (Boolean) copiedValue);
+ } else if (copiedValue instanceof Float) {
+ settingsEditor.putFloat(pref.getId(), (Float) copiedValue);
+ } else if (copiedValue instanceof Integer) {
+ settingsEditor.putInt(pref.getId(), (Integer) copiedValue);
+ } else if (copiedValue instanceof Long) {
+ settingsEditor.putLong(pref.getId(), (Long) copiedValue);
}
}
}
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java
index 40f6d8012b..87e0e12292 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java
@@ -1,6 +1,7 @@
package net.osmand.plus.audionotes;
import android.content.Intent;
+import android.graphics.Typeface;
import android.hardware.Camera;
import android.media.CamcorderProfile;
import android.media.MediaRecorder;
@@ -8,6 +9,7 @@ import android.os.Build;
import android.os.StatFs;
import android.support.v4.app.FragmentManager;
import android.support.v7.preference.Preference;
+import android.text.SpannableString;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
@@ -15,6 +17,7 @@ import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
+import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet;
import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet.CopyAppModePrefsListener;
import net.osmand.plus.settings.BaseSettingsFragment;
@@ -22,14 +25,13 @@ import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet;
import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet.ResetAppModePrefsListener;
import net.osmand.plus.settings.preferences.ListPreferenceEx;
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
+import net.osmand.plus.widgets.style.CustomTypefaceSpan;
import org.apache.commons.logging.Log;
import java.io.File;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
-import java.util.Locale;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AUDIO_BITRATE_DEFAULT;
import static net.osmand.plus.audionotes.AudioVideoNotesPlugin.AV_CAMERA_FOCUS_AUTO;
@@ -324,14 +326,23 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop
storageSize.setEntries(entries);
storageSize.setEntryValues(entryValues);
storageSize.setDescription(R.string.rec_split_storage_size_desc);
+ storageSize.setIcon(getContentIcon(R.drawable.ic_sdcard));
} else {
storageSize.setVisible(false);
}
}
private void setupOpenNotesDescrPref() {
- Preference nameAndPasswordPref = findPreference("open_notes_description");
- nameAndPasswordPref.setTitle(getText(R.string.multimedia_notes_view_descr));
+ String multimediaNotesPath = getString(R.string.multimedia_notes_view_path);
+ String multimediaNotesPathDescr = getString(R.string.multimedia_notes_view_descr, multimediaNotesPath);
+
+ int startIndex = multimediaNotesPathDescr.indexOf(multimediaNotesPath);
+ SpannableString titleSpan = new SpannableString(multimediaNotesPathDescr);
+ Typeface typeface = FontCache.getRobotoMedium(getContext());
+ titleSpan.setSpan(new CustomTypefaceSpan(typeface), startIndex, startIndex + multimediaNotesPath.length(), 0);
+
+ Preference osmEditsDescription = findPreference("open_notes_description");
+ osmEditsDescription.setTitle(titleSpan);
}
private void setupOpenNotesPref() {
diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
index 338e2b0f23..4a4c9746fd 100644
--- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
+++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java
@@ -55,6 +55,11 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem {
iconView.setImageDrawable(icon);
}
+ public void setTitleColorId(@ColorRes int titleColorId) {
+ this.titleColorId = titleColorId;
+ titleTv.setTextColor(ContextCompat.getColor(titleTv.getContext(), titleColorId));
+ }
+
@Override
public void inflate(Context context, ViewGroup container, boolean nightMode) {
super.inflate(context, container, nightMode);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
index 8ca4160364..a9c18346c0 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java
@@ -1,14 +1,18 @@
package net.osmand.plus.monitoring;
import android.content.Intent;
+import android.graphics.Typeface;
import android.support.v4.app.FragmentManager;
import android.support.v7.preference.Preference;
+import android.text.SpannableString;
+import android.text.SpannableStringBuilder;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
+import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.myplaces.FavoritesActivity;
import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet;
import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet.CopyAppModePrefsListener;
@@ -16,8 +20,10 @@ import net.osmand.plus.settings.BaseSettingsFragment;
import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet;
import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet;
import net.osmand.plus.settings.bottomsheets.ResetProfilePrefsBottomSheet.ResetAppModePrefsListener;
+import net.osmand.plus.settings.bottomsheets.SingleSelectPreferenceBottomSheet;
import net.osmand.plus.settings.preferences.ListPreferenceEx;
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
+import net.osmand.plus.widgets.style.CustomTypefaceSpan;
import java.io.Serializable;
@@ -95,7 +101,14 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements
ListPreferenceEx saveTrackMinDistance = (ListPreferenceEx) findPreference(settings.SAVE_TRACK_MIN_DISTANCE.getId());
saveTrackMinDistance.setEntries(entries);
saveTrackMinDistance.setEntryValues(entryValues);
- saveTrackMinDistance.setDescription(R.string.save_track_min_distance_descr);
+
+ SpannableStringBuilder stringBuilder = new SpannableStringBuilder(getString(R.string.monitoring_min_distance_descr));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_distance_descr_side_effect));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_distance_descr_recommendation));
+
+ saveTrackMinDistance.setDescription(stringBuilder.toString());
}
private void setupSaveTrackPrecisionPref() {
@@ -109,7 +122,16 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements
ListPreferenceEx saveTrackPrecision = (ListPreferenceEx) findPreference(settings.SAVE_TRACK_PRECISION.getId());
saveTrackPrecision.setEntries(entries);
saveTrackPrecision.setEntryValues(entryValues);
- saveTrackPrecision.setDescription(R.string.save_track_precision_descr);
+
+ SpannableStringBuilder stringBuilder = new SpannableStringBuilder(getString(R.string.monitoring_min_accuracy_descr));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_accuracy_descr_side_effect));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_accuracy_descr_recommendation));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_accuracy_descr_remark));
+
+ saveTrackPrecision.setDescription(stringBuilder.toString());
}
private void setupSaveTrackMinSpeedPref() {
@@ -125,7 +147,16 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements
ListPreferenceEx saveTrackMinSpeed = (ListPreferenceEx) findPreference(settings.SAVE_TRACK_MIN_SPEED.getId());
saveTrackMinSpeed.setEntries(entries);
saveTrackMinSpeed.setEntryValues(entryValues);
- saveTrackMinSpeed.setDescription(R.string.save_track_min_speed_descr);
+
+ SpannableStringBuilder stringBuilder = new SpannableStringBuilder(getString(R.string.monitoring_min_speed_descr));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_speed_descr_side_effect));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_speed_descr_recommendation));
+ stringBuilder.append("\n");
+ stringBuilder.append(getString(R.string.monitoring_min_speed_descr_remark));
+
+ saveTrackMinSpeed.setDescription(stringBuilder.toString());
}
private void setupAutoSplitRecordingPref() {
@@ -170,8 +201,16 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements
}
private void setupOpenNotesDescrPref() {
- Preference nameAndPasswordPref = findPreference("open_tracks_description");
- nameAndPasswordPref.setTitle(getText(R.string.tracks_view_descr));
+ String tracksPath = getString(R.string.tracks_view_path);
+ String tracksPathDescr = getString(R.string.tracks_view_descr, tracksPath);
+
+ int startIndex = tracksPathDescr.indexOf(tracksPath);
+ SpannableString titleSpan = new SpannableString(tracksPathDescr);
+ Typeface typeface = FontCache.getRobotoMedium(getContext());
+ titleSpan.setSpan(new CustomTypefaceSpan(typeface), startIndex, startIndex + tracksPath.length(), 0);
+
+ Preference openTracksDescription = findPreference("open_tracks_description");
+ openTracksDescription.setTitle(titleSpan);
}
private void setupOpenNotesPref() {
@@ -230,6 +269,22 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements
return true;
}
+ @Override
+ public void onDisplayPreferenceDialog(Preference preference) {
+ String prefId = preference.getKey();
+ if (settings.SAVE_TRACK_MIN_DISTANCE.getId().equals(prefId)
+ || settings.SAVE_TRACK_PRECISION.getId().equals(prefId)
+ || settings.SAVE_TRACK_MIN_SPEED.getId().equals(prefId)) {
+ FragmentManager fm = getFragmentManager();
+ if (fm != null) {
+ ApplicationMode appMode = getSelectedAppMode();
+ SingleSelectPreferenceBottomSheet.showInstance(fm, prefId, this, false, appMode, true, true);
+ }
+ } else {
+ super.onDisplayPreferenceDialog(preference);
+ }
+ }
+
@Override
public void copyAppModePrefs(ApplicationMode appMode) {
OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index d680cc1d50..42f395deb2 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -73,6 +73,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
pluginPreferences.add(settings.SHOW_TRIP_REC_NOTIFICATION);
pluginPreferences.add(settings.TRACK_STORAGE_DIRECTORY);
pluginPreferences.add(settings.LIVE_MONITORING);
+ pluginPreferences.add(settings.LIVE_MONITORING_URL);
+ pluginPreferences.add(settings.LIVE_MONITORING_INTERVAL);
+ pluginPreferences.add(settings.LIVE_MONITORING_MAX_INTERVAL_TO_SEND);
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
index f2240fa74f..b7c4bd5aaa 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
@@ -1,8 +1,10 @@
package net.osmand.plus.osmedit;
import android.content.Intent;
+import android.graphics.Typeface;
import android.support.v4.app.FragmentManager;
import android.support.v7.preference.Preference;
+import android.text.SpannableString;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
@@ -10,10 +12,12 @@ import android.widget.TextView;
import net.osmand.plus.OsmAndAppCustomization;
import net.osmand.plus.R;
import net.osmand.plus.helpers.AndroidUiHelper;
+import net.osmand.plus.helpers.FontCache;
import net.osmand.plus.settings.BaseSettingsFragment;
import net.osmand.plus.settings.OnPreferenceChanged;
import net.osmand.plus.settings.bottomsheets.OsmLoginDataBottomSheet;
import net.osmand.plus.settings.preferences.SwitchPreferenceEx;
+import net.osmand.plus.widgets.style.CustomTypefaceSpan;
public class OsmEditingFragment extends BaseSettingsFragment implements OnPreferenceChanged {
@@ -22,8 +26,8 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
@Override
protected void setupPreferences() {
- Preference vehicleParametersInfo = findPreference("osm_editing_info");
- vehicleParametersInfo.setIcon(getContentIcon(R.drawable.ic_action_info_dark));
+ Preference osmEditingInfo = findPreference("osm_editing_info");
+ osmEditingInfo.setIcon(getContentIcon(R.drawable.ic_action_info_dark));
setupNameAndPasswordPref();
setupOfflineEditingPref();
@@ -52,8 +56,16 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
}
private void setupOsmEditsDescrPref() {
- Preference nameAndPasswordPref = findPreference("osm_edits_description");
- nameAndPasswordPref.setTitle(getText(R.string.osm_edits_view_descr));
+ String osmEditsPath = getString(R.string.osm_edits_view_path);
+ String osmEditsPathDescr = getString(R.string.osm_edits_view_descr, osmEditsPath);
+
+ int startIndex = osmEditsPathDescr.indexOf(osmEditsPath);
+ SpannableString titleSpan = new SpannableString(osmEditsPathDescr);
+ Typeface typeface = FontCache.getRobotoMedium(getContext());
+ titleSpan.setSpan(new CustomTypefaceSpan(typeface), startIndex, startIndex + osmEditsPath.length(), 0);
+
+ Preference osmEditsDescription = findPreference("osm_edits_description");
+ osmEditsDescription.setTitle(titleSpan);
}
private void setupOsmEditsPref() {
diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java
index 67333b2068..150b05f90c 100644
--- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java
@@ -309,7 +309,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
ApplicationMode appMode = getSelectedAppMode();
if (preference instanceof ListPreferenceEx) {
- SingleSelectPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent);
+ SingleSelectPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent, false);
} else if (preference instanceof SwitchPreferenceEx) {
BooleanPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent);
} else if (preference instanceof EditTextPreference) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java b/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java
index 14a266dab4..33a1a0ab1e 100644
--- a/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/LiveMonitoringFragment.java
@@ -30,6 +30,9 @@ public class LiveMonitoringFragment extends BaseSettingsFragment {
@Override
protected void setupPreferences() {
+ Preference liveMonitoringInfo = findPreference("live_monitoring_info");
+ liveMonitoringInfo.setIconSpaceReserved(false);
+
setupLiveMonitoringUrlPref();
setupLiveMonitoringIntervalPref();
setupLiveMonitoringBufferPref();
@@ -86,9 +89,17 @@ public class LiveMonitoringFragment extends BaseSettingsFragment {
}
private void setupLiveMonitoringUrlPref() {
+ ApplicationMode appMode = getSelectedAppMode();
+ String summary;
+ if (settings.LIVE_MONITORING_URL.isSetForMode(appMode)) {
+ summary = settings.LIVE_MONITORING_URL.getModeValue(appMode);
+ } else {
+ summary = getString(R.string.shared_string_disabled);
+ }
+
EditTextPreferenceEx liveMonitoringUrl = (EditTextPreferenceEx) findPreference(settings.LIVE_MONITORING_URL.getId());
- liveMonitoringUrl.setSummary(settings.LIVE_MONITORING_URL.getModeValue(getSelectedAppMode()));
- liveMonitoringUrl.setDescription(R.string.live_monitoring_m_descr);
+ liveMonitoringUrl.setSummary(summary);
+ liveMonitoringUrl.setDescription(R.string.live_monitoring_adress_descr);
liveMonitoringUrl.setIcon(getContentIcon(R.drawable.ic_world_globe_dark));
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
index 5214ff217b..b4b71d82d0 100644
--- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
@@ -206,7 +206,6 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
switchPreferenceEx.setIcon(getRoutingPrefIcon(p.getId()));
switchPreferenceEx.setSummaryOn(R.string.shared_string_on);
switchPreferenceEx.setSummaryOff(R.string.shared_string_off);
- switchPreferenceEx.setIconSpaceReserved(true);
screen.addPreference(switchPreferenceEx);
} else {
@@ -221,7 +220,6 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
ListPreferenceEx listPreferenceEx = (ListPreferenceEx) createListPreferenceEx(pref.getId(), p.getPossibleValueDescriptions(), svlss, title, R.layout.preference_with_descr);
listPreferenceEx.setDescription(description);
listPreferenceEx.setIcon(getRoutingPrefIcon(p.getId()));
- listPreferenceEx.setIconSpaceReserved(true);
screen.addPreference(listPreferenceEx);
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java
index a1b7554778..3fb6daaff8 100644
--- a/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/VoiceAnnouncesFragment.java
@@ -191,13 +191,11 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment {
//AudioManager.USE_DEFAULT_STREAM_TYPE};
ListPreferenceEx audioStreamGuidance = createListPreferenceEx(settings.AUDIO_STREAM_GUIDANCE.getId(), streamTypes, streamIntTypes, R.string.choose_audio_stream, R.layout.preference_with_descr);
- audioStreamGuidance.setIconSpaceReserved(true);
getPreferenceScreen().addPreference(audioStreamGuidance);
}
private void setupInterruptMusicPref() {
Preference interruptMusicPref = createSwitchPreference(settings.INTERRUPT_MUSIC, R.string.interrupt_music, R.string.interrupt_music_descr, R.layout.preference_switch_with_descr);
- interruptMusicPref.setIconSpaceReserved(true);
getPreferenceScreen().addPreference(interruptMusicPref);
}
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
index 4424caf406..d49becc246 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/BooleanPreferenceBottomSheet.java
@@ -8,7 +8,6 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
-import android.view.ContextThemeWrapper;
import android.view.View;
import net.osmand.AndroidUtils;
@@ -56,13 +55,16 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
final OsmandSettings.BooleanPreference pref = (BooleanPreference) preference;
final String on = getString(R.string.shared_string_on);
final String off = getString(R.string.shared_string_off);
+ final int activeColor = AndroidUtils.resolveAttribute(app, R.attr.active_color_basic);
+ final int disabledColor = AndroidUtils.resolveAttribute(app, android.R.attr.textColorSecondary);
boolean checked = pref.getModeValue(getAppMode());
final BottomSheetItemWithCompoundButton[] preferenceBtn = new BottomSheetItemWithCompoundButton[1];
preferenceBtn[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
.setChecked(checked)
.setTitle(checked ? on : off)
- .setCustomView(getCustomButtonView())
+ .setTitleColorId(checked ? activeColor : disabledColor)
+ .setCustomView(getCustomButtonView(checked))
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -71,6 +73,8 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
switchPreference.setChecked(newValue);
preferenceBtn[0].setTitle(newValue ? on : off);
preferenceBtn[0].setChecked(newValue);
+ preferenceBtn[0].setTitleColorId(newValue ? activeColor : disabledColor);
+ updateCustomButtonView(v, newValue);
Fragment target = getTargetFragment();
if (target instanceof OnPreferenceChanged) {
@@ -97,18 +101,24 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
@Override
protected int getDismissButtonTextId() {
- return R.string.shared_string_close;
+ return R.string.shared_string_cancel;
}
- private View getCustomButtonView() {
+ private View getCustomButtonView(boolean checked) {
+ View customView = UiUtilities.getInflater(getContext(), nightMode).inflate(R.layout.bottom_sheet_item_preference_switch, null);
+ updateCustomButtonView(customView, checked);
+
+ return customView;
+ }
+
+ private void updateCustomButtonView(View customView, boolean checked) {
OsmandApplication app = requiredMyApplication();
- View customView = View.inflate(new ContextThemeWrapper(app, themeRes), R.layout.bottom_sheet_item_preference_switch, null);
View buttonView = customView.findViewById(R.id.button_container);
int colorRes = getAppMode().getIconColorInfo().getColor(nightMode);
- int color = getResolvedColor(colorRes);
- int bgColor = UiUtilities.getColorWithAlpha(color, 0.1f);
- int selectedColor = UiUtilities.getColorWithAlpha(color, 0.3f);
+ int color = checked ? getResolvedColor(colorRes) : AndroidUtils.getColorFromAttr(app, R.attr.divider_color_basic);
+ int bgColor = UiUtilities.getColorWithAlpha(color, checked ? 0.1f : 0.5f);
+ int selectedColor = UiUtilities.getColorWithAlpha(color, checked ? 0.3f : 0.5f);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
int bgResId = R.drawable.rectangle_rounded_right;
@@ -123,8 +133,6 @@ public class BooleanPreferenceBottomSheet extends BasePreferenceBottomSheet {
Drawable bgDrawable = app.getUIUtilities().getPaintedIcon(bgResId, bgColor);
AndroidUtils.setBackground(buttonView, bgDrawable);
}
-
- return customView;
}
private SwitchPreferenceEx getSwitchPreferenceEx() {
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java
index 0938a0548b..81f6675afb 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java
@@ -6,17 +6,20 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
+import android.view.View;
import android.widget.EditText;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities;
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
-import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.settings.OnPreferenceChanged;
import net.osmand.plus.settings.preferences.EditTextPreferenceEx;
import net.osmand.util.Algorithms;
+import studio.carbonylgroup.textfieldboxes.TextFieldBoxes;
+
public class EditTextPreferenceBottomSheet extends BasePreferenceBottomSheet {
public static final String TAG = EditTextPreferenceBottomSheet.class.getSimpleName();
@@ -41,13 +44,15 @@ public class EditTextPreferenceBottomSheet extends BasePreferenceBottomSheet {
text = editTextPreference.getText();
}
- editText = new EditText(ctx);
+ View view = UiUtilities.getInflater(ctx, nightMode).inflate(R.layout.preference_edit_text_box, null);
+ editText = view.findViewById(R.id.edit_text);
editText.setText(text);
- items.add(new SimpleBottomSheetItem.Builder().setCustomView(editText).create());
+ items.add(new SimpleBottomSheetItem.Builder().setCustomView(view).create());
String description = editTextPreference.getDescription();
if (!Algorithms.isEmpty(description)) {
- items.add(new LongDescriptionItem(description));
+ TextFieldBoxes textFieldBoxes = view.findViewById(R.id.text_field_box);
+ textFieldBoxes.setHelperText(description);
}
}
@@ -59,7 +64,7 @@ public class EditTextPreferenceBottomSheet extends BasePreferenceBottomSheet {
@Override
protected int getDismissButtonTextId() {
- return R.string.shared_string_close;
+ return R.string.shared_string_cancel;
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java
index 2d28911855..833276f3cb 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/SingleSelectPreferenceBottomSheet.java
@@ -12,8 +12,9 @@ import net.osmand.AndroidUtils;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.R;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
+import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemTitleWithDescrAndButton;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
-import net.osmand.plus.base.bottomsheetmenu.simpleitems.LongDescriptionItem;
+import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.settings.OnPreferenceChanged;
import net.osmand.plus.settings.preferences.ListPreferenceEx;
@@ -24,10 +25,14 @@ public class SingleSelectPreferenceBottomSheet extends BasePreferenceBottomSheet
public static final String TAG = SingleSelectPreferenceBottomSheet.class.getSimpleName();
private static final String SELECTED_ENTRY_INDEX_KEY = "selected_entry_index_key";
+ private static final String USE_COLLAPSIBLE_DESCRIPTION = "use_collapsible_description";
+ private static final int COLLAPSED_DESCRIPTION_LINES = 4;
private ListPreferenceEx listPreference;
private int selectedEntryIndex = -1;
+ private boolean descriptionExpanded;
+ private boolean collapsibleDescription;
@Override
public void createMenuItems(Bundle savedInstanceState) {
@@ -36,8 +41,13 @@ public class SingleSelectPreferenceBottomSheet extends BasePreferenceBottomSheet
if (ctx == null || listPreference == null || listPreference.getEntries() == null || listPreference.getEntryValues() == null) {
return;
}
+ Bundle args = getArguments();
+ if (args != null && args.containsKey(USE_COLLAPSIBLE_DESCRIPTION)) {
+ collapsibleDescription = args.getBoolean(USE_COLLAPSIBLE_DESCRIPTION);
+ }
if (savedInstanceState != null) {
selectedEntryIndex = savedInstanceState.getInt(SELECTED_ENTRY_INDEX_KEY);
+ collapsibleDescription = savedInstanceState.getBoolean(USE_COLLAPSIBLE_DESCRIPTION);
} else {
selectedEntryIndex = listPreference.findIndexOfValue(listPreference.getValue());
}
@@ -47,7 +57,7 @@ public class SingleSelectPreferenceBottomSheet extends BasePreferenceBottomSheet
String description = listPreference.getDescription();
if (!Algorithms.isEmpty(description)) {
- items.add(new LongDescriptionItem(description));
+ buildDescriptionItem(ctx, description);
}
String[] entries = listPreference.getEntries();
@@ -83,11 +93,12 @@ public class SingleSelectPreferenceBottomSheet extends BasePreferenceBottomSheet
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(SELECTED_ENTRY_INDEX_KEY, selectedEntryIndex);
+ outState.putBoolean(USE_COLLAPSIBLE_DESCRIPTION, collapsibleDescription);
}
@Override
protected int getDismissButtonTextId() {
- return R.string.shared_string_close;
+ return R.string.shared_string_cancel;
}
@Override
@@ -125,11 +136,41 @@ public class SingleSelectPreferenceBottomSheet extends BasePreferenceBottomSheet
return (ListPreferenceEx) getPreference();
}
- public static boolean showInstance(@NonNull FragmentManager fragmentManager, String key, Fragment target,
- boolean usedOnMap, @Nullable ApplicationMode appMode, boolean profileDependent) {
+ private void buildDescriptionItem(Context ctx, String description) {
+ if (collapsibleDescription) {
+ final BottomSheetItemTitleWithDescrAndButton[] preferenceDescription = new BottomSheetItemTitleWithDescrAndButton[1];
+ preferenceDescription[0] = (BottomSheetItemTitleWithDescrAndButton) new BottomSheetItemTitleWithDescrAndButton.Builder()
+ .setButtonTitle(getString(R.string.shared_string_read_more))
+ .setButtonTextColor(AndroidUtils.resolveAttribute(ctx, R.attr.active_color_basic))
+ .setOnButtonClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ descriptionExpanded = !descriptionExpanded;
+ int maxLines = descriptionExpanded ? Integer.MAX_VALUE : COLLAPSED_DESCRIPTION_LINES;
+ preferenceDescription[0].setDescriptionMaxLines(maxLines);
+ setupHeightAndBackground(getView());
+ }
+ })
+ .setDescriptionMaxLines(COLLAPSED_DESCRIPTION_LINES)
+ .setDescription(description)
+ .setLayoutId(R.layout.bottom_sheet_item_with_expandable_descr)
+ .create();
+ items.add(preferenceDescription[0]);
+ } else {
+ BaseBottomSheetItem preferenceDescription = new BottomSheetItemWithDescription.Builder()
+ .setDescription(description)
+ .setLayoutId(R.layout.bottom_sheet_item_preference_descr)
+ .create();
+ items.add(preferenceDescription);
+ }
+ }
+
+ public static boolean showInstance(@NonNull FragmentManager fragmentManager, String key, Fragment target, boolean usedOnMap,
+ @Nullable ApplicationMode appMode, boolean profileDependent, boolean collapsibleDescription) {
try {
Bundle args = new Bundle();
args.putString(PREFERENCE_ID, key);
+ args.putBoolean(USE_COLLAPSIBLE_DESCRIPTION, collapsibleDescription);
SingleSelectPreferenceBottomSheet fragment = new SingleSelectPreferenceBottomSheet();
fragment.setArguments(args);