diff --git a/OsmAnd/res/drawable-hdpi/ic_type_audio.png b/OsmAnd/res/drawable-hdpi/ic_type_audio.png deleted file mode 100644 index 0dcf78638f..0000000000 Binary files a/OsmAnd/res/drawable-hdpi/ic_type_audio.png and /dev/null differ diff --git a/OsmAnd/res/drawable-mdpi/ic_type_audio.png b/OsmAnd/res/drawable-mdpi/ic_type_audio.png deleted file mode 100644 index 4a4caeaad3..0000000000 Binary files a/OsmAnd/res/drawable-mdpi/ic_type_audio.png and /dev/null differ diff --git a/OsmAnd/res/drawable-xhdpi/ic_type_audio.png b/OsmAnd/res/drawable-xhdpi/ic_type_audio.png deleted file mode 100644 index 735f091480..0000000000 Binary files a/OsmAnd/res/drawable-xhdpi/ic_type_audio.png and /dev/null differ diff --git a/OsmAnd/res/drawable-xxhdpi/ic_type_audio.png b/OsmAnd/res/drawable-xxhdpi/ic_type_audio.png deleted file mode 100644 index c6a7816a59..0000000000 Binary files a/OsmAnd/res/drawable-xxhdpi/ic_type_audio.png and /dev/null differ diff --git a/OsmAnd/res/drawable/ic_action_minimal_distance.xml b/OsmAnd/res/drawable/ic_action_minimal_distance.xml new file mode 100644 index 0000000000..e46c3e9a61 --- /dev/null +++ b/OsmAnd/res/drawable/ic_action_minimal_distance.xml @@ -0,0 +1,20 @@ + + + + + diff --git a/OsmAnd/res/drawable/ic_action_navigation_type_direct_to.xml b/OsmAnd/res/drawable/ic_action_navigation_type_direct_to.xml index 50f120c40f..8823547f7d 100644 --- a/OsmAnd/res/drawable/ic_action_navigation_type_direct_to.xml +++ b/OsmAnd/res/drawable/ic_action_navigation_type_direct_to.xml @@ -4,24 +4,23 @@ android:viewportWidth="24" android:viewportHeight="24"> - - - + android:fillAlpha="0.5"/> + + + + diff --git a/OsmAnd/res/drawable/ic_type_audio.xml b/OsmAnd/res/drawable/ic_type_audio.xml new file mode 100644 index 0000000000..4b6b93dd87 --- /dev/null +++ b/OsmAnd/res/drawable/ic_type_audio.xml @@ -0,0 +1,9 @@ + + + diff --git a/OsmAnd/res/layout/bottom_sheet_item_title_big.xml b/OsmAnd/res/layout/bottom_sheet_item_title_big.xml index ad594bb7d8..7037293289 100644 --- a/OsmAnd/res/layout/bottom_sheet_item_title_big.xml +++ b/OsmAnd/res/layout/bottom_sheet_item_title_big.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="@dimen/bottom_sheet_title_height" android:ellipsize="end" - android:gravity="bottom" + android:gravity="center_vertical" android:letterSpacing="@dimen/text_button_letter_spacing" android:maxLines="1" android:minHeight="@dimen/bottom_sheet_title_height" diff --git a/OsmAnd/res/layout/osm_login_data.xml b/OsmAnd/res/layout/osm_login_data.xml index 26dbdd85e5..1e5e4a87de 100644 --- a/OsmAnd/res/layout/osm_login_data.xml +++ b/OsmAnd/res/layout/osm_login_data.xml @@ -6,7 +6,7 @@ android:orientation="vertical" android:paddingLeft="@dimen/content_padding" android:paddingRight="@dimen/content_padding" - android:paddingBottom="@dimen/route_info_list_text_padding"> + android:paddingBottom="@dimen/dialog_button_height"> + android:layout_marginStart="@dimen/dialog_content_margin" + android:layout_marginLeft="@dimen/dialog_content_margin" + android:layout_marginTop="@dimen/content_padding_small" + android:layout_marginEnd="@dimen/content_padding_small" + android:layout_marginRight="@dimen/content_padding_small" + android:layout_marginBottom="@dimen/content_padding_small" + android:orientation="vertical"> @@ -47,7 +50,6 @@ android:letterSpacing="@dimen/description_letter_spacing" android:maxLines="1" android:paddingTop="@dimen/content_padding_small" - android:paddingBottom="@dimen/content_padding_small" android:textColor="?attr/active_color_basic" android:textSize="@dimen/default_desc_text_size" osmand:typeface="@string/font_roboto_medium" diff --git a/OsmAnd/res/values-ar/strings.xml b/OsmAnd/res/values-ar/strings.xml index 59f5848af5..ebd35d66fe 100644 --- a/OsmAnd/res/values-ar/strings.xml +++ b/OsmAnd/res/values-ar/strings.xml @@ -3379,9 +3379,6 @@ الحد الأدنى للسرعة دقة الحد الأدنى الحد الأدنى للإزاحة - القائمة - الأماكن الخاصة بي - المسارات - القائمة - الأماكن الخاصة بي - ملاحظات - القائمة - أماكني - تعديلات OSM إعادة تعيين إعدادات البرنامج المساعد الافتراضي تقسيم المسجل استخدام تطبيق النظام diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index 43210c308d..caf69f7cfb 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -437,7 +437,7 @@ Underlay-Karte Underlay-Karte auswählen Overlay-Karte… - Keine(r/s) + Keine Overlay-Karte Overlay-Karte auswählen Karte schon installiert, Einstellungen werden aktualisiert. @@ -1227,7 +1227,7 @@ Als Favoritengruppe speichern Ziele auswählen Nach Entfernung sortieren - Nach Name sortieren + Nach Namen sortieren Zoomtasten bei Navigation anzeigen. Zoomtasten anzeigen Keine Downloads gefunden, bitte die Internet-Verbindung überprüfen. @@ -2137,9 +2137,9 @@ Lon %2$s Eine Schaltfläche zum Hinzufügen einer Kartenmarkierung in der Bildschirmmitte. Ort Favoriten ein-/ausblenden - Taste, um eine Audio-Notiz in der Bildschirmmitte einzufügen. - Taste, um eine Video-Notiz in der Bildschirmmitte einzufügen. - Taste, um eine Foto-Notiz in der Bildschirmmitte einzufügen. + Eine Schaltfläche, um eine Audio-Notiz in der Bildschirmmitte einzufügen. + Eine Schaltfläche, um eine Video-Notiz in der Bildschirmmitte einzufügen. + Eine Schaltfläche, um eine Foto-Notiz in der Bildschirmmitte einzufügen. POI ein-/ausblenden %1$s anzeigen %1$s ausblenden @@ -2170,8 +2170,8 @@ Lon %2$s Wählen Sie eine beliebige Kategorie. Schnellaktion Eine Schaltfläche, um einen GPX-Wegpunkt in der Bildschirmmitte einzufügen. - Taste, um eine OSM-Notiz in der Bildschirmmitte einzufügen. - Taste, um einen POI in der Bildschirmmitte einzufügen. + Eine Schaltfläche, um eine OSM-Notiz in der Bildschirmmitte einzufügen. + Eine Schaltfläche, um einen POI in der Bildschirmmitte einzufügen. Umschalter, um die Sprachansagen während der Navigation ein- oder auszuschalten. Taste, um eine Parkposition in der Bildschirmmitte einzufügen. Dialog zum Bearbeiten anzeigen @@ -3466,9 +3466,6 @@ Lon %2$s Mindesttempo Minimale Genauigkeit Minimale Verschiebung - \'Menü → Meine Orte → Tracks\' - \'Menü → Meine Orte → Notizen\' - \'Menü → Meine Orte → OSM-Änderungen\' Plugin-Einstellungen auf Voreinstellung zurücksetzen Autorisierung ist erfolgreich Verfügbar @@ -3495,7 +3492,7 @@ Lon %2$s Online-Aufzeichnung Aufgezeichnete Daten löschen Koordinaten kopieren - Bemerkung: Geschwindigkeit > 0 Kontrolle: Die meisten GPS-Chipsätze geben nur dann einen Geschwindigkeitswert an, wenn der Algorithmus feststellt, dass Sie in Bewegung sind, und keinen, wenn Sie nicht in Bewegung sind. Die Verwendung der Einstellung > 0 in diesem Filter nutzt also gewissermaßen die Bewegungserkennung des GPS-Chipsatzes. Aber selbst wenn nicht zur Aufnahmezeit gefiltert wurde, verwenden wir diese Funktion in unserer GPX-Analyse, um die Distanz korrigiert zu bestimmen, d.h. der in diesem Feld angezeigte Wert ist die während der Bewegung aufgezeichnete Distanz. + Bemerkung: Geschwindigkeit > 0 Kontrolle: Die meisten GPS-Chipsätze geben nur dann einen Geschwindigkeitswert an, wenn der Algorithmus feststellt, dass Sie in Bewegung sind, und keinen, wenn Sie nicht in Bewegung sind. Die Verwendung der Einstellung > 0 in diesem Filter nutzt also gewissermaßen die Bewegungserkennung des GPS-Chipsatzes. Aber selbst wenn nicht zur Aufnahmezeit gefiltert wurde, verwenden wir diese Funktion in unserer GPX-Analyse, um die Distanz korrigiert zu bestimmen, d. h., der in diesem Feld angezeigte Wert ist die während der Bewegung aufgezeichnete Distanz. Nebeneffekt: Als Ergebnis der Filterung nach Genauigkeit können Punkte z.B. unter Brücken, unter Bäumen, zwischen hohen Gebäuden oder bei bestimmten Wetterbedingungen ganz fehlen. Empfehlung: Es ist schwer vorherzusagen, was aufgezeichnet wird und was nicht, es ist vielleicht am besten, diesen Filter auszuschalten. Dieser Filter verhindert, dass doppelte Punkte aufgenommen werden, bei denen möglicherweise zu wenig tatsächliche Bewegung stattgefunden hat, und sorgt für ein schöneres räumliches Erscheinungsbild von Spuren, die später nicht nachbearbeitet werden. @@ -3526,4 +3523,5 @@ Lon %2$s \n • Karte der Antarktis hinzugefügt \n \n + Nach Kategorie sortieren \ No newline at end of file diff --git a/OsmAnd/res/values-el/strings.xml b/OsmAnd/res/values-el/strings.xml index f6bcca313a..239430492b 100644 --- a/OsmAnd/res/values-el/strings.xml +++ b/OsmAnd/res/values-el/strings.xml @@ -3456,9 +3456,6 @@ Ελάχιστη ταχύτητα Ελάχιστη ακρίβεια Ελάχιστη μετατόπιση - Μενού — Οι τοποθεσίες μου — Ίχνη - Μενού — Οι τοποθεσίες μου — Σημειώσεις - Μενού — Οι τοποθεσίες μου — Επεξεργασίες OSM Επαναφορά ρυθμίσεων προσθέτου στην προεπιλογή Καταγραφή διαίρεσης Χρήση εφαρμογής συστήματος diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml index 8f4b883e7a..354311ef3c 100644 --- a/OsmAnd/res/values-eo/strings.xml +++ b/OsmAnd/res/values-eo/strings.xml @@ -3447,9 +3447,6 @@ Indikas lokon: %1$s x %2$s" Minimuma rapido Minimuma precizo Minimuma delokiĝo - menuo → miaj ejoj → spuroj - menuo → mia ejoj → notoj - menuo → miaj ejoj → OSM‑redaktoj Restarigi implicitajn agordojn de kromprogramo Dividilo de registraĵoj Uzi sisteman aplikaĵon diff --git a/OsmAnd/res/values-es-rAR/strings.xml b/OsmAnd/res/values-es-rAR/strings.xml index f97c2b626e..56ff4f1511 100644 --- a/OsmAnd/res/values-es-rAR/strings.xml +++ b/OsmAnd/res/values-es-rAR/strings.xml @@ -3475,9 +3475,6 @@ Lon %2$s Velocidad mínima Precisión mínima Desplazamiento mínimo - Menú → Mis sitios → Trazas - Menú → Mis sitios → Notas multimedia - Menú → Mis sitios → Ediciones de OSM Restablecer ajustes del complemento a valores predefinidos División de grabación Usar la aplicación del sistema diff --git a/OsmAnd/res/values-es-rUS/strings.xml b/OsmAnd/res/values-es-rUS/strings.xml index 00bf2efa45..8376bf647c 100644 --- a/OsmAnd/res/values-es-rUS/strings.xml +++ b/OsmAnd/res/values-es-rUS/strings.xml @@ -3474,9 +3474,6 @@ Lon %2$s Velocidad mínima Precisión mínima Desplazamiento mínimo - Menú — Mis sitios — Trazas - Menú — Mis sitios — Notas - Menú — Mis sitios — Ediciones de OSM Restablecer ajustes del complemento a valores predefinidos División de grabación Usar la aplicación del sistema diff --git a/OsmAnd/res/values-et/strings.xml b/OsmAnd/res/values-et/strings.xml index 434902278f..ba678ff5ac 100644 --- a/OsmAnd/res/values-et/strings.xml +++ b/OsmAnd/res/values-et/strings.xml @@ -3400,9 +3400,6 @@ Vähim kiirus Vähim täpsus Vähim kõrvalekalle - Menüü — Minu kohad — Rajad - Menüü — Minu kohad — Märkmed - Menüü — Minu kohad — OSM Muudatused Lähtesta lisaprogrammi seaded vaikeväärtustele Salvesti jagamine Kasuta süsteemi rakendust diff --git a/OsmAnd/res/values-fa/strings.xml b/OsmAnd/res/values-fa/strings.xml index a8f1754768..5020df333e 100644 --- a/OsmAnd/res/values-fa/strings.xml +++ b/OsmAnd/res/values-fa/strings.xml @@ -3472,9 +3472,6 @@ کمترین سرعت کمترین صحت کمترین جابجایی - منو — مکان‌های من — ردها - منو — مکان‌های من — یادداشت‌ها - منو — مکان‌های من — ویرایش‌های OSM بازنشانی تنظیمات افزونه به پیشفرض امتیاز بدهید ناوبری، صحت ردنگاری diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 46ff574a27..15df8bbe0e 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -3448,9 +3448,6 @@ représentant la zone : %1$s x %2$s Seuls les points mesurés avec un minimum de précision en mètres/pieds (information communiquée par votre puce GPS) seront enregistrés. La précision fait référence à la dispersion de plusieurs mesures successives et n\'est pas directement liée à la distance entre ces mesures et votre position réelle. Effet secondaire : avec le filtrage par précision certains points peuvent manquer ; par exemple : sous un pont, en forêt, entre de hauts bâtiments ou dans certaines conditions météorologiques. Remarque : si la localisation GPS est activée juste avant le début d\'enregistrement, la première position peut être imprécise. L\'application pourrait attendre quelques secondes avant d\'enregistrer un point (ou enregistrer le meilleur de 3 points successifs, etc), mais ces évolutions ne sont pas encore disponibles. - Menu > Mes lieux favoris > Traces - Menu > Mes lieux favoris > Notes - Menu > Mes lieux favoris > Modifications OSM Remarque : vérification de vitesse > 0. La plupart des puces GPS fournissent une vitesse uniquement lorsque vous êtes en mouvement. Par conséquent, l\'indication du paramètre > 0 pour ce filtre utilise la détection de mouvement par la puce GPS. Mais même s\'il n\'est pas filtré ici au moment de l\'enregistrement, nous utilisons toujours cette fonctionnalité dans notre analyse des traces GPX pour déterminer la distance corrigée, c\'est-à-dire que la valeur affichée dans ce champ est la distance enregistrée en déplacement. Effet secondaire : les périodes de repos ne seront pas enregistrées ou seulement par un point. De petits mouvements, comme des pas sur le côté, pourront être ignorés. Votre fichier contiendra moins d\'informations exploitables en post-traitement et aura des statistiques moins exactes (éliminant les points redondants mais conservant les erreurs de position dues à une mauvaise réception ou aux artefacts de la puce GPS). Disponible diff --git a/OsmAnd/res/values-gl/strings.xml b/OsmAnd/res/values-gl/strings.xml index c901a8f015..ee1678c02b 100644 --- a/OsmAnd/res/values-gl/strings.xml +++ b/OsmAnd/res/values-gl/strings.xml @@ -3525,9 +3525,6 @@ Lon %2$s Velocidade mínima Precisión mínima Desprazamiento mínimo - Menú — Os meus lugares — Pistas - Menú — Os meus lugares — Notas - Menú — Os meus lugares — Edicións do OSM Restabelecer a configuración do plugin ós valores por defecto División de gravación Empregar aplicación do sistema diff --git a/OsmAnd/res/values-is/strings.xml b/OsmAnd/res/values-is/strings.xml index 586b559b21..813231e2f6 100644 --- a/OsmAnd/res/values-is/strings.xml +++ b/OsmAnd/res/values-is/strings.xml @@ -3472,9 +3472,6 @@ Stendur fyrir svæði: %1$s x %2$s Lágmarkshraði Lágmarksnákvæmni Minnsta hreyfing - Valmynd — Staðirnir mínir — Ferlar - Valmynd — Staðirnir mínir — Minnispunktar - Valmynd — Staðirnir mínir — OSM-breytingar Frumstilla stillingar viðbótar á sjálfgefin gildi Uppskipting upptöku Nota kerfisforrit diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml index 41c6b3012c..7996a6fa44 100644 --- a/OsmAnd/res/values-ja/strings.xml +++ b/OsmAnd/res/values-ja/strings.xml @@ -3474,9 +3474,6 @@ POIの更新は利用できません OSM ナビゲーションまたは移動中にアイコンが表示されます。 静止時にアイコンが表示されます - メニュー — ブックマーク — 経路 - メニュー — ブックマーク — メモ - メニュー — ブックマーク — OSM編集 プラグイン設定を初期値に戻す 記録を分割 システムアプリを使用 diff --git a/OsmAnd/res/values-pl/strings.xml b/OsmAnd/res/values-pl/strings.xml index 1d50859dff..8cef0745f4 100644 --- a/OsmAnd/res/values-pl/strings.xml +++ b/OsmAnd/res/values-pl/strings.xml @@ -3456,9 +3456,6 @@ Reprezentuje obszar: %1$s x %2$s Ten filtr zapobiega zapisywaniu zduplikowanych punktów, w których mógł wystąpić zbyt mały rzeczywisty ruch, zapewnia ładniejszy przestrzenny wygląd ścieżek, które nie są później przetwarzane. Nie można przeanalizować intencji geograficznej \'%s\'. Twoje uwagi OSM są w %1$s. - Menu — Miejsca — Ślady - Menu — Miejsca — Uwagi - Menu — Miejsca — Edycje OSM Autoryzacja zakończyła się pomyślnie Efekt uboczny: Twoja trasa nie będzie zawierać sekcji, w których nie zostało spełnione kryterium minimalnej prędkości (np. gdy pchałeś rower pod strome wzgórze). Również nie będzie informacji o okresach odpoczynku, np. przerwach. Ma to efekt na analizy i przetwarzanie końcowe, np. przy próbie określenia całkowitej długości wycieczki, czasu w ruchu lub średniej prędkości. Zmień układ kategorii diff --git a/OsmAnd/res/values-pt-rBR/strings.xml b/OsmAnd/res/values-pt-rBR/strings.xml index 40ddea689c..7a954236b0 100644 --- a/OsmAnd/res/values-pt-rBR/strings.xml +++ b/OsmAnd/res/values-pt-rBR/strings.xml @@ -3462,9 +3462,6 @@ Pôr do Sol: %2$s Velocidade mínima Precisão mínima Deslocamento mínimo - Menu - Meus lugares - Faixas - Menu - Meus lugares - Notas - Menu - Meus lugares - Edições OSM Redefinir as configurações do plug-in para o padrão Divisão do gravador Usar aplicativo do sistema diff --git a/OsmAnd/res/values-sc/strings.xml b/OsmAnd/res/values-sc/strings.xml index 068e56cedd..60010046ba 100644 --- a/OsmAnd/res/values-sc/strings.xml +++ b/OsmAnd/res/values-sc/strings.xml @@ -3459,9 +3459,6 @@ Pro praghere iscrie su còdighe intreu Lestresa mìnima Acuradesa mìnima Movimentu mìnimu - Menù — Logos meos — Rastas - Menù — Logos meos — Notas - Menù — Logos meos — Modìficas de OSM Riprìstina sas impostatziones predefinidas de s\'estensione Imprea s\'aplicatzione de sistema Sonu de s\'oturadore de sa fotocàmera diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index f4d8f4f875..d57df4665f 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -3445,9 +3445,6 @@ Zodpovedá oblasti: %1$s x %2$s Minimálna rýchlosť Minimálna presnosť Minimálny posun - Menu — Moje miesta — Stopy - Menu — Moje miesta — Poznámky - Menu — Moje miesta — Zmeny v OSM Resetovať modul do východzieho stavu Rozdelenie nahrávania Použiť systémovú aplikáciu diff --git a/OsmAnd/res/values-sr/strings.xml b/OsmAnd/res/values-sr/strings.xml index 7338e5ad8e..cd92a20648 100644 --- a/OsmAnd/res/values-sr/strings.xml +++ b/OsmAnd/res/values-sr/strings.xml @@ -3465,9 +3465,6 @@ Минимална брзина Минимална прецизност Минимални померај - Мени — Моја места — Стазе - Мени — Моја места — Белешке - Мени — Моја места — OSM измене Ресетуј поставке додатака на подразумеване вредности Издељивање снимања Користи системску апликацију diff --git a/OsmAnd/res/values-tr/strings.xml b/OsmAnd/res/values-tr/strings.xml index 2cf95a6c5d..eebcb0d470 100644 --- a/OsmAnd/res/values-tr/strings.xml +++ b/OsmAnd/res/values-tr/strings.xml @@ -3430,9 +3430,6 @@ Minimum hız Minimum doğruluk Minimum yer değiştirme - Menü — Yerlerim — İzlenen yollar - Menü — Yerlerim — Notlar - Menü — Yerlerim — OSM Düzenlemeleri Eklenti ayarlarını varsayılana sıfırla Kaydedici bölmesi Sistem uygulamasını kullan diff --git a/OsmAnd/res/values-uk/strings.xml b/OsmAnd/res/values-uk/strings.xml index 0b57560cdc..cad393844c 100644 --- a/OsmAnd/res/values-uk/strings.xml +++ b/OsmAnd/res/values-uk/strings.xml @@ -3465,9 +3465,6 @@ Найменша швидкість Найменша точність Найменше зміщення - Меню - Мої місця - Треки - Меню — Мої місця — Примітки - Меню — Мої місця — OSM правки Скинути налаштування втулка до усталених Розділений записувач Використовувати системний застосунок diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 87b5740507..4e76939461 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -3465,9 +3465,6 @@ 最低速度 最低精密度 最小偏移 - 選單 — 我的收藏 — 軌跡 - 選單 — 我的收藏 — 註記 - 選單 — 我的收藏 — OSM 編輯 重設外掛程式設定為預設值 記錄器分黎 使用系統應用程式 diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 4e7af07263..e4123dc67c 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -22,6 +22,11 @@ OsmAnd already has elements with the same names as those imported.\n\nSelect an action. Some items already exist Select the data to be imported. + Open settings + Plugin disabled + This plugin is a separate application, you will need to remove it separately if you no longer plan to use it.\n\nThe plugin will remain on the device after removing OsmAnd. + Menu + %1$s — %2$s — %3$s Direct-to-point Clear recorded data @@ -82,9 +87,6 @@ Minimum speed Minimum accuracy Minimum displacement - Menu — My places — Tracks - Menu — My places — Notes - Menu — My places — OSM Edits Reset plugin settings to default Recorder split Use system app @@ -2810,6 +2812,7 @@ Africa Asia Australia and Oceania + Antarctica Worldwide and topic maps Worldwide Wikipedia POIs Voice prompts (recorded, limited features) diff --git a/OsmAnd/res/xml/accessibility_settings.xml b/OsmAnd/res/xml/accessibility_settings.xml index 69e92ecc50..3c1096fe37 100644 --- a/OsmAnd/res/xml/accessibility_settings.xml +++ b/OsmAnd/res/xml/accessibility_settings.xml @@ -12,10 +12,10 @@ android:title="@string/accessibility_mode_disabled" /> enabledPlugins, @NonNull OsmandPlugin plugin) { boolean marketEnabled = Version.isMarketEnabled(app); - boolean pckg = checkPluginPackage(app, plugin); + boolean pckg = plugin.pluginAvailable(app); boolean paid = plugin.isPaid(); if ((Version.isDeveloperVersion(app) || !Version.isProductionVersion(app)) && !paid) { // for test reasons @@ -276,7 +285,7 @@ public abstract class OsmandPlugin { public static void checkInstalledMarketPlugins(@NonNull OsmandApplication app, @Nullable Activity activity) { Set enabledPlugins = app.getSettings().getEnabledPlugins(); for (OsmandPlugin plugin : OsmandPlugin.getMarketPlugins()) { - if (plugin.getInstallURL() != null && checkPluginPackage(app, plugin)) { + if (plugin.getInstallURL() != null && plugin.pluginAvailable(app)) { plugin.onInstall(app, activity); initPlugin(app, plugin); } @@ -284,13 +293,12 @@ public abstract class OsmandPlugin { } } - private static boolean checkPluginPackage(OsmandApplication app, OsmandPlugin plugin) { - return plugin.checkPluginPackage(app); - + protected boolean pluginAvailable(OsmandApplication app) { + return checkPluginPackage(app, this); } - protected boolean checkPluginPackage(OsmandApplication app) { - return isPackageInstalled(getComponentId1(), app) || isPackageInstalled(getComponentId2(), app); + public static boolean checkPluginPackage(@NonNull OsmandApplication app, @NonNull OsmandPlugin plugin) { + return isPackageInstalled(plugin.getComponentId1(), app) || isPackageInstalled(plugin.getComponentId2(), app); } public static boolean enablePlugin(@Nullable Activity activity, OsmandApplication app, OsmandPlugin plugin, boolean enable) { @@ -306,17 +314,27 @@ public abstract class OsmandPlugin { plugin.setActive(false); } app.getSettings().enablePlugin(plugin.getId(), enable); - if (activity != null && activity instanceof MapActivity) { - final MapActivity mapActivity = (MapActivity) activity; - plugin.updateLayers(mapActivity.getMapView(), mapActivity); - mapActivity.getDashboard().refreshDashboardFragments(); + if (activity != null) { + if (activity instanceof MapActivity) { + final MapActivity mapActivity = (MapActivity) activity; + plugin.updateLayers(mapActivity.getMapView(), mapActivity); + mapActivity.getDashboard().refreshDashboardFragments(); - DashFragmentData fragmentData = plugin.getCardFragment(); - if (!enable && fragmentData != null) { - FragmentManager fm = mapActivity.getSupportFragmentManager(); - Fragment fragment = fm.findFragmentByTag(fragmentData.tag); - if (fragment != null) { - fm.beginTransaction().remove(fragment).commit(); + DashFragmentData fragmentData = plugin.getCardFragment(); + if (!enable && fragmentData != null) { + FragmentManager fm = mapActivity.getSupportFragmentManager(); + Fragment fragment = fm.findFragmentByTag(fragmentData.tag); + if (fragment != null) { + fm.beginTransaction().remove(fragment).commit(); + } + } + } + + if (plugin.isMarketPlugin()) { + if (plugin.isActive()) { + plugin.showInstallDialog(activity); + } else if (OsmandPlugin.checkPluginPackage(app, plugin)) { + plugin.showDisableDialog(activity); } } } diff --git a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java index 10e7499297..e057c7fd3a 100644 --- a/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java +++ b/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java @@ -39,20 +39,12 @@ public class SQLiteTileSource implements ITileSource { private static final String ELLIPSOID = "ellipsoid"; private static final String INVERTED_Y = "inverted_y"; private static final String REFERER = "referer"; - private static final String TIME_SUPPORTED = "timesupported"; + private static final String TIME_COLUMN = "timecolumn"; private static final String EXPIRE_MINUTES = "expireminutes"; - - private static final String TILES_TABLE_CREATE = "CREATE TABLE IF NOT EXISTS tiles (x INTEGER NOT NULL, y INTEGER NOT NULL, z INTEGER NOT NULL, s INTEGER, image BLOB, time INTEGER, PRIMARY KEY (x, y, z))"; - private static final String CREATE_INDEX_X = "CREATE INDEX index_tiles_on_x ON tiles (x)"; - private static final String CREATE_INDEX_Y = "CREATE INDEX index_tiles_on_y ON tiles (y)"; - private static final String CREATE_INDEX_Z = "CREATE INDEX index_tiles_on_z ON tiles (z)"; - private static final String CREATE_INDEX_S = "CREATE INDEX index_tiles_on_s ON tiles (s)"; - - private static final String MAXZOOM_FIELD = "maxzoom"; - private static final String MINZOOM_FIELD = "minzoom"; - private static final String ELLIPSOID_FIELD = "ellipsoid"; - private static final String URL_FIELD = "url"; - private static final String EXPIREMINUTES_FIELD = "expireminutes"; + private static final String RULE = "rule"; + private static final String TILENUMBERING = "tilenumbering"; + private static final String BIG_PLANET_TILE_NUMBERING = "BigPlanet"; + private static final String TILESIZE = "tilesize"; private ITileSource base; private String urlTemplate = null; @@ -119,25 +111,21 @@ public class SQLiteTileSource implements ITileSource { db = ctx.getSQLiteAPI().getOrCreateDatabase( ctx.getAppPath(TILES_INDEX_DIR).getAbsolutePath() + "/" + name + SQLITE_EXT, true); - db.execSQL("CREATE TABLE IF NOT EXISTS info (" + - MIN_ZOOM + ", " + - MAX_ZOOM + - ");"); - db.execSQL("INSERT INTO info (" + MIN_ZOOM + "," + MAX_ZOOM + ") VALUES ('" + minZoom + "','" + maxZoom + "');"); + db.execSQL("CREATE TABLE tiles (x int, y int, z int, s int, image blob, time long, PRIMARY KEY (x,y,z,s))"); + db.execSQL("CREATE INDEX IND on tiles (x,y,z,s)"); + db.execSQL("CREATE TABLE info(tilenumbering,minzoom,maxzoom)"); + db.execSQL("CREATE TABLE android_metadata (locale TEXT)"); + db.execSQL("INSERT INTO info (tilenumbering,minzoom,maxzoom) VALUES ('simple','" + minZoom + "','" + maxZoom + "');"); addInfoColumn(URL, urlTemplate); addInfoColumn(RANDOMS, randoms); addInfoColumn(ELLIPSOID, isEllipsoid ? "1" : "0"); addInfoColumn(INVERTED_Y, invertedY ? "1" : "0"); addInfoColumn(REFERER, referer); - addInfoColumn(TIME_SUPPORTED, timeSupported ? "yes" : "no"); + addInfoColumn(TIME_COLUMN, timeSupported ? "yes" : "no"); addInfoColumn(EXPIRE_MINUTES, String.valueOf(getExpirationTimeMinutes())); - db.execSQL(TILES_TABLE_CREATE); - db.execSQL(CREATE_INDEX_X); - db.execSQL(CREATE_INDEX_Y); - db.execSQL(CREATE_INDEX_Z); - db.execSQL(CREATE_INDEX_S); + db.close(); } @@ -245,36 +233,36 @@ public class SQLiteTileSource implements ITileSource { if(cursor.moveToFirst()) { String[] columnNames = cursor.getColumnNames(); List list = Arrays.asList(columnNames); - int url = list.indexOf(URL_FIELD); + int url = list.indexOf(URL); if(url != -1) { String template = cursor.getString(url); if(!Algorithms.isEmpty(template)){ urlTemplate = TileSourceTemplate.normalizeUrl(template); } } - int ruleId = list.indexOf("rule"); + int ruleId = list.indexOf(RULE); if(ruleId != -1) { rule = cursor.getString(ruleId); } - int refererId = list.indexOf("referer"); + int refererId = list.indexOf(REFERER); if(refererId != -1) { referer = cursor.getString(refererId); } - int tnumbering = list.indexOf("tilenumbering"); + int tnumbering = list.indexOf(TILENUMBERING); if(tnumbering != -1) { - inversiveZoom = "BigPlanet".equalsIgnoreCase(cursor.getString(tnumbering)); + inversiveZoom = BIG_PLANET_TILE_NUMBERING.equalsIgnoreCase(cursor.getString(tnumbering)); } else { inversiveZoom = true; - addInfoColumn("tilenumbering", "BigPlanet"); + addInfoColumn(TILENUMBERING, BIG_PLANET_TILE_NUMBERING); } - int timecolumn = list.indexOf("timecolumn"); + int timecolumn = list.indexOf(TIME_COLUMN); if (timecolumn != -1) { timeSupported = "yes".equalsIgnoreCase(cursor.getString(timecolumn)); } else { timeSupported = hasTimeColumn(); - addInfoColumn("timecolumn", timeSupported? "yes" : "no"); + addInfoColumn(TIME_COLUMN, timeSupported? "yes" : "no"); } - int expireminutes = list.indexOf(EXPIREMINUTES_FIELD); + int expireminutes = list.indexOf(EXPIRE_MINUTES); this.expirationTimeMillis = -1; if(expireminutes != -1) { int minutes = (int) cursor.getInt(expireminutes); @@ -282,39 +270,39 @@ public class SQLiteTileSource implements ITileSource { this.expirationTimeMillis = minutes * 60 * 1000l; } } else { - addInfoColumn(EXPIREMINUTES_FIELD, "0"); + addInfoColumn(EXPIRE_MINUTES, "0"); } - int tsColumn = list.indexOf("tilesize"); + int tsColumn = list.indexOf(TILESIZE); this.tileSizeSpecified = tsColumn != -1; if(tileSizeSpecified) { this.tileSize = (int) cursor.getInt(tsColumn); } - int ellipsoid = list.indexOf(ELLIPSOID_FIELD); + int ellipsoid = list.indexOf(ELLIPSOID); if(ellipsoid != -1) { int set = (int) cursor.getInt(ellipsoid); if(set == 1){ this.isEllipsoid = true; } } - int invertedY = list.indexOf("inverted_y"); + int invertedY = list.indexOf(INVERTED_Y); if(invertedY != -1) { int set = (int) cursor.getInt(invertedY); if(set == 1){ this.invertedY = true; } } - int randomsId = list.indexOf("randoms"); + int randomsId = list.indexOf(RANDOMS); if(randomsId != -1) { this.randoms = cursor.getString(randomsId); this.randomsArray = TileSourceTemplate.buildRandomsArray(this.randoms); } //boolean inversiveInfoZoom = tnumbering != -1 && "BigPlanet".equals(cursor.getString(tnumbering)); boolean inversiveInfoZoom = inversiveZoom; - int mnz = list.indexOf(MINZOOM_FIELD); + int mnz = list.indexOf(MIN_ZOOM); if(mnz != -1) { minZoom = (int) cursor.getInt(mnz); } - int mxz = list.indexOf(MAXZOOM_FIELD); + int mxz = list.indexOf(MAX_ZOOM); if(mxz != -1) { maxZoom = (int) cursor.getInt(mxz); } @@ -342,19 +330,19 @@ public class SQLiteTileSource implements ITileSource { maxZoom = 17 - mnz; } if (getUrlTemplate() != null && !getUrlTemplate().equals(r.getUrlTemplate())) { - db.execSQL("update info set " + URL_FIELD + " = '" + r.getUrlTemplate() + "'"); + db.execSQL("update info set " + URL + " = '" + r.getUrlTemplate() + "'"); } if (r.getMinimumZoomSupported() != minZoom) { - db.execSQL("update info set " + MINZOOM_FIELD + " = '" + minZoom + "'"); + db.execSQL("update info set " + MIN_ZOOM + " = '" + minZoom + "'"); } if (r.getMaximumZoomSupported() != maxZoom) { - db.execSQL("update info set " + MAXZOOM_FIELD + " = '" + maxZoom + "'"); + db.execSQL("update info set " + MAX_ZOOM + " = '" + maxZoom + "'"); } if (r.isEllipticYTile() != isEllipticYTile()) { - db.execSQL("update info set " + ELLIPSOID_FIELD + " = '" + (r.isEllipticYTile() ? 1 : 0) + "'"); + db.execSQL("update info set " + ELLIPSOID + " = '" + (r.isEllipticYTile() ? 1 : 0) + "'"); } if (r.getExpirationTimeMinutes() != getExpirationTimeMinutes()) { - db.execSQL("update info set " + EXPIREMINUTES_FIELD + " = '" + r.getExpirationTimeMinutes() + "'"); + db.execSQL("update info set " + EXPIRE_MINUTES + " = '" + r.getExpirationTimeMinutes() + "'"); } } } @@ -658,4 +646,5 @@ public class SQLiteTileSource implements ITileSource { public String getReferer() { return referer; } + } diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java index 4f64d740d8..9956b2493c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginActivity.java @@ -20,10 +20,11 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; +import net.osmand.plus.dialogs.PluginInstalledBottomSheetDialog; import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.srtmplugin.SRTMPlugin; -public class PluginActivity extends OsmandActionBarActivity implements DownloadIndexesThread.DownloadEvents { +public class PluginActivity extends OsmandActionBarActivity implements DownloadIndexesThread.DownloadEvents, PluginInstalledBottomSheetDialog.PluginStateListener { private static final String TAG = "PluginActivity"; public static final String EXTRA_PLUGIN_ID = "plugin_id"; @@ -214,4 +215,9 @@ public class PluginActivity extends OsmandActionBarActivity implements Download } } } -} + + @Override + public void onPluginStateChanged(OsmandPlugin plugin) { + updateState(); + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java index 2d0e593fde..69aa72e5d9 100644 --- a/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/PluginsActivity.java @@ -21,11 +21,12 @@ import net.osmand.aidl.ConnectedApp; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; +import net.osmand.plus.dialogs.PluginInstalledBottomSheetDialog; import net.osmand.plus.download.DownloadIndexesThread; import java.util.ArrayList; -public class PluginsActivity extends OsmandListActivity implements DownloadIndexesThread.DownloadEvents { +public class PluginsActivity extends OsmandListActivity implements DownloadIndexesThread.DownloadEvents, PluginInstalledBottomSheetDialog.PluginStateListener { public static final int ACTIVE_PLUGINS_LIST_MODIFIED = 1; @@ -80,9 +81,6 @@ public class PluginsActivity extends OsmandListActivity implements DownloadIndex listModified = true; } getListAdapter().notifyDataSetChanged(); - if (plugin.isActive() && plugin.isMarketPlugin()) { - plugin.showInstallDialog(this); - } } } @@ -119,6 +117,11 @@ public class PluginsActivity extends OsmandListActivity implements DownloadIndex } } + @Override + public void onPluginStateChanged(OsmandPlugin plugin) { + getListAdapter().notifyDataSetChanged(); + } + protected class PluginsListAdapter extends ArrayAdapter { PluginsListAdapter() { @@ -200,7 +203,7 @@ public class PluginsActivity extends OsmandListActivity implements DownloadIndex if (active) { pluginLogo.setBackgroundResource(isLightTheme ? R.drawable.bg_plugin_logo_enabled_light : R.drawable.bg_plugin_logo_enabled_dark); } else { - TypedArray attributes = getTheme().obtainStyledAttributes(new int[]{R.attr.bg_plugin_logo_disabled}); + TypedArray attributes = getTheme().obtainStyledAttributes(new int[] {R.attr.bg_plugin_logo_disabled}); pluginLogo.setBackgroundDrawable(attributes.getDrawable(0)); attributes.recycle(); } diff --git a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java index 223bc8bee1..11476d0abb 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java @@ -62,6 +62,7 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop private static final Log log = PlatformUtil.getLog(MultimediaNotesFragment.class); + private static final String OPEN_NOTES_DESCRIPTION = "open_notes_description"; private static final String CAMERA_PERMISSION = "camera_permission"; private static final String COPY_PLUGIN_SETTINGS = "copy_plugin_settings"; private static final String RESET_TO_DEFAULT = "reset_to_default"; @@ -244,9 +245,13 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop } private void setupPhotoPlaySoundPref(Camera cam, AudioVideoNotesPlugin plugin) { + Drawable disabled = getContentIcon(R.drawable.ic_action_music_off); + Drawable enabled = getActiveIcon(R.drawable.ic_type_audio); + Drawable icon = getPersistentPrefIcon(enabled, disabled); + SwitchPreferenceEx photoPlaySound = (SwitchPreferenceEx) findPreference(plugin.AV_PHOTO_PLAY_SOUND.getId()); photoPlaySound.setDescription(getString(R.string.av_photo_play_sound_descr)); - photoPlaySound.setIcon(getPersistentPrefIcon(R.drawable.ic_action_music_off)); + photoPlaySound.setIcon(icon); photoPlaySound.setEnabled(cam != null); } @@ -376,7 +381,10 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop } private void setupOpenNotesDescrPref() { - String multimediaNotesPath = getString(R.string.multimedia_notes_view_path); + String menu = getString(R.string.shared_string_menu); + String myPlaces = getString(R.string.shared_string_my_places); + String notes = getString(R.string.notes); + String multimediaNotesPath = getString(R.string.ltr_or_rtl_triple_combine_via_dash, menu, myPlaces, notes); String multimediaNotesPathDescr = getString(R.string.multimedia_notes_view_descr, multimediaNotesPath); int startIndex = multimediaNotesPathDescr.indexOf(multimediaNotesPath); @@ -384,7 +392,7 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop Typeface typeface = FontCache.getRobotoMedium(getContext()); titleSpan.setSpan(new CustomTypefaceSpan(typeface), startIndex, startIndex + multimediaNotesPath.length(), 0); - Preference osmEditsDescription = findPreference("open_notes_description"); + Preference osmEditsDescription = findPreference(OPEN_NOTES_DESCRIPTION); osmEditsDescription.setTitle(titleSpan); } @@ -444,7 +452,8 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop @Override protected void onBindPreferenceViewHolder(Preference preference, PreferenceViewHolder holder) { super.onBindPreferenceViewHolder(preference, holder); - if (CAMERA_PERMISSION.equals(preference.getKey())) { + String prefId = preference.getKey(); + if (CAMERA_PERMISSION.equals(prefId)) { View selectableView = holder.itemView.findViewById(R.id.selectable_list_item); if (selectableView != null) { int color = AndroidUtils.getColorFromAttr(app, R.attr.activity_background_color); @@ -460,6 +469,9 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop AndroidUtils.setBackground(selectableView, bgDrawable); } } + } else if (OPEN_NOTES_DESCRIPTION.equals(prefId)) { + int minHeight = getResources().getDimensionPixelSize(R.dimen.bottom_sheet_list_item_height); + holder.itemView.setMinimumHeight(minHeight); } } diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java index 49c366dac0..6899c3cb3c 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemTitleWithDescrAndButton.java @@ -32,7 +32,7 @@ public class BottomSheetItemTitleWithDescrAndButton extends BottomSheetItemWithD int position, Drawable icon, Drawable background, - String title, + CharSequence title, @ColorRes int titleColorId, CharSequence description, @ColorRes int descriptionColorId, diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java index 7f50b0d5ed..cd8d46239e 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithCompoundButton.java @@ -37,7 +37,7 @@ public class BottomSheetItemWithCompoundButton extends BottomSheetItemWithDescri int position, Drawable icon, Drawable background, - String title, + CharSequence title, @ColorRes int titleColorId, CharSequence description, @ColorRes int descriptionColorId, diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java index 6144b11e3a..15d8448766 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java @@ -30,7 +30,7 @@ public class BottomSheetItemWithDescription extends SimpleBottomSheetItem { int position, Drawable icon, Drawable background, - String title, + CharSequence title, @ColorRes int titleColorId, CharSequence description, @ColorRes int descriptionColorId, diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java index 4a4c9746fd..0366a00192 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/SimpleBottomSheetItem.java @@ -17,7 +17,7 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem { private Drawable background; private Drawable icon; - protected String title; + protected CharSequence title; @ColorRes protected int titleColorId = INVALID_ID; @@ -32,7 +32,7 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem { int position, Drawable icon, Drawable background, - String title, + CharSequence title, @ColorRes int titleColorId) { super(customView, layoutId, tag, disabled, onClickListener, position); this.icon = icon; @@ -83,7 +83,7 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem { protected Drawable icon; protected Drawable background; - protected String title; + protected CharSequence title; @ColorRes protected int titleColorId = INVALID_ID; @@ -97,7 +97,7 @@ public class SimpleBottomSheetItem extends BaseBottomSheetItem { return this; } - public Builder setTitle(String title) { + public Builder setTitle(CharSequence title) { this.title = title; return this; } diff --git a/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java b/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java new file mode 100644 index 0000000000..259933f367 --- /dev/null +++ b/OsmAnd/src/net/osmand/plus/dialogs/PluginDisabledBottomSheet.java @@ -0,0 +1,147 @@ +package net.osmand.plus.dialogs; + +import android.content.Context; +import android.content.Intent; +import android.graphics.Typeface; +import android.net.Uri; +import android.os.Bundle; +import android.provider.Settings; +import android.support.annotation.NonNull; +import android.support.v4.app.FragmentManager; +import android.text.SpannableString; + +import net.osmand.AndroidUtils; +import net.osmand.PlatformUtil; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.R; +import net.osmand.plus.base.MenuBottomSheetDialogFragment; +import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; +import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; +import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; +import net.osmand.plus.helpers.FontCache; +import net.osmand.plus.widgets.style.CustomTypefaceSpan; + +import org.apache.commons.logging.Log; + +import static net.osmand.plus.OsmandPlugin.PLUGIN_ID_KEY; + +public class PluginDisabledBottomSheet extends MenuBottomSheetDialogFragment { + + public static final String TAG = PluginDisabledBottomSheet.class.getName(); + + private static final Log LOG = PlatformUtil.getLog(PluginDisabledBottomSheet.class); + + private String pluginId; + + @Override + public void createMenuItems(Bundle savedInstanceState) { + final OsmandApplication app = getMyApplication(); + Context context = getContext(); + if (context == null || app == null) { + return; + } + + if (savedInstanceState != null) { + pluginId = savedInstanceState.getString(PLUGIN_ID_KEY); + } else { + Bundle args = getArguments(); + if (args != null) { + pluginId = args.getString(PLUGIN_ID_KEY); + } + } + + OsmandPlugin plugin = OsmandPlugin.getPlugin(pluginId); + if (plugin == null) { + return; + } + + BaseBottomSheetItem titleItem = new TitleItem.Builder() + .setTitle(getString(R.string.plugin_disabled)) + .setLayoutId(R.layout.bottom_sheet_item_title_big) + .create(); + items.add(titleItem); + + Typeface typeface = FontCache.getRobotoMedium(getContext()); + SpannableString pluginTitleSpan = new SpannableString(plugin.getName()); + pluginTitleSpan.setSpan(new CustomTypefaceSpan(typeface), 0, pluginTitleSpan.length(), 0); + + BaseBottomSheetItem pluginTitle = new SimpleBottomSheetItem.Builder() + .setTitle(pluginTitleSpan) + .setTitleColorId(nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light) + .setIcon(getContentIcon(R.drawable.ic_extension_dark)) + .setLayoutId(R.layout.bottom_sheet_item_simple_56dp) + .create(); + items.add(pluginTitle); + + BaseBottomSheetItem descrItem = new SimpleBottomSheetItem.Builder() + .setTitle(getString(R.string.plugin_disabled_descr)) + .setLayoutId(R.layout.bottom_sheet_item_title_long) + .create(); + items.add(descrItem); + + } + + @Override + protected int getDismissButtonTextId() { + return R.string.shared_string_close; + } + + @Override + protected int getRightBottomButtonTextId() { + return R.string.open_settings; + } + + @Override + protected void onRightBottomButtonClick() { + OsmandApplication app = getMyApplication(); + Intent intent = getPluginSettingsIntent(); + if (app != null && AndroidUtils.isIntentSafe(app, intent)) { + startActivity(intent); + } + dismiss(); + } + + @Override + public void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + outState.putString(PLUGIN_ID_KEY, pluginId); + } + + private Intent getPluginSettingsIntent() { + Intent intent = null; + + OsmandApplication app = getMyApplication(); + OsmandPlugin plugin = OsmandPlugin.getPlugin(pluginId); + if (plugin != null && app != null) { + String installedPackage = null; + if (OsmandPlugin.isPackageInstalled(plugin.getComponentId1(), app)) { + installedPackage = plugin.getComponentId1(); + } + if (OsmandPlugin.isPackageInstalled(plugin.getComponentId2(), app)) { + installedPackage = plugin.getComponentId2(); + } + if (installedPackage != null) { + intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + Uri uri = Uri.fromParts("package", installedPackage, null); + intent.setData(uri); + } + } + return intent; + } + + public static void showInstance(@NonNull FragmentManager fm, String pluginId, Boolean usedOnMap) { + try { + Bundle args = new Bundle(); + args.putString(PLUGIN_ID_KEY, pluginId); + + PluginDisabledBottomSheet dialog = new PluginDisabledBottomSheet(); + dialog.setArguments(args); + dialog.setUsedOnMap(usedOnMap); + dialog.show(fm, PluginDisabledBottomSheet.TAG); + } catch (RuntimeException e) { + LOG.error("showInstance", e); + } + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java b/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java index 07e3058730..aa8ad430a7 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/PluginInstalledBottomSheetDialog.java @@ -2,9 +2,11 @@ package net.osmand.plus.dialogs; import android.app.Activity; import android.content.Context; +import android.graphics.Typeface; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.FragmentManager; +import android.text.SpannableString; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; @@ -29,7 +31,9 @@ import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.DownloadValidationManager; import net.osmand.plus.download.IndexItem; import net.osmand.plus.helpers.AndroidUiHelper; +import net.osmand.plus.helpers.FontCache; import net.osmand.plus.settings.BaseSettingsFragment; +import net.osmand.plus.widgets.style.CustomTypefaceSpan; import org.apache.commons.logging.Log; @@ -79,8 +83,12 @@ public class PluginInstalledBottomSheetDialog extends MenuBottomSheetDialogFragm .create(); items.add(titleItem); + Typeface typeface = FontCache.getRobotoMedium(getContext()); + SpannableString pluginTitleSpan = new SpannableString(plugin.getName()); + pluginTitleSpan.setSpan(new CustomTypefaceSpan(typeface), 0, pluginTitleSpan.length(), 0); + BaseBottomSheetItem pluginTitle = new SimpleBottomSheetItem.Builder() - .setTitle(plugin.getName()) + .setTitle(pluginTitleSpan) .setTitleColorId(nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light) .setIcon(getContentIcon(R.drawable.ic_extension_dark)) .setLayoutId(R.layout.bottom_sheet_item_simple_56dp) @@ -162,6 +170,20 @@ public class PluginInstalledBottomSheetDialog extends MenuBottomSheetDialogFragm return R.string.shared_string_turn_off; } + @Override + protected void onDismissButtonClickAction() { + OsmandApplication app = getMyApplication(); + OsmandPlugin plugin = OsmandPlugin.getPlugin(pluginId); + if (app != null && plugin != null) { + Activity activity = getActivity(); + OsmandPlugin.enablePlugin(activity, app, plugin, false); + + if (activity instanceof PluginStateListener) { + ((PluginStateListener) activity).onPluginStateChanged(plugin); + } + } + } + @Override protected int getRightBottomButtonTextId() { return R.string.shared_string_ok; @@ -307,4 +329,10 @@ public class PluginInstalledBottomSheetDialog extends MenuBottomSheetDialogFragm LOG.error("showInstance", e); } } -} + + public interface PluginStateListener { + + void onPluginStateChanged(OsmandPlugin plugin); + + } +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index 135291eb46..b2a1d87f4c 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -181,7 +181,6 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement builder.show(); } - private void basicFileOperation(final LocalIndexInfo info, ContextMenuAdapter adapter) { ItemClickListener listener = new ItemClickListener() { @Override @@ -226,7 +225,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement getDownloadActivity().reloadLocalIndexes(); } }); - } else if (resId == R.string.clear_tile_data) { + } else if (resId == R.string.clear_tile_data) { AlertDialog.Builder confirm = new AlertDialog.Builder(getActivity()); confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() { @Override @@ -319,8 +318,16 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement @Override public void onClick(View v) { OsmandApplication app = (OsmandApplication) a.getApplication(); - if (renameGpxFile(app, f, editText.getText().toString() + ext, false, callback) != null) { - alertDialog.dismiss(); + if (ext.equals(SQLiteTileSource.EXT)) { + if (renameSQLiteFile(app, f, editText.getText().toString() + ext, + callback) != null) { + alertDialog.dismiss(); + } + } else { + if (renameGpxFile(app, f, editText.getText().toString() + ext, + false, callback) != null) { + alertDialog.dismiss(); + } } } }); @@ -330,7 +337,55 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } } - public static File renameGpxFile(OsmandApplication ctx, File source, String newName, boolean dirAllowed, RenameCallback callback) { + private static File renameSQLiteFile(OsmandApplication ctx, File source, String newName, + RenameCallback callback) { + File dest = checkRenamePossibility(ctx, source, newName, false); + if (dest == null) { + return null; + } + if (!dest.getParentFile().exists()) { + dest.getParentFile().mkdirs(); + } + if (source.renameTo(dest)) { + final String[] suffixes = new String[]{"-journal", "-wal", "-shm"}; + for (String s : suffixes) { + File file = new File(ctx.getDatabasePath(source + s).toString()); + if (file.exists()) { + file.renameTo(ctx.getDatabasePath(dest + s)); + } + } + if (callback != null) { + callback.renamedTo(dest); + } + return dest; + } else { + Toast.makeText(ctx, R.string.file_can_not_be_renamed, Toast.LENGTH_LONG).show(); + } + return null; + } + + public static File renameGpxFile(OsmandApplication ctx, File source, String newName, boolean dirAllowed, + RenameCallback callback) { + File dest = checkRenamePossibility(ctx, source, newName, dirAllowed); + if (dest == null) { + return null; + } + if (!dest.getParentFile().exists()) { + dest.getParentFile().mkdirs(); + } + if (source.renameTo(dest)) { + ctx.getGpxDbHelper().rename(source, dest); + if (callback != null) { + callback.renamedTo(dest); + } + return dest; + } else { + Toast.makeText(ctx, R.string.file_can_not_be_renamed, Toast.LENGTH_LONG).show(); + } + return null; + } + + public static File checkRenamePossibility(OsmandApplication ctx, File source, String newName, boolean dirAllowed) { if (Algorithms.isEmpty(newName)) { Toast.makeText(ctx, R.string.empty_filename, Toast.LENGTH_LONG).show(); return null; @@ -343,21 +398,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement File dest = new File(source.getParentFile(), newName); if (dest.exists()) { Toast.makeText(ctx, R.string.file_with_name_already_exists, Toast.LENGTH_LONG).show(); - } else { - if (!dest.getParentFile().exists()) { - dest.getParentFile().mkdirs(); - } - if (source.renameTo(dest)) { - ctx.getGpxDbHelper().rename(source, dest); - if (callback != null) { - callback.renamedTo(dest); - } - return dest; - } else { - Toast.makeText(ctx, R.string.file_can_not_be_renamed, Toast.LENGTH_LONG).show(); - } + return null; } - return null; + return dest; } @@ -1227,7 +1270,6 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement } }); } - item = optionsMenu.getMenu().add(R.string.shared_string_rename) .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java index cabf945875..9216fe9210 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java @@ -229,7 +229,10 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment } private void setupOpenNotesDescrPref() { - String tracksPath = getString(R.string.tracks_view_path); + String menu = getString(R.string.shared_string_menu); + String myPlaces = getString(R.string.shared_string_my_places); + String tracks = getString(R.string.shared_string_tracks); + String tracksPath = getString(R.string.ltr_or_rtl_triple_combine_via_dash, menu, myPlaces, tracks); String tracksPathDescr = getString(R.string.tracks_view_descr, tracksPath); int startIndex = tracksPathDescr.indexOf(tracksPath); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java index 3a4c67b1fb..85ea509eb4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java @@ -78,7 +78,10 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer } private void setupOsmEditsDescrPref() { - String osmEditsPath = getString(R.string.osm_edits_view_path); + String menu = getString(R.string.shared_string_menu); + String myPlaces = getString(R.string.shared_string_my_places); + String osmEdits = getString(R.string.osm_edits); + String osmEditsPath = getString(R.string.ltr_or_rtl_triple_combine_via_dash, menu, myPlaces, osmEdits); String osmEditsPathDescr = getString(R.string.osm_edits_view_descr, osmEditsPath); int startIndex = osmEditsPathDescr.indexOf(osmEditsPath); diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index 3b109485fb..87e19bffee 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -493,6 +493,8 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { AlertDialog.Builder bld = new AlertDialog.Builder(new ContextThemeWrapper(activity, getThemeRes(activity, app))); View view = UiUtilities.getInflater(activity, isNightMode(activity, app)).inflate(R.layout.editing_tile_source, null); final EditText name = (EditText) view.findViewById(R.id.Name); + name.setFocusable(false); + name.setFocusableInTouchMode(false); final Spinner existing = (Spinner) view.findViewById(R.id.TileSourceSpinner); final TextView existingHint = (TextView) view.findViewById(R.id.TileSourceHint); final EditText urlToLoad = (EditText) view.findViewById(R.id.URLToLoad); diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index 322316d88b..bd3bc0ce85 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -165,7 +165,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl updateTheme(); View view = super.onCreateView(inflater, container, savedInstanceState); if (view != null) { - if (getPreferenceScreen() != null) { + if (getPreferenceScreen() != null && currentScreenType != null) { PreferenceManager prefManager = getPreferenceManager(); PreferenceScreen preferenceScreen = prefManager.inflateFromResource(prefManager.getContext(), currentScreenType.preferencesResId, null); if (prefManager.setPreferences(preferenceScreen)) { @@ -293,7 +293,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl @ColorRes public int getStatusBarColorId() { boolean nightMode = isNightMode(); - if (currentScreenType.profileDependent) { + if (isProfileDependent()) { View view = getView(); if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) { view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); @@ -314,6 +314,10 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl return false; } + public boolean isProfileDependent() { + return currentScreenType != null && currentScreenType.profileDependent; + } + @Override public void onDisplayPreferenceDialog(Preference preference) { FragmentManager fragmentManager = getFragmentManager(); @@ -323,13 +327,13 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl ApplicationMode appMode = getSelectedAppMode(); if (preference instanceof ListPreferenceEx) { - SingleSelectPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent, false); + SingleSelectPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, isProfileDependent(), false); } else if (preference instanceof SwitchPreferenceEx) { - BooleanPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent); + BooleanPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, isProfileDependent()); } else if (preference instanceof EditTextPreference) { EditTextPreferenceBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode); } else if (preference instanceof MultiSelectBooleanPreference) { - MultiSelectPreferencesBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, currentScreenType.profileDependent); + MultiSelectPreferencesBottomSheet.showInstance(fragmentManager, preference.getKey(), this, false, appMode, isProfileDependent()); } else { super.onDisplayPreferenceDialog(preference); } @@ -359,7 +363,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl public void recreate() { FragmentActivity activity = getActivity(); - if (activity != null) { + if (activity != null && currentScreenType != null) { Fragment fragment = Fragment.instantiate(activity, currentScreenType.fragmentName); fragment.setArguments(buildArguments()); FragmentManager fm = activity.getSupportFragmentManager(); @@ -386,7 +390,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl titleView.setSingleLine(false); } boolean enabled = preference.isEnabled(); - if (currentScreenType.profileDependent) { + if (isProfileDependent()) { View cb = holder.itemView.findViewById(R.id.switchWidget); if (cb == null) { cb = holder.findViewById(android.R.id.checkbox); @@ -423,22 +427,28 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl AppBarLayout appBarLayout = (AppBarLayout) view.findViewById(R.id.appbar); ViewCompat.setElevation(appBarLayout, 5.0f); - View toolbarContainer = UiUtilities.getInflater(getActivity(), isNightMode()).inflate(currentScreenType.toolbarResId, appBarLayout); + View toolbarContainer = currentScreenType == null ? null : + UiUtilities.getInflater(getActivity(), isNightMode()).inflate(currentScreenType.toolbarResId, appBarLayout); TextView toolbarTitle = (TextView) view.findViewById(R.id.toolbar_title); - toolbarTitle.setText(getPreferenceScreen().getTitle()); + if (toolbarTitle != null) { + toolbarTitle.setText(getPreferenceScreen().getTitle()); + } View closeButton = view.findViewById(R.id.close_button); - closeButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - MapActivity mapActivity = getMapActivity(); - if (mapActivity != null) { - mapActivity.onBackPressed(); + if (closeButton != null) { + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + MapActivity mapActivity = getMapActivity(); + if (mapActivity != null) { + mapActivity.onBackPressed(); + } } - } - }); - View switchProfile = toolbarContainer.findViewById(R.id.profile_button); + }); + } + + View switchProfile = toolbarContainer == null ? null : toolbarContainer.findViewById(R.id.profile_button); if (switchProfile != null) { switchProfile.setContentDescription(getString(R.string.switch_profile)); switchProfile.setOnClickListener(new View.OnClickListener() { @@ -487,7 +497,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } View profileButton = view.findViewById(R.id.profile_button); - if (profileButton != null) { + if (profileButton != null && currentScreenType != null) { int toolbarRes = currentScreenType.toolbarResId; int iconColor = getActiveProfileColor(); int bgColor = UiUtilities.getColorWithAlpha(iconColor, 0.1f); @@ -521,7 +531,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl } private void updatePreferencesScreen() { - if (getSelectedAppMode() != null) { + if (getSelectedAppMode() != null && currentScreenType != null) { int resId = currentScreenType.preferencesResId; if (resId != -1) { addPreferencesFromResource(resId); diff --git a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java index 2c559e2312..82f80519eb 100644 --- a/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/NavigationFragment.java @@ -118,6 +118,7 @@ public class NavigationFragment extends BaseSettingsFragment { } bundle.putString(DIALOG_TYPE, TYPE_NAV_PROFILE); dialog.setArguments(bundle); + dialog.setUsedOnMap(false); if (getActivity() != null) { getActivity().getSupportFragmentManager().beginTransaction() .add(dialog, "select_nav_type").commitAllowingStateLoss(); diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java index 447b34dd24..3868fcc6f2 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/EditTextPreferenceBottomSheet.java @@ -53,7 +53,7 @@ public class EditTextPreferenceBottomSheet extends BasePreferenceBottomSheet { RelativeLayout editTextLayout = view.findViewById(R.id.text_field_boxes_editTextLayout); if (editTextLayout != null && editTextLayout.getLayoutParams() instanceof RelativeLayout.LayoutParams) { RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) editTextLayout.getLayoutParams(); - params.setMargins(params.leftMargin, AndroidUtils.dpToPx(ctx, 19), params.rightMargin, params.bottomMargin); + params.setMargins(params.leftMargin, AndroidUtils.dpToPx(ctx, 9), params.rightMargin, params.bottomMargin); } items.add(new SimpleBottomSheetItem.Builder().setCustomView(view).create()); diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java index 219c0b5b0b..b733d3e94f 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java @@ -89,8 +89,8 @@ public class SRTMPlugin extends OsmandPlugin { } @Override - protected boolean checkPluginPackage(OsmandApplication app) { - return super.checkPluginPackage(app) || InAppPurchaseHelper.isSubscribedToLiveUpdates(app); + protected boolean pluginAvailable(OsmandApplication app) { + return super.pluginAvailable(app) || InAppPurchaseHelper.isSubscribedToLiveUpdates(app); } @Override