diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
index a729fc3345..a26220193c 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
@@ -1026,7 +1026,7 @@ public class RouteResultPreparation {
return MAX_SPEAK_PRIORITY;
}
if (highway.endsWith("_link") || highway.endsWith("unclassified") || highway.endsWith("road")
- || highway.endsWith("living_street") || highway.endsWith("residential") ) {
+ || highway.endsWith("living_street") || highway.endsWith("residential") || highway.endsWith("tertiary") ) {
return 1;
}
return 0;
diff --git a/OsmAnd/res/drawable-hdpi/ic_action_openstreetmap_logo.png b/OsmAnd/res/drawable-hdpi/ic_action_openstreetmap_logo.png
old mode 100755
new mode 100644
index a1a2c1b061..9eb04b9eaf
Binary files a/OsmAnd/res/drawable-hdpi/ic_action_openstreetmap_logo.png and b/OsmAnd/res/drawable-hdpi/ic_action_openstreetmap_logo.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_action_utv.png b/OsmAnd/res/drawable-hdpi/ic_action_utv.png
old mode 100755
new mode 100644
index c6e51e8629..7c34c8c326
Binary files a/OsmAnd/res/drawable-hdpi/ic_action_utv.png and b/OsmAnd/res/drawable-hdpi/ic_action_utv.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_action_width_limit.png b/OsmAnd/res/drawable-hdpi/ic_action_width_limit.png
old mode 100755
new mode 100644
index 46461d5fbe..9e26514e13
Binary files a/OsmAnd/res/drawable-hdpi/ic_action_width_limit.png and b/OsmAnd/res/drawable-hdpi/ic_action_width_limit.png differ
diff --git a/OsmAnd/res/drawable-hdpi/ic_sdcard.png b/OsmAnd/res/drawable-hdpi/ic_sdcard.png
index b8b5e25574..c72f6aec99 100644
Binary files a/OsmAnd/res/drawable-hdpi/ic_sdcard.png and b/OsmAnd/res/drawable-hdpi/ic_sdcard.png differ
diff --git a/OsmAnd/res/drawable-hdpi/map_action_utv.png b/OsmAnd/res/drawable-hdpi/map_action_utv.png
new file mode 100644
index 0000000000..7c34c8c326
Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-large-hdpi/map_action_utv.png b/OsmAnd/res/drawable-large-hdpi/map_action_utv.png
new file mode 100755
index 0000000000..6bf13b2a85
Binary files /dev/null and b/OsmAnd/res/drawable-large-hdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-large-xhdpi/map_action_utv.png b/OsmAnd/res/drawable-large-xhdpi/map_action_utv.png
new file mode 100755
index 0000000000..e93b45be5c
Binary files /dev/null and b/OsmAnd/res/drawable-large-xhdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-large/map_action_utv.png b/OsmAnd/res/drawable-large/map_action_utv.png
new file mode 100755
index 0000000000..7c34c8c326
Binary files /dev/null and b/OsmAnd/res/drawable-large/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_action_width_limit.png b/OsmAnd/res/drawable-mdpi/ic_action_width_limit.png
index d462b87538..a55525dc2b 100755
Binary files a/OsmAnd/res/drawable-mdpi/ic_action_width_limit.png and b/OsmAnd/res/drawable-mdpi/ic_action_width_limit.png differ
diff --git a/OsmAnd/res/drawable-mdpi/map_action_utv.png b/OsmAnd/res/drawable-mdpi/map_action_utv.png
new file mode 100755
index 0000000000..c65fd59dfa
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_width_limit.png b/OsmAnd/res/drawable-xhdpi/ic_action_width_limit.png
index 72825af54a..ccdd283c09 100755
Binary files a/OsmAnd/res/drawable-xhdpi/ic_action_width_limit.png and b/OsmAnd/res/drawable-xhdpi/ic_action_width_limit.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/map_action_utv.png b/OsmAnd/res/drawable-xhdpi/map_action_utv.png
new file mode 100755
index 0000000000..6bf13b2a85
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_width_limit.png b/OsmAnd/res/drawable-xxhdpi/ic_action_width_limit.png
index 2448d65224..ae27e1df86 100755
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_action_width_limit.png and b/OsmAnd/res/drawable-xxhdpi/ic_action_width_limit.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/map_action_utv.png b/OsmAnd/res/drawable-xxhdpi/map_action_utv.png
new file mode 100755
index 0000000000..e93b45be5c
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/ic_action_width_limit.png b/OsmAnd/res/drawable-xxxhdpi/ic_action_width_limit.png
index e44daa91d1..7bd5635afd 100755
Binary files a/OsmAnd/res/drawable-xxxhdpi/ic_action_width_limit.png and b/OsmAnd/res/drawable-xxxhdpi/ic_action_width_limit.png differ
diff --git a/OsmAnd/res/drawable-xxxhdpi/map_action_utv.png b/OsmAnd/res/drawable-xxxhdpi/map_action_utv.png
new file mode 100755
index 0000000000..8d9b9aab8e
Binary files /dev/null and b/OsmAnd/res/drawable-xxxhdpi/map_action_utv.png differ
diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml
index 42b8347a51..671273fae8 100644
--- a/OsmAnd/res/values-ca/strings.xml
+++ b/OsmAnd/res/values-ca/strings.xml
@@ -3274,4 +3274,9 @@ Abasta l\'àrea: %1$s x %2$s
Voleu canviar la carpeta de dades de OsmAnd\?
Desplaça a la nova destinació
Evita determinades rutes i tipus de carretera
+ Emmagatzematge intern, amagat a l\'usuari i a les altres aplicacions, de manera que només OsmAnd pot accedir a les vostres dades
+ Canvia la carpeta d\'emmagatzematge de dades
+ Parc de neu
+ Trineu
+ Costat a costat
\ No newline at end of file
diff --git a/OsmAnd/res/values-da/phrases.xml b/OsmAnd/res/values-da/phrases.xml
index 96623f093e..3fd7bbab3e 100644
--- a/OsmAnd/res/values-da/phrases.xml
+++ b/OsmAnd/res/values-da/phrases.xml
@@ -3733,4 +3733,6 @@
Gulvlægger
Bager
Møbelsnedker
+ Gebyr
+ Kæledyrspleje
\ No newline at end of file
diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index 30b7a82f6c..cf4197ffb3 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -3330,4 +3330,12 @@ Repræsenterer område: %1$s x %2$s
Side om side
Lift
Forbindelse
+ Beregn
+ OsmAnd brug
+ Fliser
+ Kort
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-de/phrases.xml b/OsmAnd/res/values-de/phrases.xml
index fd6d16c80c..317f61899e 100644
--- a/OsmAnd/res/values-de/phrases.xml
+++ b/OsmAnd/res/values-de/phrases.xml
@@ -3728,4 +3728,6 @@
Bodenleger
Backstube
Möbeltischler
+ Gebühr
+ Haustierpflege
\ No newline at end of file
diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml
index 1ee70e4e61..36255ab83c 100644
--- a/OsmAnd/res/values-de/strings.xml
+++ b/OsmAnd/res/values-de/strings.xml
@@ -2460,8 +2460,13 @@ Abgedeckte Fläche: %1$s x %2$s
max/min
Zurücksetzen
Aufstieg/Abstieg
+ Track Speicherort
+ Tracks können im Rec Ordner oder in Monats- bzw. Tagesordnern gespeichert werden.
+ Aufgezeichnete Tracks im Rec Ordner speichern
Aufgezeichnete Tracks in Monatsordnern speichern
Aufgezeichnete Tracks in nach Aufzeichnungsmonat benannten Unterordnern speichern (z. B. 2018-01).
+ Aufgezeichnete Tracks in Tagesordnern speichern
+ Aufgezeichnete Tracks in nach Aufzeichnungstag benannten Unterordnern speichern (z. B. 2018-01).
Zirkel
%1$d von %2$d
Zeit in Bewegung
@@ -3327,4 +3332,14 @@ Abgedeckte Fläche: %1$s x %2$s
Breitenbegrenzung
Geben Sie die zulässige Fahrzeugbreitenbegrenzung auf Routen an.
Vermeiden von bestimmten Routen und Straßentypen
+ Nebeneinander
+ Seilbahn
+ Verbindung
+ Berechnen
+ OsmAnd Nutzung
+ Karten
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-eo/phrases.xml b/OsmAnd/res/values-eo/phrases.xml
index 74b5feb220..419ba8910e 100644
--- a/OsmAnd/res/values-eo/phrases.xml
+++ b/OsmAnd/res/values-eo/phrases.xml
@@ -3719,4 +3719,5 @@
Bakejo (ne vendejo)
Laborejo de meblisto
Pago
+ Dombesta beligejo
\ No newline at end of file
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index 8312a66b22..d3b607b0f0 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -3285,7 +3285,7 @@ Indikas lokon: %1$s x %2$s"
glitveturado (tirata de hundoj)
glitveturado (motora)
marŝado
- konekto
+ ligilo
ski‑ekskurso
alpa (malsuprenira)
nordia (skikurada)
@@ -3302,4 +3302,15 @@ Indikas lokon: %1$s x %2$s"
Limigo de larĝo
Difini permesatan limigon de larĝo de veturilo.
Eviti difinitajn kursojn kaj specojn de vojoj
+ Ĉiuteren‑veturilo (UTV)
+ kablovojo
+ ligilo
+ Kalkuli
+ Uzado de OsmAnd
+ Kaheloj
+ Mapoj
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s kB
\ No newline at end of file
diff --git a/OsmAnd/res/values-es-rAR/phrases.xml b/OsmAnd/res/values-es-rAR/phrases.xml
index 3878487318..82e43f0106 100644
--- a/OsmAnd/res/values-es-rAR/phrases.xml
+++ b/OsmAnd/res/values-es-rAR/phrases.xml
@@ -3733,4 +3733,5 @@
Taller de panadería
Ebanista
Cargo
+ Cuidado de mascotas
\ No newline at end of file
diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml
index d872a49972..d1c1926c80 100644
--- a/OsmAnd/res/values-es-rAR/strings.xml
+++ b/OsmAnd/res/values-es-rAR/strings.xml
@@ -3324,4 +3324,12 @@ Lon %2$s
En paralelo
Vía aérea
Conexión
+ Calcular
+ Uso de OsmAnd
+ Teselas
+ Mapas
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-fr/phrases.xml b/OsmAnd/res/values-fr/phrases.xml
index 48722b30ba..6f1428418c 100644
--- a/OsmAnd/res/values-fr/phrases.xml
+++ b/OsmAnd/res/values-fr/phrases.xml
@@ -3632,4 +3632,14 @@
Oui
Accès conçu pour les fauteuils roulants
Oui
+ suspendu
+ accès-voiture :
+ accès-voiture : privé
+ accès-voiture : impossible
+ accès-voiture : possible
+ accès-voiture : clients
+ accès-voiture : autorisé
+ Accès-voiture : privé
+ Accès-véhicules : livraison
+ Accès-véhicules : agricoles
\ No newline at end of file
diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml
index 6399872a1e..d165c0bba5 100644
--- a/OsmAnd/res/values-fr/strings.xml
+++ b/OsmAnd/res/values-fr/strings.xml
@@ -3291,4 +3291,13 @@ représentant la zone : %1$s x %2$s
Éviter certains types de route
Côte à côte
Connexion
+ Transport aérien
+ Calculer
+ Utilisation d\'OsmAnd
+ Tuiles
+ Cartes
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-gl/phrases.xml b/OsmAnd/res/values-gl/phrases.xml
index ab68acf01a..1e11d33972 100644
--- a/OsmAnd/res/values-gl/phrases.xml
+++ b/OsmAnd/res/values-gl/phrases.xml
@@ -3718,4 +3718,6 @@
Construtor de chans
Obradoiro de panadaría
Ebanista
+ Carga
+ Coidado de mascotas
\ No newline at end of file
diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml
index d4c1889786..4a21e7da89 100644
--- a/OsmAnd/res/values-gl/strings.xml
+++ b/OsmAnd/res/values-gl/strings.xml
@@ -3362,4 +3362,15 @@ Lon %2$s
Límite de largura
Especifica o límite permitido de largura do vehículo nas rutas.
Evitar certas rutas e tipos de estradas
+ Lado a lado
+ Vía aeroportuaria
+ Conexión
+ Calcular
+ Uso do OsmAnd
+ Teselas
+ Mapas
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml
index f77791f2a8..8dcbdf86a9 100644
--- a/OsmAnd/res/values-he/strings.xml
+++ b/OsmAnd/res/values-he/strings.xml
@@ -3307,4 +3307,15 @@
מגבלת רוחב
ציון מגבלת רוחב מכונית אפשרי בנתיבים.
הימנעות מסוגים מסוימים של מסלולים וכבישים
+ זה לצד זה
+ דרך אווירית
+ חיבור
+ חישוב
+ שימוש ב־OsmAnd
+ אריחים
+ מפות
+ %1$s ט״ב
+ %1$s ג״ב
+ %1$s מ״ב
+ %1$s ק״ב
\ No newline at end of file
diff --git a/OsmAnd/res/values-my/strings.xml b/OsmAnd/res/values-my/strings.xml
index 73e5da9f45..2aa9ae94a4 100644
--- a/OsmAnd/res/values-my/strings.xml
+++ b/OsmAnd/res/values-my/strings.xml
@@ -132,4 +132,121 @@
ဝါရင့်
အစွန်းရောက်
နှင်းတောင် ski အခက်အခဲ
+ ပန်းခရမ်းရောင်
+ မြေပုံတည်နေရာကိုပြောင်းလဲရန်နောက်တစ်ကြိမ်အသာပုတ်ပါ
+ မူလအရှိန် settings များကိုပြောင်းမြည်
+ အနှေး /အမြန်နှုန်း ကိုသတ်မှတ်ပါ
+ ပရိုဖိုင်းအသစ်
+ OsmAnd ၏နောက်ဆုံးပစ်လွှတ်မှုမအောင်မြင်ပါ ကျေးဇူးပြုပြီးကျွန်ုပ်တို့က OsmAnd ကိုတိုးတက်စေရန်အမှားသတင်းစကားကိုဝေမျှပါ။
+ နေ့
+ နေ့ရက်များ
+ နေ့ရက်များ
+ အပတ်
+ အပတ်များ
+ အပတ်များ
+ လ
+ လများ
+ လများ
+ နှစ်
+ နှစ်များ
+ နှစ်များ
+ သုံးလ
+ ပြီးရင် %1$s
+ ကြေးပေးသွင်းမှုကိုပယ်ဖျက်ပါ
+ OsmA အပြင်အဆင်များ
+ အခြားပရိုဖိုင်းမှကူးယူပါ
+ မျက်နှာပြင်ဖွင့်ပါ
+ လမ်းညွှန်နေစဉ်မြေပုံ
+ လမ်းညွှန်နေစဉ်မြေပုံ
+ အခြား
+ အလေးချိန်၊ အမြင့်၊ အမြန်နှုန်း
+ ယာဉ်သတ်မှတ်ချက်များ
+ အသံကြေငြာချက်များသည် လမ်းညွှန်အတွင်းသာလာမြည်။
+ လမ်းညွှန်ညွှန်ကြားချက်နှင့်ကြေငြာ
+ အသံကြေငြာ
+ ဖန်သားပြင်သတိပေးချက်များ
+ လမ်းကြောင်း parameters များကိုပြုပြင်ပါ
+ လမ်းကြောင်း parameters များ
+ လမ်းလျှောက်
+ tag ၏အများဆုံးအရှည်မှအက္ခရာာ %s လုံးဖြစ်သည်။
+\nကျေးဇူးပြုပြီးတိုပေးပါ။
+ လမ်းညွှန်ရန် မသုံးမြည့်ပြည်သူပို့ဆောင်ရေးအမျိုးအစားများကိုရွေးပါ။
+ ရှောင်ထားသောပို့ဆောင်ရေးအမျိုးအစားများ
+ ဒီဂရီ
+ Milliradians
+ လမ်းရထားများကိုရှောင်ပါ
+ လမ်းရထားများကိုရှောင်
+ ဘတ်စ်ကားများကိုရှောင်
+ ဘတ်စ်ကားနှင့် trolleyဘတ်စ်များကိုရှောင်
+ စုပေါင်းစီးတက္ကစီကိုရှောင်
+ စုပေါင်းစီးတက္ကစီကိုရှောင်
+ ရထားတွေကိုရှောင်
+ ရထားတွေကိုရှောင်
+ မြေအောက်ရထားတွေကိုရှောင်
+ မြေအောက်ရထားနှင့်ရထားများကိုရှောင်
+ သင်္ဘောများကိုရှောင်
+ သင်္ဘောများကိုရှောင်
+ log ပို့ပါ
+ %1$d ဖိုင်များ (%2$s) ပြောင်းထားသည်။
+ %1$d ဖိုင်များကို (%2$s) ကူးယူထားသည်။
+ မြေပုံများကိုရွှေ့ပါ
+ မရွှေ့ရ
+ ခြေလျင်ဖြင့်သွားသောလမ်းကြောင်းသည်ခန့်မှန်းခြေအားဖြင့် %1$s ဖြစ်ပြီးပြည်သူပို့ဆောင်ရေးထက်ပိုမြန်လိမ့်မည်
+ OsmAnd သည်သင်၏ဆက်တင်များနှင့်အံဝင်ခွင်ကျဖြစ်မည့်လမ်းကြောင်းကိုရှာမတွေ့ပါ။
+ လမ်းလျှောက်လမ်းကြောင်းကိုတွက်ချက်မြည်
+ သယ်ယူပို့ဆောင်ရေးအမျိုးအစား
+ GPS ရှာဖွေခြင်း
+ Coordinates ဝစ်ဂျက်
+ စက္ကန့် ၃၀လောက်အချိန်ပေးပြီး Google Play မှာ ကျွန်ုပ်တို့၏ application ကို သင်၏ထင်မြင်ချက်များ တင်ပြပေးပါ။
+ သတ်မှတ်ချက်
+ တစ်ကိုယ်ရေ မူဝါဒ
+ ကျွန်တော်တို့ရဲ့ OsmAnd ကိုပိုကောင်းအောင်ကူညီပါ!
+ သင်မျှဝေလိုသည့်အချက်အလက်အမျိုးအစားကိုရွေးချယ်ပါ။
+ ဒေါင်းလုပ်လုပ်ထားသောမြေပုံများ
+ သွားရောက်ကြည့်ရှုခဲ့ဖန်သားပြင်မျာ
+ မည်သည့် OsmAnd အင်္ဂါရပ်များသည်လူကြိုက်အများဆုံးဖြစ်ကြောင်းနားလည်ရန်ကျွန်ုပ်တို့ကိုကူညီပါ။
+ Allow ကိုနှိပ်ရင် ကျွန်ုပ်တို့၏ %1$s ကိုသင်သဘောတူသည်
+ မည်သည့်ဒေတာကိုကျွန်ုပ်တို့နှင့်မျှဝေနေသည်ကိုရွေးချယ်ပါ
+ ခွင့်ပြုပါ
+ လမ်းညွှန်အမျိုးအစား
+ တက္ကစီ
+ မြေအောက်ရထား
+ မြင်း
+ ရဟတ်ယာဉ်
+ ..osmand / routing တွင်သင့်ကိုယ်ပိုင်ပြင်ဆင်ထားသော routing.xml ဖိုင်ကို ထည့်သွင်းနိုင်သည်
+ နှင်းလျှောစီး
+ နှင်းလျှောစီး
+ သံလိုက်အိမ်မြှောင်ကိုဖော်ပြ
+ သံလိုက်အိမ်မြှောင်ကိုဖြောက်လိုက်
+ အိုင်ကွန်ကိုရွေးပါ
+ mode: %s
+ နှင်းလျှောစီး
+ အမျိုးအစား: %s
+ အခြေခံပရိုဖိုင်း
+ လမ်းညွှန်အမျိုးအစားကိုရွေးပါ
+ application ပရိုဖိုင်းအသစ်အတွက် လမ်းညွှန်အမျိုးအစားရွေးပါ
+ ပရိုဖိုင်းအမည်ရိုက်ထည့်ပါ
+ ပရိုဖိုင်းအမည်မှာဗလာမဖြစ်သင့်ပါ!
+ နာမည် နှခုထပ်
+ အဲဒီနာမည်နဲ့ပရိုဖိုင်းရှိပြီးသားဖြစ်သည်
+ OsmAnd ၏အခြေခံ ပရိုဖိုင်းများကိုဖျက်လို့မရပါ
+ ပြောင်းလဲမှုများကိုသိမ်းပါ
+ ရှေ့ဆက်မသွားမီပရိုဖိုင်းသို့ပြောင်းလဲမှုများကိုအရင်သိမ်းထားရန်လိုအပ်သည်
+ ပရိုဖိုင်းကိုဖျက်မည်
+ %s ပရိုဖိုင်းကိုသင်ဖျက်လိုကြောင်းသေချာပါလား
+ အခြေခံပရိုဖိုင်းကိုရွေးချယ်ပါ
+ လမ်းညွှန်အမျိုးအစားကိုရွေးပါ
+ ကား၊ ထရပ်ကား၊ ဆိုင်ကယ်
+ MTB, moped, မြင်း
+ လမ်းလျှောက်, တောင်တက်, အပြေး
+ ပြည်သူပို့ဆောင်ရေးအမျိုးအားလုံး
+ သင်္ဘော၊ လှေလှော်ခြင်း၊ ရွက်လွှင့်ခြင်း
+ လေယာဉ်ပျံ၊ စက်မဲ့လေယာဉ်ပျံ
+ Geocoding
+ လမ်းဖြောင့်
+ Osmand လမ်းကြောင်း
+ စိတ်တိုင်းကျလမ်းကြောင်းပရိုဖိုင်း
+ အထူးလမ်းကြောင်း
+ အက်ပလီကေးရှင်းထဲတွင်မြင်နိုင်သောပရိုဖိုင်းများကိုရွေးချယ်ပါ။
+ အက်ပလီကေးရှင်းပရိုဖိုင်းများ
diff --git a/OsmAnd/res/values-nb/strings.xml b/OsmAnd/res/values-nb/strings.xml
index 29dbc66597..bb90b8b01c 100644
--- a/OsmAnd/res/values-nb/strings.xml
+++ b/OsmAnd/res/values-nb/strings.xml
@@ -768,9 +768,9 @@
Vis noen vektorkartdetaljer (veier etc.) allerede ved lavere zoomnivåer.
Utdata for taleveiledning
Velg høyttaleren til å avspille taleveiledningen.
- Telefonanropslyd (også for å avbryte bluetooth-bilstereo)
+ Telefonanropslyd (for å avbryte Blåtanns-bilstereo)
Varslingslyd
- Media-/musikklyd
+ Media-/navigasjonslyd
Bruk rasterkart for alt utover dette nivået.
Minste vektorielle forstørrelsesnivå
ufullstendig
@@ -806,7 +806,7 @@
Rosa
Brun
Beregn rute mellom punkter
- Serbisk
+ Serbisk (kyrillisk)
Kinesisk (forenklet)
Kinesisk (tradisjonell)
Legg til som påfølgende reisemål
@@ -1761,7 +1761,7 @@
Nautisk mil i timen (knop)
Stopp simulering av din posisjon.
Simuler din posisjon ved bruk av en beregnet rute eller et GPX-spor som er tatt opp.
- GPX-fil med plasseringsnotater.
+ GPX-fil med plasseringer.
GPX-farge
Du har gamle, inkompatible Wikipediadata. Arkiver disse?
Last ned ytterligere Wikipedia-data (%1$s MB)?
@@ -2426,7 +2426,7 @@
Åpner
Uten navn
Laotisk
- Serbisk (Latin)
+ Serbisk (latinsk)
Interessepunktendringer i programmet påvirker ikke nedlastede kartfiler, endringer lagres som en fil på enheten din i stedet.
Eng. mil/fot
Eng. mil/yard
@@ -2901,7 +2901,7 @@
Kapasitet
Bredde
Høyde
- Klasse
+ Veitype
Overflate
Jevnhet
Stigning
@@ -3045,15 +3045,15 @@
Vurder
Personvernspraksis
Hjelp oss å forbedre OsmAnd.
- Tillat OsmAnd å samle inn og behandle anonym programbruksdata. Vi samler ikke inn eller lagrer data om din plassering, eller om plasseringene du ser på på kartet.
-\n
+ Tillat OsmAnd å samle inn og behandle anonym programbruksdata. Vi samler ikke inn eller lagrer data om din plassering, eller om plasseringer ser på på kartet.
+\n
\nDu kan alltid endre ditt valg i Innstillinger > Personvern og sikkerhet.
Velg hvilken type data du ønsker å dele:
Nedlastede kart
Besøkte skjermer
- Liste over data du ønsker å dele med OsmAnd.
- Denne dataen samles inn for å forstå hvilke kart og hvilke regioner og land som er mest populære.
- Denne dataen samles inn for å forstå hvilke funksjoner i OsmAnd som er mest populære.
+ Definer hvilken data du ønsker å dele med OsmAnd.
+ Hjelp oss å forstå hvilke kart over hvilke regioner og land som er mest populære.
+ Hjelp oss å forstå hvilke OsmAnd-funksjoner som er mest populære.
Ved å trykke \"Tillat\", samtykker du til vår %1$s
Personvern og sikkerhet
Velg data til deling
@@ -3064,7 +3064,7 @@
Drosje
Hest
Helikopter
- Du kan legge til din egen endrede versjon av routing.xml til i ..osmand/routing
+ Du kan legge til din egen endrede versjon av filen routing.xml til i ..osmand/routing
Skikjøring
Skikjøring
Vis kompasslinjal
@@ -3076,16 +3076,16 @@
Type: %s
Grunnprofil
Velg navigasjonstype
- Du må velge navigasjonstype for å opprette en ny programprofil
+ Du må velge navigasjonstype for den nye programprofilen
Skriv inn profilnavn
Profilnavn kan ikke være tomt.
Duplikatnavn
Det finnes allerede en profil med dette navnet
- Du kan ikke slette OsmAnd-grunnprofiler
+ Du kan ikke slette OsmAnd sine grunnprofiler
Lagre endringer
Du må lagre endringer før du kan fortsette
Slett profil
- Er du sikker på at du ønsker å slette profilen %s
+ Er du sikker på at du ønsker å slette %s-profilen
Velg grunnprofil
Velg navigasjonstype
Bil, lastebil, motorsykkel
@@ -3115,7 +3115,7 @@
OsmAnd nedlastingstjeneste
Magenta
Ikon
- Innsamlet data
+ Data innsamlet
Trykk igjen for å endre kartorientering
Terreng
Sett opp profil
@@ -3218,11 +3218,31 @@
Kjøretøyparameter
Skjermvarsler
Logcat-mellomlager
- ikoner, miniprogrammer
+ Kartutseende
Kartutseende
Programdrakt, enheter, region
Språk og utdata
Programtilleggsinnstillinger
Som forvalg
Last ned detaljert %s-kart, for å vise dette området.
+ Ingen
+ Flytt OsmAnd-datafiler til det nye målet\?
+\n%1$s > %2$s
+ %1$s • %2$s GB brukt
+ %1$s GB ledig • %2$s GB totalt
+ Velg mappe
+ Endre OsmAnd-datamappe\?
+ Flytt til det nye målet
+ Breddebegrensning
+ Velg tillatt kjøretøybredde på ruter.
+ Unngå visse ruter og veityper
+ Side om side
+ Beregn
+ OsmAnd-bruk
+ Flis
+ Kart
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml
index 8a8511848f..811961ea53 100644
--- a/OsmAnd/res/values-pl/strings.xml
+++ b/OsmAnd/res/values-pl/strings.xml
@@ -3300,8 +3300,8 @@ Reprezentuje obszar: %1$s x %2$s
Przenieść pliki danych OsmAnd do nowego położenia\?
\n%1$s > %2$s
Proszę wprowadzić ścieżkę do katalogu
- Wybierz folder
- Wklej ścieżkę do folderu z danymi OsmAnd
+ Wybierz katalog
+ Wklej ścieżkę do katalogu z danymi OsmAnd
Zmienić katalog danych OsmAnd\?
Przenieś do nowego miejsca przeznaczenia
Wewnętrzna pamięć masowa, ukryta przed użytkownikiem i innymi aplikacjami, dzięki czemu nikt oprócz OsmAnd nie może uzyskać dostępu do Twoich danych
@@ -3326,4 +3326,14 @@ Reprezentuje obszar: %1$s x %2$s
Granica szerokości
Określ dozwoloną szerokość pojazdu na trasach.
Unikaj określonych tras i typów dróg
+ Strona po stronie
+ Lotnisko
+ Połączenia
+ Oblicz
+ Użyj OsmAnd
+ Mapy
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-pt-rBR/phrases.xml b/OsmAnd/res/values-pt-rBR/phrases.xml
index a75996b810..3c12354352 100644
--- a/OsmAnd/res/values-pt-rBR/phrases.xml
+++ b/OsmAnd/res/values-pt-rBR/phrases.xml
@@ -3726,4 +3726,5 @@
Padaria
Marceneiro
Pagamento
+ Cuidado de animais
\ No newline at end of file
diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml
index 36d2a43aa6..020ee375b7 100644
--- a/OsmAnd/res/values-pt-rBR/strings.xml
+++ b/OsmAnd/res/values-pt-rBR/strings.xml
@@ -349,7 +349,7 @@
A fonte da quadrícula %1$s foi salva
Moderadores de tráfego
Rota a partir daqui
- Explorar
+ Explorar mapa
Dados de Áudio/Vídeo
Confirma que quer parar a navegação?
h
@@ -359,7 +359,7 @@
Todos
Marcos do trajeto
Baixar mapas que faltam %1$s (%2$d MB)?
- Explorar
+ Explorar mapa
Carro
Bicicleta
A pé
@@ -2582,7 +2582,7 @@ Pôr do Sol: %2$s
Notas OSM
Abre amanhã às
Rótulos POI
- desligado
+ fechado
Inverno e esqui
Vista de turismo
Náutico
@@ -3310,4 +3310,12 @@ Pôr do Sol: %2$s
Lado a lado
Maneira aérea
Conexão
+ Calcular
+ Uso do Osmand
+ Quadrículas
+ Mapas
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-pt/strings.xml b/OsmAnd/res/values-pt/strings.xml
index f98595c6d7..18aa6c6988 100644
--- a/OsmAnd/res/values-pt/strings.xml
+++ b/OsmAnd/res/values-pt/strings.xml
@@ -208,7 +208,7 @@
Interseção : {0} x {1} dans {2}
Edifício : {0}, {1}, {2}
Favorito
- Apagar tudo
+ Limpar tudo
Histórico
Enviando dados…
Enviando…
@@ -3318,4 +3318,14 @@
Limite de largura
Especifique o limite permitido de largura do veículo nas rotas.
Evitar determinadas categorias de rotas e estradas
+ Lado a Lado
+ Conexão
+ Calcular
+ Uso de OsmAnd
+ Azulejos
+ Mapas
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-ru/phrases.xml b/OsmAnd/res/values-ru/phrases.xml
index 120ba41887..4cf22c2798 100644
--- a/OsmAnd/res/values-ru/phrases.xml
+++ b/OsmAnd/res/values-ru/phrases.xml
@@ -603,7 +603,7 @@
Крематорий
Интернет-кафе;Интернет-салон;Киберкафе
Банк
- Банкомат
+ Банкомат
Ростовщик
Ломбард
Обмен валют
@@ -2426,7 +2426,7 @@
Надпись:З
Надпись:СЗ
В процессе строительства
- С банкоматом
+ С банкоматом;Банкомат
Без банкомата
Место для разведения огня
Распределительный шкаф
diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml
index 03258f785c..a63403b799 100644
--- a/OsmAnd/res/values-ru/strings.xml
+++ b/OsmAnd/res/values-ru/strings.xml
@@ -3059,11 +3059,11 @@
Переместить карты
Не перемещать
Маршрут пешком составляет примерно %1$s и он может быть быстрее, чем на общественном транспорте
- Политика конфиденциальности
+ политикой конфиденциальности
Помогите нам сделать OsmAnd лучше!
- Разрешить OsmAnd собирать и обрабатывать анонимные данные об использовании приложения. Мы не собираем и не храним данные о вашем местоположении или о местоположениях, которые вы просматриваете на карте.
-\n
-\nВы всегда можете изменить свой выбор в Настройки > Конфиденциальность и безопасность.
+ "Разрешите OsmAnd собирать и обрабатывать анонимные данные об использовании приложения. Мы не собираем и не храним данные о вашем местоположении или о любых местах, которые вы просматриваете на карте.
+\n
+\nВы можете изменить свой выбор в любое время в Настройки > Конфиденциальность и безопасность."
Выберите тип данных, которыми вы хотите поделиться:
Загруженные карты
Посещаемые экраны
@@ -3071,7 +3071,7 @@
Список данных, которыми вы хотите поделиться с OsmAnd.
Мы собираем эти данные, чтобы понять, какие регионы и страны наиболее популярны.
Мы собираем эти данные, чтобы понять какие функции OsmAnd наиболее популярны.
- Нажимая кнопку \"Разрешить\", вы соглашаетесь с нашими %1$s
+ Нажимая кнопку \"Разрешить\", вы соглашаетесь с нашей %1$s
Конфиденциальность и безопасность
Нет, спасибо
Разрешить
@@ -3224,7 +3224,7 @@
Профиль изменён на\"%s\"
Все приведенные ниже настройки относятся только к выбранному профилю.
Единицы измерения и форматы
- иконки, виджеты
+ Внешний вид карты
Список установленных плагинов
Тема приложения, единицы измерения, регион
Создание, импорт и редактирование профилей
@@ -3239,7 +3239,7 @@
Внешний вид
Настроить навигацию
Оповещения будут отображаться в левом нижнем углу экрана во время навигации.
- Влияет на всё приложение
+ Влияют на всё приложение
Настройки OsmAnd
Копировать из другого профиля
Включить экран
@@ -3258,4 +3258,15 @@
Язык и вывод
Переместите файлы данных OsmAnd в новое место назначения\?
\n%1$s > %2$s
+ По умолчанию
+ %1$s • Использовано %2$s ГБ
+ "Свободно %1$s • %2$s / %3$s ГБ"
+ Введите путь к папке
+ Выберите папку
+ Вставить путь к папке с данными OsmAnd
+ Изменить папку данных OsmAnd\?
+ Переместить в новое место назначения
+ Внутреннее хранилище, скрытое от пользователя и других приложений, поэтому никто, кроме OsmAnd не может получить доступ к вашим данным
+ Изменение папку хранения данных
+ Избегать определенные маршруты и типы дорог
\ No newline at end of file
diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml
index 3818b8a5b7..b89f80b51e 100644
--- a/OsmAnd/res/values-tr/strings.xml
+++ b/OsmAnd/res/values-tr/strings.xml
@@ -3271,4 +3271,15 @@
Genişlik sınırı
Rotalarda izin verilen araç genişlik sınırını belirtin.
Belirli rotalardan ve yol türlerinden kaçının
+ Yan yana
+ Hava yolu
+ Bağlantı
+ Hesapla
+ OsmAnd Kullanımı
+ Döşemeler
+ Haritalar
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values-zh-rTW/phrases.xml b/OsmAnd/res/values-zh-rTW/phrases.xml
index bb46dbff38..b40f5c9792 100644
--- a/OsmAnd/res/values-zh-rTW/phrases.xml
+++ b/OsmAnd/res/values-zh-rTW/phrases.xml
@@ -2340,7 +2340,7 @@
尿布更換台數量
充電︰有
充電︰沒有
- 自行車自行維修站
+ 自行車維修站;自行車自行維修站
是的
歷史時期:古典(新時代 IV,西元 374 年 - 西元 900 年)
歷史時期︰帝國 (新時代 V,西元 900 年 — 西元 1200 年)
@@ -3603,4 +3603,127 @@
歷史坦克
水煙休息室
能量來源:生質
+ 雪地摩托車進入
+ 巴士進入
+ 露營車進入
+ 豪華露營車進入
+ 拖車進入
+ 摩托車進入
+ 非機動車進入
+ 非機動車進入
+ 大貨車進入
+ 小貨車進入
+ 無障礙空間
+ 計程車辦公室
+ 車輛進入:是
+ 車輛進入:私人
+ 車輛進入:否
+ 車輛進入:目的地
+ 車輛進入:許可
+ 車輛進入:顧客
+ 車輛進入:軍事
+ 車輛進入:送貨
+ 車輛進入:林業
+ 汽車進入:
+ 汽車進入:私人
+ 汽車進入:否
+ 汽車進入:目的地
+ 汽車進入:許可
+ 汽車進入:顧客
+ 汽車進入:林業
+ 機動車輛進入:是
+ 機動車輛進入:私人
+ 機動車輛進入:否
+ 機動車輛進入:目的地
+ 機動車輛進入:許可
+ 機動車輛進入:顧庫
+ 機動車輛進入:軍事
+ 機動車輛進入:送貨
+ 機動車輛進入:林業
+ 機動車輛進入:農業
+ 大貨車進入:私人
+ 大貨車進入:否
+ 大貨車進入:農業
+ 大貨車進入:不鼓勵
+ 大貨車進入:不適合
+ 小貨車進入:否
+ 摩托車進入:私人
+ 摩托車進入:否
+ 非機動車輛進入:否
+ 非機動車輛進入:否
+ 腳踏車進入:私人
+ 腳踏車進入:下車
+ 腳踏車進入:目的地
+ 腳踏車進入:許可
+ 腳踏車進入:顧客
+ 馬進入:私人
+ 馬進入:目的地
+ 馬進入:許可
+ 馬進入:林業
+ 行人進入:是
+ 行人進入:私人
+ 行人進入:否
+ 行人進入:目的地
+ 行人進入:許可
+ 行人進入:顧客
+ 露營車進入:否
+ 豪華露營車進入:否
+ 拖車進入:否
+ 公車進入:是
+ 公車進入:指定
+ 公車進入:否
+ 巴士進入:否
+ 遊覽車進入:是
+ 遊覽車進入:指定
+ 遊覽車進入:否
+ 長途公車進入:是
+ 長途公車進入:否
+ 滑雪進入:是
+ 滑雪進入:否
+ 雪地摩托車進入:私人
+ 雪地摩托車進入:否
+ 農用車進入:是
+ 農用車進入:否
+ 計程車進入:是
+ 計程車進入:指定
+ 計程車進入:否
+ 無障礙通道:否
+ 是
+ 指定
+ 許可
+ 是
+ 指定
+ 是
+ 指定
+ 是
+ 指定
+ 是
+ 指定
+ 是
+ 許可
+ 目的地
+ 指定
+ 是
+ 指定
+ 是
+ 指定
+ 是
+ 目的地
+ 許可
+ 指定
+ 送貨
+ 是
+ 指定
+ 是
+ 指定
+ 地窖入口
+ 健康食品
+ 建築師
+ 酒廠
+ 木匠
+ 鋪地板的人
+ 烘焙坊
+ 櫥櫃製造商
+ 充電
+ 寵物美容
\ No newline at end of file
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index c3d1613418..c906ac0767 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -1437,7 +1437,7 @@
取消選擇
取消全選
清除
- 全部清除
+ 清除全部
儲存
另存為新的 GPX 檔案
更名
@@ -3310,4 +3310,15 @@
寬度限制
在路線當指定允許的車輛寬度限制。
避開特定路線與道路類型
+ 並排
+ 空中航道
+ 連線
+ 計算
+ OsmAnd 用法
+ 圖磚
+ 地圖
+ %1$s TB
+ %1$s GB
+ %1$s MB
+ %1$s KB
\ No newline at end of file
diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml
index 6ee73537a6..ddec07f1ec 100644
--- a/OsmAnd/res/values/phrases.xml
+++ b/OsmAnd/res/values/phrases.xml
@@ -1054,7 +1054,6 @@
Internet cafe
Bank
- ATM
ATM
Payment terminal
Money lender
@@ -2730,7 +2729,7 @@
Inscription:NE
Under construction
- ATM: yes
+ ATM: yes
ATM: no
Firepit
@@ -4110,4 +4109,6 @@
Charge
+ Pet grooming
+
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 4f6ff08aa5..8e2a6b8a0b 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -11,11 +11,21 @@
Thx - Hardy
-->
+
Used %1$s TB
Used %1$s GB
Used %1$s MB
Used %1$s kB
Contour lines and Hillshade
+ Prefer unpaved roads
+ Prefer unpaved roads.
+ Update all maps
+ Are you sure you want to update all (%1$d) maps?
+ Track Storage Directory
+ Tracks can be stored in rec folder or in monthly or daily folders.
+ Store recorded tracks in rec folder
+ Store recorded tracks in daily folders
+ Store recorded tracks in sub-folders per recording day (like 2018-01-01).
Calculate
OsmAnd Usage
Tiles
diff --git a/OsmAnd/res/xml/general_profile_settings.xml b/OsmAnd/res/xml/general_profile_settings.xml
index eedbd410af..bf059a374d 100644
--- a/OsmAnd/res/xml/general_profile_settings.xml
+++ b/OsmAnd/res/xml/general_profile_settings.xml
@@ -53,6 +53,11 @@
android:layout="@layout/preference_with_descr"
android:title="@string/angular_measeurement" />
+
+
diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java
index a5ed402e78..0fee27c79f 100644
--- a/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java
+++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationSimulation.java
@@ -16,6 +16,7 @@ import android.widget.Toast;
import net.osmand.CallbackWithObject;
import net.osmand.GPXUtilities;
import net.osmand.Location;
+import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
@@ -78,6 +79,7 @@ public class OsmAndLocationSimulation {
public void onClick(DialogInterface dialog, int which) {
boolean gpxNavigation = radioGPX.isChecked();
if (gpxNavigation) {
+ boolean nightMode = ma instanceof MapActivity ? app.getDaynightHelper().isNightModeForMapControls() : !app.getSettings().isLightContent();
GpxUiHelper.selectGPXFile(ma, false, false, new CallbackWithObject() {
@Override
public boolean processResult(GPXUtilities.GPXFile[] result) {
@@ -88,7 +90,7 @@ public class OsmAndLocationSimulation {
}
return true;
}
- });
+ }, nightMode);
} else {
List currentRoute = app.getRoutingHelper().getCurrentCalculatedRoute();
if (currentRoute.isEmpty()) {
diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
index c8d27d83bd..f58d8e6c25 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
@@ -45,17 +45,11 @@ import net.osmand.util.Algorithms;
import org.json.JSONException;
import org.json.JSONObject;
-import java.io.BufferedOutputStream;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
@@ -157,8 +151,8 @@ public class OsmandSettings {
private final OsmandApplication ctx;
private PreferencesDataStore dataStore;
private SettingsAPI settingsAPI;
- private Object globalPreferences;
private Object defaultProfilePreferences;
+ private Object globalPreferences;
private Object profilePreferences;
private ApplicationMode currentMode;
private Map> registeredPreferences =
@@ -287,7 +281,7 @@ public class OsmandSettings {
}
}
if (metricSystem != null) {
- METRIC_SYSTEM.set(metricSystem);
+ METRIC_SYSTEM.setModeValue(mode, metricSystem);
return true;
}
} else if (preference == SPEED_SYSTEM) {
@@ -306,7 +300,7 @@ public class OsmandSettings {
}
}
if (speedSystem != null) {
- SPEED_SYSTEM.set(speedSystem);
+ SPEED_SYSTEM.setModeValue(mode, speedSystem);
return true;
}
} else if (preference instanceof BooleanPreference) {
@@ -396,6 +390,7 @@ public class OsmandSettings {
if (aidlApi != null) {
aidlApi.loadConnectedApps();
OsmandPlugin.updateActivatedPlugins(ctx);
+ ctx.poiFilters.loadSelectedPoiFilters();
}
fireEvent(oldMode);
@@ -1360,9 +1355,9 @@ public class OsmandSettings {
}
- public final OsmandPreference SHOW_POI_LABEL = new BooleanPreference("show_poi_label", false).makeGlobal();
+ public final OsmandPreference SHOW_POI_LABEL = new BooleanPreference("show_poi_label", false).makeProfile();
- public final OsmandPreference SHOW_MAPILLARY = new BooleanPreference("show_mapillary", false).makeGlobal();
+ public final OsmandPreference SHOW_MAPILLARY = new BooleanPreference("show_mapillary", false).makeProfile();
public final OsmandPreference MAPILLARY_FIRST_DIALOG_SHOWN = new BooleanPreference("mapillary_first_dialog_shown", false).makeGlobal();
public final OsmandPreference ONLINE_PHOTOS_ROW_COLLAPSED = new BooleanPreference("mapillary_menu_collapsed", false).makeGlobal();
public final OsmandPreference WEBGL_SUPPORTED = new BooleanPreference("webgl_supported", true).makeGlobal();
@@ -1499,9 +1494,13 @@ public class OsmandSettings {
SAVE_TRACK_TO_GPX.setModeDefaultValue(ApplicationMode.PEDESTRIAN, false);
}
+ public static final Integer REC_DIRECTORY = 0;
+ public static final Integer MONTHLY_DIRECTORY = 1;
+ public static final Integer DAILY_DIRECTORY = 2;
+
public final CommonPreference DISABLE_RECORDING_ONCE_APP_KILLED = new BooleanPreference("disable_recording_once_app_killed", false).makeGlobal();
- public final CommonPreference STORE_TRACKS_IN_MONTHLY_DIRECTORIES = new BooleanPreference("store_tracks_in_monthly_directories", false).makeGlobal();
+ public final CommonPreference TRACK_STORAGE_DIRECTORY = new IntPreference("track_storage_directory", 0).makeGlobal();
// this value string is synchronized with settings_pref.xml preference name
public final OsmandPreference FAST_ROUTE_MODE = new BooleanPreference("fast_route_mode", true).makeProfile();
@@ -1798,15 +1797,15 @@ public class OsmandSettings {
public final OsmandPreference BT_SCO_DELAY = new IntPreference("bt_sco_delay", 1500).makeGlobal().cache();
// this value string is synchronized with settings_pref.xml preference name
- public final CommonPreference MAP_ONLINE_DATA = new BooleanPreference("map_online_data", false).makeGlobal();
+ public final CommonPreference MAP_ONLINE_DATA = new BooleanPreference("map_online_data", false).makeProfile();
public final CommonPreference CONTOUR_LINES_ZOOM = new StringPreference("contour_lines_zoom", null).makeGlobal().cache();
// this value string is synchronized with settings_pref.xml preference name
- public final CommonPreference MAP_OVERLAY = new StringPreference("map_overlay", null).makeGlobal().cache();
+ public final CommonPreference MAP_OVERLAY = new StringPreference("map_overlay", null).makeProfile().cache();
// this value string is synchronized with settings_pref.xml preference name
- public final CommonPreference MAP_UNDERLAY = new StringPreference("map_underlay", null).makeGlobal().cache();
+ public final CommonPreference MAP_UNDERLAY = new StringPreference("map_underlay", null).makeProfile().cache();
// this value string is synchronized with settings_pref.xml preference name
public final CommonPreference MAP_OVERLAY_TRANSPARENCY = new IntPreference("overlay_transparency",
@@ -1818,7 +1817,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name
public final CommonPreference MAP_TILE_SOURCES = new StringPreference("map_tile_sources",
- TileSourceManager.getMapnikSource().getName()).makeGlobal();
+ TileSourceManager.getMapnikSource().getName()).makeProfile();
public final CommonPreference LAYER_TRANSPARENCY_SEEKBAR_MODE =
new EnumIntPreference<>("layer_transparency_seekbar_mode", LayerTransparencySeekbarMode.UNDEFINED, LayerTransparencySeekbarMode.values());
@@ -1846,7 +1845,7 @@ public class OsmandSettings {
MAP_MARKERS_MODE.setModeDefaultValue(ApplicationMode.PEDESTRIAN, MapMarkersMode.TOOLBAR);
}
- public final OsmandPreference SHOW_MAP_MARKERS = new BooleanPreference("show_map_markers", true).makeGlobal();
+ public final OsmandPreference SHOW_MAP_MARKERS = new BooleanPreference("show_map_markers", true).makeProfile();
public final OsmandPreference SHOW_COORDINATES_WIDGET = new BooleanPreference("show_coordinates_widget", false).makeProfile().cache();
@@ -2915,7 +2914,7 @@ public class OsmandSettings {
public final OsmandPreference LAST_SELECTED_GPX_TRACK_FOR_NEW_POINT = new StringPreference("last_selected_gpx_track_for_new_point", null).makeGlobal().cache();
// Avoid using this property, probably you need to use PoiFiltersHelper.getSelectedPoiFilters()
- public final OsmandPreference SELECTED_POI_FILTER_FOR_MAP = new StringPreference("selected_poi_filter_for_map", null).makeGlobal().cache();
+ public final OsmandPreference SELECTED_POI_FILTER_FOR_MAP = new StringPreference("selected_poi_filter_for_map", null).makeProfile().cache();
public Set getSelectedPoiFilters() {
Set result = new LinkedHashSet<>();
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index 73d9037086..d5f1e70f81 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -649,7 +649,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
}
}
if (mapContextMenu.isVisible() && mapContextMenu.isClosable()) {
- if (mapContextMenu.getCurrentMenuState() != MenuState.HEADER_ONLY) {
+ if (mapContextMenu.getCurrentMenuState() != MenuState.HEADER_ONLY && !isLandscapeLayout()) {
mapContextMenu.openMenuHeaderOnly();
} else {
mapContextMenu.close();
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
index 71849b7298..e64769f88a 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java
@@ -5,6 +5,7 @@ import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
+import android.support.v7.view.ContextThemeWrapper;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
@@ -91,6 +92,9 @@ public class MapActivityLayers {
private MapWidgetRegistry mapWidgetRegistry;
private QuickActionRegistry quickActionRegistry;
private MeasurementToolLayer measurementToolLayer;
+
+ private boolean nightMode;
+ private int themeRes;
private StateChangedListener transparencyListener;
@@ -98,6 +102,8 @@ public class MapActivityLayers {
this.activity = activity;
this.mapWidgetRegistry = new MapWidgetRegistry(activity.getMyApplication());
this.quickActionRegistry = new QuickActionRegistry(activity.getMyApplication().getSettings());
+ this.nightMode = activity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
+ this.themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
}
public QuickActionRegistry getQuickActionRegistry() {
@@ -266,7 +272,7 @@ public class MapActivityLayers {
return true;
}
};
- return GpxUiHelper.selectGPXFiles(files, activity, callbackWithObject);
+ return GpxUiHelper.selectGPXFiles(files, activity, callbackWithObject, themeRes);
}
@@ -283,8 +289,8 @@ public class MapActivityLayers {
}
list.add(poiFilters.getCustomPOIFilter());
- final ArrayAdapter listAdapter = adapter.createListAdapter(activity, app.getSettings().isLightContent());
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final ArrayAdapter listAdapter = adapter.createListAdapter(activity, !nightMode);
+ AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
final ListView listView = new ListView(activity);
listView.setDivider(null);
listView.setClickable(true);
@@ -361,9 +367,8 @@ public class MapActivityLayers {
addFilterToList(adapter, list, f, false);
}
- final ArrayAdapter listAdapter =
- adapter.createListAdapter(activity, app.getSettings().isLightContent());
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final ArrayAdapter listAdapter = adapter.createListAdapter(activity, !nightMode);
+ AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
index a8cce1df62..90116408f9 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
@@ -186,7 +186,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
return false;
}
-
+
/**
* @return warnings, filenames
*/
@@ -204,23 +204,25 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
File fout = new File(dir, f + ".gpx"); //$NON-NLS-1$
if (!data.get(f).isEmpty()) {
WptPt pt = data.get(f).findPointToShow();
- File targetDir = dir;
- if (ctx.getSettings().STORE_TRACKS_IN_MONTHLY_DIRECTORIES.get()) {
+ String fileName = f + "_" + new SimpleDateFormat("HH-mm_EEE", Locale.US).format(new Date(pt.time)); //$NON-NLS-1$
+ Integer track_storage_directory = ctx.getSettings().TRACK_STORAGE_DIRECTORY.get();
+ if (track_storage_directory != OsmandSettings.REC_DIRECTORY) {
SimpleDateFormat dateDirFormat = new SimpleDateFormat("yyyy-MM");
+ if (track_storage_directory == OsmandSettings.DAILY_DIRECTORY) {
+ dateDirFormat = new SimpleDateFormat("yyyy-MM-dd");
+ }
String dateDirName = dateDirFormat.format(new Date(pt.time));
File dateDir = new File(dir, dateDirName);
dateDir.mkdirs();
if (dateDir.exists()) {
- targetDir = dateDir;
+ fileName = dateDirName + File.separator + fileName;
}
}
-
- String fileName = f + "_" + new SimpleDateFormat("HH-mm_EEE", Locale.US).format(new Date(pt.time)); //$NON-NLS-1$
filenames.add(fileName);
- fout = new File(targetDir, fileName + ".gpx"); //$NON-NLS-1$
+ fout = new File(dir, fileName + ".gpx"); //$NON-NLS-1$
int ind = 1;
while (fout.exists()) {
- fout = new File(targetDir, fileName + "_" + (++ind) + ".gpx"); //$NON-NLS-1$ //$NON-NLS-2$
+ fout = new File(dir, fileName + "_" + (++ind) + ".gpx"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java
index 3f7f7ce571..1c39792cf2 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java
@@ -745,6 +745,13 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
case NAUTICALMILES_PER_HOUR:
ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_NAUTICALMILE;
break;
+ case MINUTES_PER_MILE:
+ ratio[0] = 3600 / OsmAndFormatter.METERS_IN_ONE_MILE;
+ speedUnits = activity.getString(R.string.mile_per_hour);
+ break;
+ case METERS_PER_SECOND:
+ ratio[0] = 1;
+ break;
}
float settingsMinSpeed = settings.MIN_SPEED.get();
diff --git a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
index 9cf4e72a28..e07e04d1d4 100644
--- a/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
+++ b/OsmAnd/src/net/osmand/plus/base/MapViewTrackingUtilities.java
@@ -128,7 +128,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
myLocation != null && isSmallSpeedForDirectionOfMovement(myLocation, speedForDirectionOfMovement);
if ((settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS || (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING && smallSpeedForDirectionOfMovement)) && !routePlanningMode) {
if (Math.abs(MapUtils.degreesDiff(mapView.getRotate(), -val)) > 1.0) {
- mapView.setRotate(-val);
+ mapView.setRotate(-val, false);
}
} else if (showViewAngle && headingChanged) {
mapView.refreshMap();
@@ -208,7 +208,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
mapView.getAnimatedDraggingThread().startZooming(zoom.first, zoom.second, false);
}
if (rotation != null) {
- mapView.setRotate(rotation);
+ mapView.setRotate(rotation, false);
}
mapView.setLatLon(location.getLatitude(), location.getLongitude());
}
@@ -264,7 +264,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
public void updateSettings(){
if (mapView != null) {
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE || routePlanningMode) {
- mapView.setRotate(0);
+ mapView.setRotate(0, true);
}
mapView.setMapPosition(settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING
&& !routePlanningMode
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
index 432fb53164..996a1be09b 100644
--- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
+++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
@@ -17,6 +17,7 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.SettingsBaseActivity;
+import net.osmand.plus.render.NativeOsmandLibrary;
import net.osmand.util.SunriseSunset;
import java.text.SimpleDateFormat;
@@ -37,6 +38,15 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
cat.addPreference(createCheckBoxPreference(settings.USE_OPENGL_RENDER,
R.string.use_opengl_render,R.string.use_opengl_render_descr));
+ CheckBoxPreference nativeCheckbox = createCheckBoxPreference(settings.SAFE_MODE, R.string.safe_mode,
+ R.string.safe_mode_description);
+ // disable the checkbox if the library cannot be used
+ if ((NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) || settings.NATIVE_RENDERING_FAILED.get()) {
+ nativeCheckbox.setEnabled(false);
+ nativeCheckbox.setChecked(true);
+ }
+ cat.addPreference(nativeCheckbox);
+
PreferenceCategory navigation = new PreferenceCategory(this);
navigation.setTitle(R.string.routing_settings);
cat.addPreference(navigation);
diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
index 4f8cc4bb93..8b1d2a47fe 100644
--- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
+++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java
@@ -9,6 +9,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
+import android.support.v7.view.ContextThemeWrapper;
import android.support.v7.widget.AppCompatCheckedTextView;
import android.support.v7.widget.SwitchCompat;
import android.view.LayoutInflater;
@@ -114,6 +115,8 @@ public class ConfigureMapMenu {
public ContextMenuAdapter createListAdapter(final MapActivity ma) {
OsmandApplication app = ma.getMyApplication();
+ boolean nightMode = app.getDaynightHelper().isNightModeForMapControls();
+ int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
ContextMenuAdapter adapter = new ContextMenuAdapter();
adapter.setDefaultLayoutId(R.layout.list_item_icon_and_menu);
adapter.addItem(new ContextMenuItem.ItemBuilder()
@@ -138,8 +141,8 @@ public class ConfigureMapMenu {
}
}
}
- createLayersItems(customRules, adapter, ma);
- createRenderingAttributeItems(customRules, adapter, ma);
+ createLayersItems(customRules, adapter, ma, themeRes);
+ createRenderingAttributeItems(customRules, adapter, ma, themeRes, nightMode);
return adapter;
}
@@ -284,7 +287,7 @@ public class ConfigureMapMenu {
}
}
- private void createLayersItems(List customRules, ContextMenuAdapter adapter, final MapActivity activity) {
+ private void createLayersItems(List customRules, ContextMenuAdapter adapter, final MapActivity activity, final int themeRes) {
final OsmandApplication app = activity.getMyApplication();
final OsmandSettings settings = app.getSettings();
LayerMenuListener l = new LayerMenuListener(activity, adapter);
@@ -398,7 +401,7 @@ public class ConfigureMapMenu {
}
private void showTransportDialog(final ArrayAdapter ad, final int pos) {
- final AlertDialog.Builder b = new AlertDialog.Builder(activity);
+ final AlertDialog.Builder b = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
b.setTitle(activity.getString(R.string.rendering_category_transport));
final int[] iconIds = new int[transportPrefs.size()];
@@ -425,7 +428,7 @@ public class ConfigureMapMenu {
}
}
- adapter = new ArrayAdapter(activity, R.layout.popup_list_item_icon24_and_menu, R.id.title, vals) {
+ adapter = new ArrayAdapter(new ContextThemeWrapper(activity, themeRes), R.layout.popup_list_item_icon24_and_menu, R.id.title, vals) {
@NonNull
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
@@ -545,7 +548,8 @@ public class ConfigureMapMenu {
}
private void createRenderingAttributeItems(List customRules,
- final ContextMenuAdapter adapter, final MapActivity activity) {
+ final ContextMenuAdapter adapter, final MapActivity activity,
+ final int themeRes, final boolean nightMode) {
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.map_widget_map_rendering, activity)
.setId(MAP_RENDERING_CATEGORY_ID)
.setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem());
@@ -570,7 +574,7 @@ public class ConfigureMapMenu {
public boolean onContextMenuClick(final ArrayAdapter ad, int itemId,
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
- AlertDialog.Builder bld = new AlertDialog.Builder(view.getContext());
+ AlertDialog.Builder bld = new AlertDialog.Builder(new ContextThemeWrapper(view.getContext(), themeRes));
bld.setTitle(R.string.daynight);
final String[] items = new String[OsmandSettings.DayNightMode.values().length];
for (int i = 0; i < items.length; i++) {
@@ -608,7 +612,7 @@ public class ConfigureMapMenu {
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
final OsmandSettings.OsmandPreference mapDensity = view.getSettings().MAP_DENSITY;
- final AlertDialog.Builder bld = new AlertDialog.Builder(view.getContext());
+ AlertDialog.Builder bld = new AlertDialog.Builder(new ContextThemeWrapper(view.getContext(), themeRes));
int p = (int) (mapDensity.get() * 100);
final TIntArrayList tlist = new TIntArrayList(new int[]{25, 33, 50, 75, 100, 125, 150, 200, 300, 400});
final List values = new ArrayList<>();
@@ -658,7 +662,7 @@ public class ConfigureMapMenu {
}).createItem());
ContextMenuItem props;
- props = createRenderingProperty(customRules, adapter, activity, R.drawable.ic_action_intersection, ROAD_STYLE_ATTR, ROAD_STYLE_ID);
+ props = createRenderingProperty(customRules, adapter, activity, R.drawable.ic_action_intersection, ROAD_STYLE_ATTR, ROAD_STYLE_ID, themeRes);
if (props != null) {
adapter.addItem(props);
}
@@ -671,7 +675,7 @@ public class ConfigureMapMenu {
public boolean onContextMenuClick(final ArrayAdapter ad, int itemId,
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
- AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
+ AlertDialog.Builder b = new AlertDialog.Builder(new ContextThemeWrapper(view.getContext(), themeRes));
// test old descr as title
b.setTitle(R.string.text_size);
final Float[] txtValues = new Float[]{0.75f, 1f, 1.25f, 1.5f, 2f, 3f};
@@ -711,7 +715,7 @@ public class ConfigureMapMenu {
public boolean onContextMenuClick(final ArrayAdapter ad, int itemId,
final int pos, boolean isChecked, int[] viewCoordinates) {
final OsmandMapTileView view = activity.getMapView();
- final AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
+ AlertDialog.Builder b = new AlertDialog.Builder(new ContextThemeWrapper(view.getContext(), themeRes));
b.setTitle(activity.getString(R.string.map_locale));
@@ -735,7 +739,7 @@ public class ConfigureMapMenu {
}
};
- final ArrayAdapter singleChoiceAdapter = new ArrayAdapter(activity, R.layout.single_choice_switch_item, R.id.text1, txtValues) {
+ final ArrayAdapter singleChoiceAdapter = new ArrayAdapter(new ContextThemeWrapper(view.getContext(), themeRes), R.layout.single_choice_switch_item, R.id.text1, txtValues) {
@NonNull
@Override
public View getView(int position, View convertView, ViewGroup parent) {
@@ -794,17 +798,17 @@ public class ConfigureMapMenu {
}).createItem());
props = createProperties(customRules, null, R.string.rendering_category_transport, R.drawable.ic_action_bus_dark,
- "transport", null, adapter, activity, true, TRANSPORT_RENDERING_ID);
+ "transport", null, adapter, activity, true, TRANSPORT_RENDERING_ID, themeRes, nightMode);
if (props != null) {
adapter.addItem(props);
}
props = createProperties(customRules, null, R.string.rendering_category_details, R.drawable.ic_action_layers_dark,
- "details", null, adapter, activity, true, DETAILS_ID);
+ "details", null, adapter, activity, true, DETAILS_ID, themeRes, nightMode);
if (props != null) {
adapter.addItem(props);
}
props = createProperties(customRules, null, R.string.rendering_category_hide, R.drawable.ic_action_hide,
- "hide", null, adapter, activity, true, HIDE_ID);
+ "hide", null, adapter, activity, true, HIDE_ID, themeRes, nightMode);
if (props != null) {
adapter.addItem(props);
}
@@ -816,7 +820,7 @@ public class ConfigureMapMenu {
}
}
props = createProperties(customRules, customRulesIncluded, R.string.rendering_category_routes, R.drawable.ic_action_map_routes,
- "routes", null, adapter, activity, true, ROUTES_ID);
+ "routes", null, adapter, activity, true, ROUTES_ID, themeRes, nightMode);
if (props != null) {
adapter.addItem(props);
}
@@ -824,7 +828,7 @@ public class ConfigureMapMenu {
if (getCustomRenderingPropertiesSize(customRules) > 0) {
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.rendering_category_others, activity)
.setCategory(true).setLayout(R.layout.list_group_title_with_switch).createItem());
- createCustomRenderingProperties(adapter, activity, customRules);
+ createCustomRenderingProperties(adapter, activity, customRules, themeRes);
}
}
@@ -879,7 +883,9 @@ public class ConfigureMapMenu {
final ContextMenuAdapter adapter,
final MapActivity activity,
final boolean useDescription,
- final String id) {
+ final String id,
+ final int themeRes,
+ final boolean nightMode) {
final List ps = new ArrayList<>();
final List> prefs = new ArrayList<>();
@@ -928,7 +934,7 @@ public class ConfigureMapMenu {
activity.getMapLayers().updateLayers(activity.getMapView());
} else {
showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs,
- useDescription, defaultSettings, true, customRulesIncluded);
+ useDescription, defaultSettings, true, customRulesIncluded, themeRes, nightMode);
}
return false;
}
@@ -968,7 +974,7 @@ public class ConfigureMapMenu {
public boolean onRowItemClick(ArrayAdapter a, View view, int itemId,
int pos) {
showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs,
- useDescription, defaultSettings, false, customRulesIncluded);
+ useDescription, defaultSettings, false, customRulesIncluded, themeRes, nightMode);
return false;
}
});
@@ -1010,9 +1016,11 @@ public class ConfigureMapMenu {
final boolean useDescription,
ListStringPreference defaultSettings,
boolean useDefault,
- final List customRulesIncluded) {
+ final List customRulesIncluded,
+ final int themeRes,
+ final boolean nightMode) {
- AlertDialog.Builder bld = new AlertDialog.Builder(activity);
+ AlertDialog.Builder bld = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
boolean[] checkedItems = new boolean[prefs.size()];
final boolean[] tempPrefs = new boolean[prefs.size()];
for (int i = 0; i < prefs.size(); i++) {
@@ -1095,8 +1103,7 @@ public class ConfigureMapMenu {
final OsmandSettings.CommonPreference pref = activity.getMyApplication().getSettings()
.getCustomRenderProperty(p.getAttrName());
- LayoutInflater inflater = activity.getLayoutInflater();
- View spinnerView = inflater.inflate(R.layout.spinner_rule_layout, null);
+ View spinnerView = View.inflate(new ContextThemeWrapper(activity, themeRes), R.layout.spinner_rule_layout, null);
TextView title = (TextView) spinnerView.findViewById(R.id.title);
final Spinner spinner = (Spinner) spinnerView.findViewById(R.id.spinner);
TextView description = (TextView) spinnerView.findViewById(R.id.description);
@@ -1125,7 +1132,7 @@ public class ConfigureMapMenu {
p.getPossibleValues()[j]);
}
- StringSpinnerArrayAdapter arrayAdapter = new StringSpinnerArrayAdapter(activity);
+ StringSpinnerArrayAdapter arrayAdapter = new StringSpinnerArrayAdapter(activity, nightMode);
for (String val : possibleValuesString) {
arrayAdapter.add(val);
}
@@ -1189,10 +1196,10 @@ public class ConfigureMapMenu {
}
private void createCustomRenderingProperties(final ContextMenuAdapter adapter, final MapActivity activity,
- List customRules) {
+ List customRules, final int themeRes) {
for (final RenderingRuleProperty p : customRules) {
if (isPropertyAccepted(p)) {
- adapter.addItem(createRenderingProperty(adapter, activity, 0, p, CUSTOM_RENDERING_ITEMS_ID_SCHEME + p.getName()));
+ adapter.addItem(createRenderingProperty(adapter, activity, 0, p, CUSTOM_RENDERING_ITEMS_ID_SCHEME + p.getName(), themeRes));
}
}
}
@@ -1209,17 +1216,19 @@ public class ConfigureMapMenu {
private ContextMenuItem createRenderingProperty(final List customRules,
final ContextMenuAdapter adapter, final MapActivity activity,
- @DrawableRes final int icon, final String attrName, String id) {
+ @DrawableRes final int icon, final String attrName, String id,
+ final int themeRes) {
for (final RenderingRuleProperty p : customRules) {
if (p.getAttrName().equals(attrName)) {
- return createRenderingProperty(adapter, activity, icon, p, id);
+ return createRenderingProperty(adapter, activity, icon, p, id, themeRes);
}
}
return null;
}
private ContextMenuItem createRenderingProperty(final ContextMenuAdapter adapter, final MapActivity activity,
- @DrawableRes final int icon, final RenderingRuleProperty p, final String id) {
+ @DrawableRes final int icon, final RenderingRuleProperty p, final String id,
+ final int themeRes) {
final OsmandMapTileView view = activity.getMapView();
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(),
p.getName());
@@ -1259,7 +1268,7 @@ public class ConfigureMapMenu {
@Override
public boolean onContextMenuClick(final ArrayAdapter ad,
final int itemId, final int pos, boolean isChecked, int[] viewCoordinates) {
- AlertDialog.Builder b = new AlertDialog.Builder(view.getContext());
+ AlertDialog.Builder b = new AlertDialog.Builder(new ContextThemeWrapper(view.getContext(), themeRes));
// test old descr as title
b.setTitle(propertyDescr);
@@ -1310,13 +1319,13 @@ public class ConfigureMapMenu {
private class StringSpinnerArrayAdapter extends ArrayAdapter {
- private boolean lightTheme;
+ private boolean nightMode;
- public StringSpinnerArrayAdapter(Context context) {
+ public StringSpinnerArrayAdapter(Context context, boolean nightMode) {
super(context, android.R.layout.simple_spinner_item);
setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
OsmandApplication app = (OsmandApplication )getContext().getApplicationContext();
- lightTheme = app.getSettings().isLightContent();
+ this.nightMode = nightMode;
}
@Override
@@ -1325,7 +1334,7 @@ public class ConfigureMapMenu {
String text = getItem(position);
label.setText(text);
- label.setTextColor(!lightTheme ?
+ label.setTextColor(nightMode ?
ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label;
}
@@ -1336,7 +1345,7 @@ public class ConfigureMapMenu {
String text = getItem(position);
label.setText(text);
- label.setTextColor(!lightTheme ?
+ label.setTextColor(nightMode ?
ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_dark) : ContextCompat.getColorStateList(getContext(), R.color.text_color_primary_light));
return label;
diff --git a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java
index d53ab09d2e..f2c1626c31 100644
--- a/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java
+++ b/OsmAnd/src/net/osmand/plus/download/ui/UpdatesIndexFragment.java
@@ -19,10 +19,12 @@ import net.osmand.plus.inapp.InAppPurchaseHelper;
import net.osmand.util.Algorithms;
import android.app.Activity;
import android.content.Context;
+import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBar;
+import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -154,7 +156,21 @@ public class UpdatesIndexFragment extends OsmAndListFragment implements Download
updateAllButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- getMyActivity().startDownload(indexItems.toArray(new IndexItem[indexItems.size()]));
+ if (indexItems.size() > 3) {
+ AlertDialog.Builder dialog = new AlertDialog.Builder(getMyActivity());
+ dialog.setTitle(R.string.update_all_maps);
+ dialog.setMessage(getString(R.string.update_all_maps_q, indexItems.size()));
+ dialog.setNegativeButton(R.string.shared_string_cancel, null);
+ dialog.setPositiveButton(R.string.update, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ getMyActivity().startDownload(indexItems.toArray(new IndexItem[indexItems.size()]));
+ }
+ });
+ dialog.create().show();
+ } else {
+ getMyActivity().startDownload(indexItems.toArray(new IndexItem[indexItems.size()]));
+ }
}
});
}
diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
index 5350a4b1ad..4f1a852cfd 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
+++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
@@ -23,6 +23,7 @@ import android.support.v7.widget.SwitchCompat;
import android.text.SpannableString;
import android.text.style.StyleSpan;
import android.util.TypedValue;
+import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
@@ -219,7 +220,8 @@ public class GpxUiHelper {
}
public static AlertDialog selectGPXFiles(List selectedGpxList, final Activity activity,
- final CallbackWithObject callbackWithObject) {
+ final CallbackWithObject callbackWithObject,
+ int dialogThemeRes) {
OsmandApplication app = (OsmandApplication) activity.getApplication();
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
final List allGpxList = getSortedGPXFilesInfo(dir, selectedGpxList, false);
@@ -229,11 +231,13 @@ public class GpxUiHelper {
allGpxList.add(0, new GPXInfo(activity.getString(R.string.show_current_gpx_title), 0, 0));
final ContextMenuAdapter adapter = createGpxContextMenuAdapter(allGpxList, selectedGpxList, true);
- return createDialog(activity, true, true, true, callbackWithObject, allGpxList, adapter);
+ return createDialog(activity, true, true, true, callbackWithObject, allGpxList, adapter, dialogThemeRes);
}
public static AlertDialog selectGPXFile(final Activity activity,
- final boolean showCurrentGpx, final boolean multipleChoice, final CallbackWithObject callbackWithObject) {
+ final boolean showCurrentGpx, final boolean multipleChoice,
+ final CallbackWithObject callbackWithObject, boolean nightMode) {
+ int dialogThemeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
OsmandApplication app = (OsmandApplication) activity.getApplication();
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
final List list = getSortedGPXFilesInfo(dir, null, false);
@@ -246,7 +250,7 @@ public class GpxUiHelper {
}
final ContextMenuAdapter adapter = createGpxContextMenuAdapter(list, null, showCurrentGpx);
- return createDialog(activity, showCurrentGpx, multipleChoice, false, callbackWithObject, list, adapter);
+ return createDialog(activity, showCurrentGpx, multipleChoice, false, callbackWithObject, list, adapter, dialogThemeRes);
}
return null;
}
@@ -439,11 +443,12 @@ public class GpxUiHelper {
final boolean showAppearanceSetting,
final CallbackWithObject callbackWithObject,
final List list,
- final ContextMenuAdapter adapter) {
+ final ContextMenuAdapter adapter,
+ final int themeRes) {
final OsmandApplication app = (OsmandApplication) activity.getApplication();
final DateFormat dateFormat = android.text.format.DateFormat.getMediumDateFormat(activity);
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
final int layout = R.layout.gpx_track_item;
final Map gpxAppearanceParams = new HashMap<>();
@@ -479,7 +484,7 @@ public class GpxUiHelper {
View v = convertView;
boolean checkLayout = getItemViewType(position) == 0;
if (v == null) {
- v = activity.getLayoutInflater().inflate(layout, null);
+ v = View.inflate(new ContextThemeWrapper(activity, themeRes), layout, null);
}
if (dataItems == null) {
@@ -546,7 +551,7 @@ public class GpxUiHelper {
if (trackWidthProp == null || trackColorProp == null) {
builder.setTitle(R.string.show_gpx);
} else {
- final View apprTitleView = activity.getLayoutInflater().inflate(R.layout.select_gpx_appearance_title, null);
+ final View apprTitleView = View.inflate(new ContextThemeWrapper(activity, themeRes), R.layout.select_gpx_appearance_title, null);
final OsmandSettings.CommonPreference prefWidth
= app.getSettings().getCustomRenderProperty(CURRENT_TRACK_WIDTH_ATTR);
@@ -558,14 +563,14 @@ public class GpxUiHelper {
apprTitleView.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- final ListPopupWindow popup = new ListPopupWindow(activity);
+ final ListPopupWindow popup = new ListPopupWindow(new ContextThemeWrapper(activity, themeRes));
popup.setAnchorView(apprTitleView);
popup.setContentWidth(AndroidUtils.dpToPx(activity, 200f));
popup.setModal(true);
popup.setDropDownGravity(Gravity.RIGHT | Gravity.TOP);
popup.setVerticalOffset(AndroidUtils.dpToPx(activity, -48f));
popup.setHorizontalOffset(AndroidUtils.dpToPx(activity, -6f));
- final GpxAppearanceAdapter gpxApprAdapter = new GpxAppearanceAdapter(activity,
+ final GpxAppearanceAdapter gpxApprAdapter = new GpxAppearanceAdapter(new ContextThemeWrapper(activity, themeRes),
gpxAppearanceParams.containsKey(CURRENT_TRACK_COLOR_ATTR) ? gpxAppearanceParams.get(CURRENT_TRACK_COLOR_ATTR) : prefColor.get(),
GpxAppearanceAdapter.GpxAppearanceAdapterType.TRACK_WIDTH_COLOR);
popup.setAdapter(gpxApprAdapter);
@@ -669,7 +674,7 @@ public class GpxUiHelper {
if (position == 0 && showCurrentGpx && item.getSelected()) {
OsmandMonitoringPlugin monitoringPlugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (monitoringPlugin == null) {
- AlertDialog.Builder confirm = new AlertDialog.Builder(activity);
+ AlertDialog.Builder confirm = new AlertDialog.Builder(new ContextThemeWrapper(activity, themeRes));
confirm.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java
index 44b9a1aa32..7f0826304e 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java
@@ -376,7 +376,7 @@ public class RoutePreferencesMenu {
mapActivity.getRoutingHelper().recalculateRouteDueToSettingsChange();
return true;
}
- });
+ }, app.getDaynightHelper().isNightModeForMapControls());
}
private void updateSpinnerItems(final TextView gpxSpinner) {
diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
index 8590bb43a4..d356fc0c82 100644
--- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
+++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java
@@ -885,7 +885,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
}
};
- return GpxUiHelper.selectGPXFile(mapActivity, false, false, callbackWithObject);
+ return GpxUiHelper.selectGPXFile(mapActivity, false, false, callbackWithObject, nightMode);
}
private void applyMovePointMode() {
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java
index e7957ddc02..3704a780d8 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OnSaveCurrentTrackFragment.java
@@ -42,7 +42,7 @@ public class OnSaveCurrentTrackFragment extends BottomSheetDialogFragment {
dismiss();
}
- final File f = new File (app.getAppCustomization().getTracksDir() +"/"+ savedGpxName + ".gpx");
+ final File f = new File (app.getAppCustomization().getTracksDir(), savedGpxName + ".gpx");
final boolean nightMode = !app.getSettings().isLightContent();
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
View mainView = View
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
index 5a7cb43cd4..d65e21418e 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
@@ -16,17 +16,21 @@ import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.view.Window;
+import static net.osmand.plus.OsmandSettings.DAILY_DIRECTORY;
+import static net.osmand.plus.OsmandSettings.MONTHLY_DIRECTORY;
+import static net.osmand.plus.OsmandSettings.REC_DIRECTORY;
+
public class SettingsMonitoringActivity extends SettingsBaseActivity {
private CheckBoxPreference routeServiceEnabled;
private BroadcastReceiver broadcastReceiver;
-
+
public static final int[] BG_SECONDS = new int[]{0, 30, 60, 90};
public static final int[] BG_MINUTES = new int[]{2, 3, 5, 10, 15, 30, 60, 90};
private static final int[] SECONDS = OsmandMonitoringPlugin.SECONDS;
private static final int[] MINUTES = OsmandMonitoringPlugin.MINUTES;
private static final int[] MAX_INTERVAL_TO_SEND_MINUTES = OsmandMonitoringPlugin.MAX_INTERVAL_TO_SEND_MINUTES;
-
+
public SettingsMonitoringActivity() {
super(true);
}
@@ -39,7 +43,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
setProgressVisibility(false);
getToolbar().setTitle(R.string.monitoring_settings);
PreferenceScreen grp = getPreferenceScreen();
-
+
createLoggingSection(grp);
createLiveSection(grp);
createNotificationSection(grp);
@@ -87,15 +91,15 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
R.string.save_track_to_gpx_descrp));
cat.addPreference(createTimeListPreference(settings.SAVE_TRACK_INTERVAL, SECONDS,
MINUTES, 1000, R.string.save_track_interval, R.string.save_track_interval_descr));
- String[] names;
+ String[] names;
Float[] floatValues;
floatValues = new Float[] {0.f, 2.0f, 5.0f, 10.0f, 20.0f, 30.0f, 50.0f};
names = new String[floatValues.length];
names[0] = getString(R.string.shared_string_not_selected);
for(int i = 1; i < floatValues.length; i++) {
- names[i] = floatValues[i].intValue() + " " + getString(R.string.m);
+ names[i] = floatValues[i].intValue() + " " + getString(R.string.m);
}
- cat.addPreference(createListPreference(settings.SAVE_TRACK_MIN_DISTANCE, names, floatValues,
+ cat.addPreference(createListPreference(settings.SAVE_TRACK_MIN_DISTANCE, names, floatValues,
R.string.save_track_min_distance, R.string.save_track_min_distance_descr));
floatValues = new Float[] {0.f, 1.0f, 2.0f, 5.0f, 10.0f, 15.0f, 20.0f, 50.0f, 100.0f};
names = new String[floatValues.length];
@@ -103,7 +107,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
for(int i = 1; i < floatValues.length; i++) {
names[i] = floatValues[i].intValue() + " " + getString(R.string.m) + " (" + Math.round(floatValues[i]/0.3048f) + " " + getString(R.string.foot) + ")";
}
- cat.addPreference(createListPreference(settings.SAVE_TRACK_PRECISION, names, floatValues,
+ cat.addPreference(createListPreference(settings.SAVE_TRACK_PRECISION, names, floatValues,
R.string.save_track_precision, R.string.save_track_precision_descr));
floatValues = new Float[] {0.f, 0.000001f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f};
names = new String[floatValues.length];
@@ -113,14 +117,20 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
names[i] = floatValues[i].intValue() + " " + getString(R.string.km_h);
floatValues[i] = floatValues[i] / 3.6f;
}
- cat.addPreference(createListPreference(settings.SAVE_TRACK_MIN_SPEED, names, floatValues,
+ cat.addPreference(createListPreference(settings.SAVE_TRACK_MIN_SPEED, names, floatValues,
R.string.save_track_min_speed, R.string.save_track_min_speed_descr));
cat.addPreference(createCheckBoxPreference(settings.AUTO_SPLIT_RECORDING, R.string.auto_split_recording_title,
R.string.auto_split_recording_descr));
cat.addPreference(createCheckBoxPreference(settings.DISABLE_RECORDING_ONCE_APP_KILLED, R.string.disable_recording_once_app_killed,
R.string.disable_recording_once_app_killed_descrp));
- cat.addPreference(createCheckBoxPreference(settings.STORE_TRACKS_IN_MONTHLY_DIRECTORIES, R.string.store_tracks_in_monthly_directories,
- R.string.store_tracks_in_monthly_directories_descrp));
+
+ Integer[] intValues = new Integer[]{REC_DIRECTORY, MONTHLY_DIRECTORY, DAILY_DIRECTORY};
+ names = new String[intValues.length];
+ names[0] = getString(R.string.store_tracks_in_rec_directory);
+ names[1] = getString(R.string.store_tracks_in_monthly_directories);
+ names[2] = getString(R.string.store_tracks_in_daily_directories);
+ cat.addPreference(createListPreference(settings.TRACK_STORAGE_DIRECTORY, names, intValues,
+ R.string.track_storage_directory, R.string.track_storage_directory_descrp));
}
@@ -129,7 +139,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
cat = new PreferenceCategory(this);
cat.setTitle(R.string.live_monitoring_m);
grp.addPreference(cat);
-
+
cat.addPreference(createEditTextPreference(settings.LIVE_MONITORING_URL, R.string.live_monitoring_url,
R.string.live_monitoring_url_descr));
final CheckBoxPreference liveMonitoring = createCheckBoxPreference(settings.LIVE_MONITORING, R.string.live_monitoring_m,
@@ -154,12 +164,12 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
public void updateAllSettings() {
super.updateAllSettings();
-
+
if(routeServiceEnabled != null) {
routeServiceEnabled.setChecked(getMyApplication().getNavigationService() != null);
}
}
-
+
private void saveCurrentTracks(final SavingTrackHelper helper) {
setProgressVisibility(true);
getMyApplication().getTaskManager().runInBackground(new OsmAndTaskRunnable() {
@@ -178,7 +188,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
}, (Void) null);
}
-
+
@Override
protected void onDestroy() {
super.onDestroy();
@@ -187,7 +197,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
broadcastReceiver = null;
}
}
-
+
diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java
index efc0376ffa..0f803f960f 100644
--- a/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java
+++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackBitmapDrawer.java
@@ -158,6 +158,7 @@ public class TrackBitmapDrawer {
.setLocation(clat, clon)
.setZoom(15)
.density(density)
+ .setMapDensity(density)
.setPixelDimensions(widthPixels, heightPixels, 0.5f, 0.5f);
rotatedTileBox = boxBuilder.build();
diff --git a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
index e2aa0d5d20..5356fedfa2 100644
--- a/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
+++ b/OsmAnd/src/net/osmand/plus/poi/PoiFiltersHelper.java
@@ -369,6 +369,7 @@ public class PoiFiltersHelper {
}
public void loadSelectedPoiFilters() {
+ selectedPoiFilters.clear();
Set filters = application.getSettings().getSelectedPoiFilters();
for (String f : filters) {
PoiUIFilter filter = getFilterById(f);
diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java
index dbe9633c44..3b11ca88a4 100644
--- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RouteOptionsBottomSheet.java
@@ -412,7 +412,7 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
routingHelper.recalculateRouteDueToSettingsChange();
return true;
}
- });
+ }, nightMode);
}
private void showOptionsMenu(final TextView gpxSpinner) {
diff --git a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java
index 447c5e8a36..ba5299fc04 100644
--- a/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/GeneralProfileSettingsFragment.java
@@ -48,6 +48,7 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme
setupUnitsOfLengthPref();
setupCoordinatesFormatPref();
setupAngularUnitsPref();
+ setupSpeedSystemPref();
setupKalmanFilterPref();
setupMagneticFieldSensorPref();
@@ -202,7 +203,24 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment impleme
ListPreferenceEx angularUnits = (ListPreferenceEx) findPreference(settings.ANGULAR_UNITS.getId());
angularUnits.setEntries(entries);
angularUnits.setEntryValues(entryValues);
- angularUnits.setIcon(getContentIcon(R.drawable.ic_action_angular_unit));
+ angularUnits.setIcon(getIcon(R.drawable.ic_action_angular_unit));
+ }
+
+ private void setupSpeedSystemPref() {
+ OsmandSettings.SpeedConstants[] speedConstants = OsmandSettings.SpeedConstants.values();
+ String[] entries = new String[speedConstants.length];
+ Integer[] entryValues = new Integer[speedConstants.length];
+
+ for (int i = 0; i < entries.length; i++) {
+ entries[i] = speedConstants[i].toHumanString(app);
+ entryValues[i] = speedConstants[i].ordinal();
+ }
+
+ ListPreferenceEx speedSystem = (ListPreferenceEx) findPreference(settings.SPEED_SYSTEM.getId());
+ speedSystem.setEntries(entries);
+ speedSystem.setEntryValues(entryValues);
+ speedSystem.setDescription(R.string.default_speed_system_descr);
+ speedSystem.setIcon(getContentIcon(R.drawable.ic_action_speed));
}
private void setupKalmanFilterPref() {
diff --git a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
index 6c4dd6ba70..c4ab399b6c 100644
--- a/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
+++ b/OsmAnd/src/net/osmand/plus/settings/RouteParametersFragment.java
@@ -15,7 +15,6 @@ import net.osmand.plus.OsmandSettings.BooleanPreference;
import net.osmand.plus.R;
import net.osmand.plus.activities.SettingsBaseActivity;
import net.osmand.plus.activities.SettingsNavigationActivity;
-import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper;
import net.osmand.plus.routing.RouteProvider;
import net.osmand.plus.settings.preferences.ListPreferenceEx;
import net.osmand.plus.settings.preferences.MultiSelectBooleanPreference;
@@ -30,6 +29,7 @@ import java.util.Map;
import java.util.Set;
import static net.osmand.plus.activities.SettingsNavigationActivity.getRouter;
+import static net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DRIVING_STYLE;
public class RouteParametersFragment extends BaseSettingsFragment {
@@ -43,6 +43,7 @@ public class RouteParametersFragment extends BaseSettingsFragment {
private List avoidParameters = new ArrayList();
private List preferParameters = new ArrayList();
+ private List drivingStyleParameters = new ArrayList();
private List reliefFactorParameters = new ArrayList();
private List otherRoutingParameters = new ArrayList();
@@ -118,7 +119,7 @@ public class RouteParametersFragment extends BaseSettingsFragment {
clearParameters();
if (router != null) {
Map parameters = router.getParameters();
- if (parameters.containsKey(GeneralRouter.USE_SHORTEST_WAY)) {
+ if (!am.isDerivedRoutingFrom(ApplicationMode.CAR)) {
screen.addPreference(fastRoute);
}
for (Map.Entry e : parameters.entrySet()) {
@@ -130,14 +131,19 @@ public class RouteParametersFragment extends BaseSettingsFragment {
preferParameters.add(routingParameter);
} else if (RELIEF_SMOOTHNESS_FACTOR.equals(routingParameter.getGroup())) {
reliefFactorParameters.add(routingParameter);
- } else if (!param.equals(GeneralRouter.USE_SHORTEST_WAY)
+ } else if (DRIVING_STYLE.equals(routingParameter.getGroup())) {
+ drivingStyleParameters.add(routingParameter);
+ } else if ((!param.equals(GeneralRouter.USE_SHORTEST_WAY) || am.isDerivedRoutingFrom(ApplicationMode.CAR))
&& !param.equals(GeneralRouter.VEHICLE_HEIGHT)
&& !param.equals(GeneralRouter.VEHICLE_WEIGHT)
- && !param.equals(GeneralRouter.VEHICLE_WIDTH)
- && !RoutingOptionsHelper.DRIVING_STYLE.equals(routingParameter.getGroup())) {
+ && !param.equals(GeneralRouter.VEHICLE_WIDTH)) {
otherRoutingParameters.add(routingParameter);
}
}
+ if (drivingStyleParameters.size() > 0) {
+ ListPreferenceEx drivingStyleRouting = createRoutingBooleanListPreference(DRIVING_STYLE, drivingStyleParameters);
+ screen.addPreference(drivingStyleRouting);
+ }
if (avoidParameters.size() > 0) {
MultiSelectBooleanPreference avoidRouting = new MultiSelectBooleanPreference(app);
avoidRouting.setKey(AVOID_ROUTING_PARAMETER_PREFIX);
@@ -179,27 +185,8 @@ public class RouteParametersFragment extends BaseSettingsFragment {
screen.addPreference(preferRouting);
}
if (reliefFactorParameters.size() > 0) {
- String defaultTitle = Algorithms.capitalizeFirstLetterAndLowercase(RELIEF_SMOOTHNESS_FACTOR.replace('_', ' '));
- String title = SettingsBaseActivity.getRoutingStringPropertyName(app, RELIEF_SMOOTHNESS_FACTOR, defaultTitle);
-
- Object[] entryValues = new Object[reliefFactorParameters.size()];
- String[] entries = new String[entryValues.length];
-
- String selectedParameterId = null;
- for (int i = 0; i < reliefFactorParameters.size(); i++) {
- GeneralRouter.RoutingParameter parameter = reliefFactorParameters.get(i);
- entryValues[i] = parameter.getId();
- entries[i] = SettingsNavigationActivity.getRoutinParameterTitle(app, parameter);
- if (SettingsNavigationActivity.isRoutingParameterSelected(settings, am, parameter)) {
- selectedParameterId = parameter.getId();
- }
- }
-
- ListPreferenceEx reliefFactorRouting = createListPreferenceEx(RELIEF_SMOOTHNESS_FACTOR, entries, entryValues, title, R.layout.preference_with_descr);
- reliefFactorRouting.setPersistent(false);
- reliefFactorRouting.setValue(selectedParameterId);
+ ListPreferenceEx reliefFactorRouting = createRoutingBooleanListPreference(RELIEF_SMOOTHNESS_FACTOR, reliefFactorParameters);
reliefFactorRouting.setDescription(R.string.relief_smoothness_factor_descr);
- reliefFactorRouting.setIconSpaceReserved(true);
screen.addPreference(reliefFactorRouting);
}
@@ -243,13 +230,12 @@ public class RouteParametersFragment extends BaseSettingsFragment {
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
- if (RELIEF_SMOOTHNESS_FACTOR.equals(key)) {
- if (newValue instanceof String) {
- String selectedParameterId = (String) newValue;
- for (GeneralRouter.RoutingParameter parameter : reliefFactorParameters) {
- String parameterId = parameter.getId();
- SettingsNavigationActivity.setRoutingParameterSelected(settings, getSelectedAppMode(), parameterId, parameter.getDefaultBoolean(), parameterId.equals(selectedParameterId));
- }
+ if ((RELIEF_SMOOTHNESS_FACTOR.equals(key) || DRIVING_STYLE.equals(key)) && newValue instanceof String) {
+ String selectedParameterId = (String) newValue;
+ List routingParameters = DRIVING_STYLE.equals(key) ? drivingStyleParameters : reliefFactorParameters;
+ for (GeneralRouter.RoutingParameter parameter : routingParameters) {
+ String parameterId = parameter.getId();
+ SettingsNavigationActivity.setRoutingParameterSelected(settings, getSelectedAppMode(), parameterId, parameter.getDefaultBoolean(), parameterId.equals(selectedParameterId));
}
return true;
}
@@ -257,9 +243,36 @@ public class RouteParametersFragment extends BaseSettingsFragment {
return super.onPreferenceChange(preference, newValue);
}
+ private ListPreferenceEx createRoutingBooleanListPreference(String groupKey, List routingParameters) {
+ String defaultTitle = Algorithms.capitalizeFirstLetterAndLowercase(groupKey.replace('_', ' '));
+ String title = SettingsBaseActivity.getRoutingStringPropertyName(app, groupKey, defaultTitle);
+ ApplicationMode am = settings.getApplicationMode();
+
+ Object[] entryValues = new Object[routingParameters.size()];
+ String[] entries = new String[entryValues.length];
+
+ String selectedParameterId = null;
+ for (int i = 0; i < routingParameters.size(); i++) {
+ GeneralRouter.RoutingParameter parameter = routingParameters.get(i);
+ entryValues[i] = parameter.getId();
+ entries[i] = SettingsNavigationActivity.getRoutinParameterTitle(app, parameter);
+ if (SettingsNavigationActivity.isRoutingParameterSelected(settings, am, parameter)) {
+ selectedParameterId = parameter.getId();
+ }
+ }
+
+ ListPreferenceEx routingListPref = createListPreferenceEx(groupKey, entries, entryValues, title, R.layout.preference_with_descr);
+ routingListPref.setPersistent(false);
+ routingListPref.setValue(selectedParameterId);
+ routingListPref.setIcon(getRoutingPrefIcon(groupKey));
+
+ return routingListPref;
+ }
+
private void clearParameters() {
avoidParameters.clear();
preferParameters.clear();
+ drivingStyleParameters.clear();
reliefFactorParameters.clear();
otherRoutingParameters.clear();
}
@@ -268,8 +281,12 @@ public class RouteParametersFragment extends BaseSettingsFragment {
switch (prefId) {
case GeneralRouter.ALLOW_PRIVATE:
return getIcon(R.drawable.ic_action_private_access);
+ case GeneralRouter.USE_SHORTEST_WAY:
+ return getContentIcon(R.drawable.ic_action_fuel);
case AVOID_ROUTING_PARAMETER_PREFIX:
return getContentIcon(R.drawable.ic_action_alert);
+ case DRIVING_STYLE:
+ return getContentIcon(R.drawable.ic_action_bicycle_dark);
case "fast_route_mode":
return getIcon(R.drawable.ic_action_fastest_route);
case "enable_time_conditional_routing":
diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
index 9909badc2c..a84587cc3d 100644
--- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
+++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java
@@ -399,10 +399,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
return getZoom() > LOWEST_ZOOM_TO_ROTATE;
}
- public void setRotate(float rotate) {
+ public void setRotate(float rotate, boolean force) {
if (isMapRotateEnabled()) {
float diff = MapUtils.unifyRotationDiff(rotate, getRotate());
- if (Math.abs(diff) > 5) { // check smallest rotation
+ if (Math.abs(diff) > 5 || force) { // check smallest rotation
animatedDraggingThread.startRotate(rotate);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
index edc4d8c87f..9f874881b8 100644
--- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java
@@ -38,8 +38,8 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.render.RenderingIcons;
-import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.IRouteInformationListener;
+import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.MapTextLayer.MapTextProvider;
import net.osmand.util.Algorithms;
@@ -185,7 +185,6 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
mapTextLayer = view.getLayerByClass(MapTextLayer.class);
}
-
public int getRadiusPoi(RotatedTileBox tb) {
int r;
final double zoom = tb.getZoom();
@@ -200,6 +199,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
} else {
r = 18;
}
+
return (int) (r * view.getScaleCoefficient());
}
@@ -405,8 +405,13 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
}
@Override
- public int getTextShift(Amenity o, RotatedTileBox rb) {
- return getRadiusPoi(rb);
+ public int getTextShift(Amenity amenity, RotatedTileBox rb) {
+ int radiusPoi = getRadiusPoi(rb);
+ if (isPresentInFullObjects(amenity.getLocation())) {
+ radiusPoi += poiBackground.getHeight() / 2 - poiBackgroundSmall.getHeight() / 2;
+ }
+
+ return radiusPoi;
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
index 6c610dde71..87c2a15d0d 100644
--- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java
@@ -64,6 +64,7 @@ public class RulerControlLayer extends OsmandMapLayer {
private QuadPoint cacheCenter;
private float cacheMapDensity;
private OsmandSettings.OsmandPreference mapDensity;
+ private OsmandSettings.MetricsConstants cacheMetricSystem;
private int cacheIntZoom;
private double cacheTileX;
private double cacheTileY;
@@ -127,7 +128,8 @@ public class RulerControlLayer extends OsmandMapLayer {
public void initLayer(final OsmandMapTileView view) {
app = mapActivity.getMyApplication();
this.view = view;
- mapDensity = mapActivity.getMyApplication().getSettings().MAP_DENSITY;
+ mapDensity = app.getSettings().MAP_DENSITY;
+ cacheMetricSystem = app.getSettings().METRIC_SYSTEM.get();
cacheMapDensity = mapDensity.get();
cacheDistances = new ArrayList<>();
cacheCenter = new QuadPoint();
@@ -443,10 +445,13 @@ public class RulerControlLayer extends OsmandMapLayer {
updateCenter(tb, center);
}
- boolean move = tb.getZoom() != cacheIntZoom || Math.abs(tb.getCenterTileX() - cacheTileX) > 1 ||
- Math.abs(tb.getCenterTileY() - cacheTileY) > 1 || mapDensity.get() != cacheMapDensity;
+ OsmandSettings.MetricsConstants currentMetricSystem = app.getSettings().METRIC_SYSTEM.get();
+ boolean updateCache = tb.getZoom() != cacheIntZoom || Math.abs(tb.getCenterTileX() - cacheTileX) > 1
+ || Math.abs(tb.getCenterTileY() - cacheTileY) > 1 || mapDensity.get() != cacheMapDensity
+ || cacheMetricSystem != currentMetricSystem;
- if (!tb.isZoomAnimated() && move) {
+ if (!tb.isZoomAnimated() && updateCache) {
+ cacheMetricSystem = currentMetricSystem;
cacheIntZoom = tb.getZoom();
cacheTileX = tb.getCenterTileX();
cacheTileY = tb.getCenterTileY();
diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
index 2b3d93d559..c27858ce3d 100644
--- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
+++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java
@@ -92,8 +92,9 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
setupToolbar((Toolbar) mainView.findViewById(R.id.toolbar));
+ int appBarTextColor = nightMode ? R.color.wikivoyage_app_bar_text_dark : R.color.wikivoyage_app_bar_text_light;
articleToolbarText = (TextView) mainView.findViewById(R.id.article_toolbar_text);
- articleToolbarText.setTextColor(ContextCompat.getColor(getContext(), R.color.text_color_primary_dark));
+ articleToolbarText.setTextColor(ContextCompat.getColor(getContext(), appBarTextColor));
ColorStateList selectedLangColorStateList = AndroidUtils.createPressedColorStateList(
getContext(), nightMode,
R.color.icon_color_default_light, R.color.wikivoyage_active_light,