Merge remote-tracking branch 'origin/master' into import_screen
# Conflicts: # OsmAnd/res/values/strings.xml # OsmAnd/src/net/osmand/plus/SQLiteTileSource.java
This commit is contained in:
commit
784cb45667
54 changed files with 479 additions and 225 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
20
OsmAnd/res/drawable/ic_action_minimal_distance.xml
Normal file
20
OsmAnd/res/drawable/ic_action_minimal_distance.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M10.5646,1.0929C11.0348,1.0316 11.514,1 12,1C12.486,1 12.9652,1.0316 13.4354,1.0929L13.1767,3.0761C12.7921,3.0259 12.3993,3 12,3C11.6007,3 11.2079,3.0259 10.8233,3.0761L10.5646,1.0929ZM16.2109,1.8351C17.1057,2.2061 17.9406,2.6917 18.6972,3.2731L17.4785,4.8589C16.8589,4.3828 16.176,3.9857 15.4448,3.6825L16.2109,1.8351ZM5.3028,3.2731C6.0595,2.6917 6.8942,2.2062 7.7891,1.8351L8.5552,3.6825C7.824,3.9857 7.1411,4.3828 6.5215,4.8589L5.3028,3.2731ZM20.7269,5.3028C21.3083,6.0595 21.7939,6.8942 22.1649,7.7891L20.3175,8.5552C20.0143,7.824 19.6172,7.1411 19.1411,6.5215L20.7269,5.3028ZM1.8351,7.7891C2.2061,6.8942 2.6917,6.0595 3.2731,5.3028L4.8589,6.5215C4.3828,7.1411 3.9857,7.824 3.6825,8.5552L1.8351,7.7891ZM22.9071,10.5646C22.9684,11.0348 23,11.514 23,12C23,12.486 22.9684,12.9652 22.9071,13.4354L20.9239,13.1767C20.9741,12.7921 21,12.3993 21,12C21,11.6007 20.9741,11.2079 20.9239,10.8233L22.9071,10.5646ZM1,12C1,11.514 1.0316,11.0348 1.0929,10.5646L3.0761,10.8233C3.0259,11.2079 3,11.6007 3,12C3,12.3993 3.0259,12.7921 3.0761,13.1767L1.0929,13.4354C1.0316,12.9652 1,12.486 1,12ZM22.1649,16.2109C21.7939,17.1057 21.3083,17.9406 20.7269,18.6972L19.1411,17.4785C19.6172,16.8589 20.0143,16.176 20.3175,15.4448L22.1649,16.2109ZM3.2731,18.6972C2.6917,17.9406 2.2062,17.1058 1.8351,16.2109L3.6825,15.4448C3.9857,16.176 4.3828,16.8589 4.8589,17.4785L3.2731,18.6972ZM7.7891,22.1649C6.8942,21.7939 6.0595,21.3083 5.3028,20.7269L6.5215,19.1411C7.1411,19.6172 7.824,20.0143 8.5552,20.3175L7.7891,22.1649ZM18.6972,20.7269C17.9406,21.3083 17.1058,21.7939 16.2109,22.1649L15.4448,20.3175C16.176,20.0143 16.8589,19.6172 17.4785,19.1411L18.6972,20.7269ZM12,23C11.514,23 11.0348,22.9684 10.5646,22.9071L10.8233,20.9239C11.2079,20.9741 11.6007,21 12,21C12.3993,21 12.7921,20.9741 13.1767,20.9239L13.4354,22.9071C12.9652,22.9684 12.486,23 12,23Z"
|
||||
android:strokeAlpha="0.3"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"
|
||||
android:fillAlpha="0.3"/>
|
||||
<path
|
||||
android:pathData="M12,6L7,17L12,15V6Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M12,6V15L17,17L12,6Z"
|
||||
android:strokeAlpha="0.7"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.7"/>
|
||||
</vector>
|
|
@ -4,24 +4,23 @@
|
|||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M7,4V20"
|
||||
android:pathData="M5,20V4H7V20H5Z"
|
||||
android:strokeAlpha="0.5"
|
||||
android:strokeWidth="2"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#727272"
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M7,6C8.1046,6 9,5.1046 9,4C9,2.8954 8.1046,2 7,2C5.8954,2 5,2.8954 5,4C5,5.1046 5.8954,6 7,6ZM7,22C8.1046,22 9,21.1046 9,20C9,18.8954 8.1046,18 7,18C5.8954,18 5,18.8954 5,20C5,21.1046 5.8954,22 7,22Z"
|
||||
android:fillColor="#727272"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M16,6L13,9V18L16,15V6Z"
|
||||
android:fillColor="#727272"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M16,15L19,18V9L16,6V15Z"
|
||||
android:strokeAlpha="0.8"
|
||||
android:fillColor="#727272"
|
||||
android:fillType="evenOdd"
|
||||
android:fillAlpha="0.8"/>
|
||||
android:fillAlpha="0.5"/>
|
||||
<path
|
||||
android:pathData="M6,6C7.1046,6 8,5.1046 8,4C8,2.8954 7.1046,2 6,2C4.8954,2 4,2.8954 4,4C4,5.1046 4.8954,6 6,6Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M6,22C7.1046,22 8,21.1046 8,20C8,18.8954 7.1046,18 6,18C4.8954,18 4,18.8954 4,20C4,21.1046 4.8954,22 6,22Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M16,3L12,7V19L16,16V3Z"
|
||||
android:fillColor="#727272"/>
|
||||
<path
|
||||
android:pathData="M16,16L20,19V7L16,3V16Z"
|
||||
android:strokeAlpha="0.7"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.7"/>
|
||||
</vector>
|
||||
|
|
9
OsmAnd/res/drawable/ic_type_audio.xml
Normal file
9
OsmAnd/res/drawable/ic_type_audio.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M12,3H18V7H14V17C14,19.2091 12.2091,21 10,21C7.7909,21 6,19.2091 6,17C6,14.7909 7.7909,13 10,13C10.7286,13 11.4117,13.1948 12,13.5351V3Z"
|
||||
android:fillColor="#727272"/>
|
||||
</vector>
|
|
@ -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"
|
||||
|
|
|
@ -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">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -27,15 +27,18 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/dialog_content_margin"
|
||||
android:paddingLeft="@dimen/dialog_content_margin">
|
||||
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">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/content_padding_small"
|
||||
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||
osmand:typeface="@string/font_roboto_medium"
|
||||
tools:text="@string/permission_is_required" />
|
||||
|
@ -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"
|
||||
|
|
|
@ -3379,9 +3379,6 @@
|
|||
<string name="monitoring_min_speed">الحد الأدنى للسرعة</string>
|
||||
<string name="monitoring_min_accuracy">دقة الحد الأدنى</string>
|
||||
<string name="monitoring_min_distance">الحد الأدنى للإزاحة</string>
|
||||
<string name="tracks_view_path">القائمة - الأماكن الخاصة بي - المسارات</string>
|
||||
<string name="multimedia_notes_view_path">القائمة - الأماكن الخاصة بي - ملاحظات</string>
|
||||
<string name="osm_edits_view_path">القائمة - أماكني - تعديلات OSM</string>
|
||||
<string name="reset_plugin_to_default">إعادة تعيين إعدادات البرنامج المساعد الافتراضي</string>
|
||||
<string name="multimedia_rec_split_title">تقسيم المسجل</string>
|
||||
<string name="multimedia_use_system_camera">استخدام تطبيق النظام</string>
|
||||
|
|
|
@ -437,7 +437,7 @@
|
|||
<string name="map_underlay">Underlay-Karte</string>
|
||||
<string name="map_underlay_descr">Underlay-Karte auswählen</string>
|
||||
<string name="layer_overlay">Overlay-Karte…</string>
|
||||
<string name="shared_string_none">Keine(r/s)</string>
|
||||
<string name="shared_string_none">Keine</string>
|
||||
<string name="map_overlay">Overlay-Karte</string>
|
||||
<string name="map_overlay_descr">Overlay-Karte auswählen</string>
|
||||
<string name="tile_source_already_installed">Karte schon installiert, Einstellungen werden aktualisiert.</string>
|
||||
|
@ -1227,7 +1227,7 @@
|
|||
<string name="save_as_favorites_points">Als Favoritengruppe speichern</string>
|
||||
<string name="select_destination_and_intermediate_points">Ziele auswählen</string>
|
||||
<string name="sort_by_distance">Nach Entfernung sortieren</string>
|
||||
<string name="sort_by_name">Nach Name sortieren</string>
|
||||
<string name="sort_by_name">Nach Namen sortieren</string>
|
||||
<string name="show_zoom_buttons_navigation_descr">Zoomtasten bei Navigation anzeigen.</string>
|
||||
<string name="show_zoom_buttons_navigation">Zoomtasten anzeigen</string>
|
||||
<string name="no_index_file_to_download">Keine Downloads gefunden, bitte die Internet-Verbindung überprüfen.</string>
|
||||
|
@ -2137,9 +2137,9 @@ Lon %2$s</string>
|
|||
<string name="quick_action_add_marker_descr">Eine Schaltfläche zum Hinzufügen einer Kartenmarkierung in der Bildschirmmitte.</string>
|
||||
<string name="favorite_empty_place_name">Ort</string>
|
||||
<string name="quick_action_showhide_favorites_title">Favoriten ein-/ausblenden</string>
|
||||
<string name="quick_action_take_audio_note_descr">Taste, um eine Audio-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_take_video_note_descr">Taste, um eine Video-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_take_photo_note_descr">Taste, um eine Foto-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_take_audio_note_descr">Eine Schaltfläche, um eine Audio-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_take_video_note_descr">Eine Schaltfläche, um eine Video-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_take_photo_note_descr">Eine Schaltfläche, um eine Foto-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_showhide_poi_title">POI ein-/ausblenden</string>
|
||||
<string name="quick_action_poi_show">%1$s anzeigen</string>
|
||||
<string name="quick_action_poi_hide">%1$s ausblenden</string>
|
||||
|
@ -2170,8 +2170,8 @@ Lon %2$s</string>
|
|||
<string name="quick_action_gpx_category_descr">Wählen Sie eine beliebige Kategorie.</string>
|
||||
<string name="configure_screen_quick_action">Schnellaktion</string>
|
||||
<string name="quick_action_add_gpx_descr">Eine Schaltfläche, um einen GPX-Wegpunkt in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_add_osm_bug_descr">Taste, um eine OSM-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_add_poi_descr">Taste, um einen POI in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_add_osm_bug_descr">Eine Schaltfläche, um eine OSM-Notiz in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_add_poi_descr">Eine Schaltfläche, um einen POI in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_navigation_voice_descr">Umschalter, um die Sprachansagen während der Navigation ein- oder auszuschalten.</string>
|
||||
<string name="quick_action_add_parking_descr">Taste, um eine Parkposition in der Bildschirmmitte einzufügen.</string>
|
||||
<string name="quick_action_interim_dialog">Dialog zum Bearbeiten anzeigen</string>
|
||||
|
@ -3466,9 +3466,6 @@ Lon %2$s</string>
|
|||
<string name="monitoring_min_speed">Mindesttempo</string>
|
||||
<string name="monitoring_min_accuracy">Minimale Genauigkeit</string>
|
||||
<string name="monitoring_min_distance">Minimale Verschiebung</string>
|
||||
<string name="tracks_view_path">\'Menü → Meine Orte → Tracks\'</string>
|
||||
<string name="multimedia_notes_view_path">\'Menü → Meine Orte → Notizen\'</string>
|
||||
<string name="osm_edits_view_path">\'Menü → Meine Orte → OSM-Änderungen\'</string>
|
||||
<string name="reset_plugin_to_default">Plugin-Einstellungen auf Voreinstellung zurücksetzen</string>
|
||||
<string name="osm_authorization_success">Autorisierung ist erfolgreich</string>
|
||||
<string name="shared_string_available">Verfügbar</string>
|
||||
|
@ -3495,7 +3492,7 @@ Lon %2$s</string>
|
|||
<string name="live_monitoring">Online-Aufzeichnung</string>
|
||||
<string name="clear_recorded_data">Aufgezeichnete Daten löschen</string>
|
||||
<string name="copy_coordinates">Koordinaten kopieren</string>
|
||||
<string name="monitoring_min_speed_descr_remark">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.</string>
|
||||
<string name="monitoring_min_speed_descr_remark">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.</string>
|
||||
<string name="monitoring_min_accuracy_descr_side_effect">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.</string>
|
||||
<string name="monitoring_min_accuracy_descr_recommendation">Empfehlung: Es ist schwer vorherzusagen, was aufgezeichnet wird und was nicht, es ist vielleicht am besten, diesen Filter auszuschalten.</string>
|
||||
<string name="monitoring_min_distance_descr">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.</string>
|
||||
|
@ -3526,4 +3523,5 @@ Lon %2$s</string>
|
|||
\n • Karte der Antarktis hinzugefügt
|
||||
\n
|
||||
\n</string>
|
||||
<string name="sort_by_category">Nach Kategorie sortieren</string>
|
||||
</resources>
|
|
@ -3456,9 +3456,6 @@
|
|||
<string name="monitoring_min_speed">Ελάχιστη ταχύτητα</string>
|
||||
<string name="monitoring_min_accuracy">Ελάχιστη ακρίβεια</string>
|
||||
<string name="monitoring_min_distance">Ελάχιστη μετατόπιση</string>
|
||||
<string name="tracks_view_path">Μενού — Οι τοποθεσίες μου — Ίχνη</string>
|
||||
<string name="multimedia_notes_view_path">Μενού — Οι τοποθεσίες μου — Σημειώσεις</string>
|
||||
<string name="osm_edits_view_path">Μενού — Οι τοποθεσίες μου — Επεξεργασίες OSM</string>
|
||||
<string name="reset_plugin_to_default">Επαναφορά ρυθμίσεων προσθέτου στην προεπιλογή</string>
|
||||
<string name="multimedia_rec_split_title">Καταγραφή διαίρεσης</string>
|
||||
<string name="multimedia_use_system_camera">Χρήση εφαρμογής συστήματος</string>
|
||||
|
|
|
@ -3447,9 +3447,6 @@ Indikas lokon: %1$s x %2$s"</string>
|
|||
<string name="monitoring_min_speed">Minimuma rapido</string>
|
||||
<string name="monitoring_min_accuracy">Minimuma precizo</string>
|
||||
<string name="monitoring_min_distance">Minimuma delokiĝo</string>
|
||||
<string name="tracks_view_path">menuo → miaj ejoj → spuroj</string>
|
||||
<string name="multimedia_notes_view_path">menuo → mia ejoj → notoj</string>
|
||||
<string name="osm_edits_view_path">menuo → miaj ejoj → OSM‑redaktoj</string>
|
||||
<string name="reset_plugin_to_default">Restarigi implicitajn agordojn de kromprogramo</string>
|
||||
<string name="multimedia_rec_split_title">Dividilo de registraĵoj</string>
|
||||
<string name="multimedia_use_system_camera">Uzi sisteman aplikaĵon</string>
|
||||
|
|
|
@ -3475,9 +3475,6 @@ Lon %2$s</string>
|
|||
<string name="monitoring_min_speed">Velocidad mínima</string>
|
||||
<string name="monitoring_min_accuracy">Precisión mínima</string>
|
||||
<string name="monitoring_min_distance">Desplazamiento mínimo</string>
|
||||
<string name="tracks_view_path">Menú → Mis sitios → Trazas</string>
|
||||
<string name="multimedia_notes_view_path">Menú → Mis sitios → Notas multimedia</string>
|
||||
<string name="osm_edits_view_path">Menú → Mis sitios → Ediciones de OSM</string>
|
||||
<string name="reset_plugin_to_default">Restablecer ajustes del complemento a valores predefinidos</string>
|
||||
<string name="multimedia_rec_split_title">División de grabación</string>
|
||||
<string name="multimedia_use_system_camera">Usar la aplicación del sistema</string>
|
||||
|
|
|
@ -3474,9 +3474,6 @@ Lon %2$s</string>
|
|||
<string name="monitoring_min_speed">Velocidad mínima</string>
|
||||
<string name="monitoring_min_accuracy">Precisión mínima</string>
|
||||
<string name="monitoring_min_distance">Desplazamiento mínimo</string>
|
||||
<string name="tracks_view_path">Menú — Mis sitios — Trazas</string>
|
||||
<string name="multimedia_notes_view_path">Menú — Mis sitios — Notas</string>
|
||||
<string name="osm_edits_view_path">Menú — Mis sitios — Ediciones de OSM</string>
|
||||
<string name="reset_plugin_to_default">Restablecer ajustes del complemento a valores predefinidos</string>
|
||||
<string name="multimedia_rec_split_title">División de grabación</string>
|
||||
<string name="multimedia_use_system_camera">Usar la aplicación del sistema</string>
|
||||
|
|
|
@ -3400,9 +3400,6 @@
|
|||
<string name="monitoring_min_speed">Vähim kiirus</string>
|
||||
<string name="monitoring_min_accuracy">Vähim täpsus</string>
|
||||
<string name="monitoring_min_distance">Vähim kõrvalekalle</string>
|
||||
<string name="tracks_view_path">Menüü — Minu kohad — Rajad</string>
|
||||
<string name="multimedia_notes_view_path">Menüü — Minu kohad — Märkmed</string>
|
||||
<string name="osm_edits_view_path">Menüü — Minu kohad — OSM Muudatused</string>
|
||||
<string name="reset_plugin_to_default">Lähtesta lisaprogrammi seaded vaikeväärtustele</string>
|
||||
<string name="multimedia_rec_split_title">Salvesti jagamine</string>
|
||||
<string name="multimedia_use_system_camera">Kasuta süsteemi rakendust</string>
|
||||
|
|
|
@ -3472,9 +3472,6 @@
|
|||
<string name="monitoring_min_speed">کمترین سرعت</string>
|
||||
<string name="monitoring_min_accuracy">کمترین صحت</string>
|
||||
<string name="monitoring_min_distance">کمترین جابجایی</string>
|
||||
<string name="tracks_view_path">منو — مکانهای من — ردها</string>
|
||||
<string name="multimedia_notes_view_path">منو — مکانهای من — یادداشتها</string>
|
||||
<string name="osm_edits_view_path">منو — مکانهای من — ویرایشهای OSM</string>
|
||||
<string name="reset_plugin_to_default">بازنشانی تنظیمات افزونه به پیشفرض</string>
|
||||
<string name="button_rate">امتیاز بدهید</string>
|
||||
<string name="monitoring_prefs_descr">ناوبری، صحت ردنگاری</string>
|
||||
|
|
|
@ -3448,9 +3448,6 @@ représentant la zone : %1$s x %2$s</string>
|
|||
<string name="monitoring_min_accuracy_descr">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.</string>
|
||||
<string name="monitoring_min_accuracy_descr_side_effect">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.</string>
|
||||
<string name="monitoring_min_accuracy_descr_remark">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.</string>
|
||||
<string name="tracks_view_path">Menu > Mes lieux favoris > Traces</string>
|
||||
<string name="multimedia_notes_view_path">Menu > Mes lieux favoris > Notes</string>
|
||||
<string name="osm_edits_view_path">Menu > Mes lieux favoris > Modifications OSM</string>
|
||||
<string name="monitoring_min_speed_descr_remark">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.</string>
|
||||
<string name="monitoring_min_distance_descr_side_effect">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).</string>
|
||||
<string name="shared_string_available">Disponible</string>
|
||||
|
|
|
@ -3525,9 +3525,6 @@ Lon %2$s</string>
|
|||
<string name="monitoring_min_speed">Velocidade mínima</string>
|
||||
<string name="monitoring_min_accuracy">Precisión mínima</string>
|
||||
<string name="monitoring_min_distance">Desprazamiento mínimo</string>
|
||||
<string name="tracks_view_path">Menú — Os meus lugares — Pistas</string>
|
||||
<string name="multimedia_notes_view_path">Menú — Os meus lugares — Notas</string>
|
||||
<string name="osm_edits_view_path">Menú — Os meus lugares — Edicións do OSM</string>
|
||||
<string name="reset_plugin_to_default">Restabelecer a configuración do plugin ós valores por defecto</string>
|
||||
<string name="multimedia_rec_split_title">División de gravación</string>
|
||||
<string name="multimedia_use_system_camera">Empregar aplicación do sistema</string>
|
||||
|
|
|
@ -3472,9 +3472,6 @@ Stendur fyrir svæði: %1$s x %2$s</string>
|
|||
<string name="monitoring_min_speed">Lágmarkshraði</string>
|
||||
<string name="monitoring_min_accuracy">Lágmarksnákvæmni</string>
|
||||
<string name="monitoring_min_distance">Minnsta hreyfing</string>
|
||||
<string name="tracks_view_path">Valmynd — Staðirnir mínir — Ferlar</string>
|
||||
<string name="multimedia_notes_view_path">Valmynd — Staðirnir mínir — Minnispunktar</string>
|
||||
<string name="osm_edits_view_path">Valmynd — Staðirnir mínir — OSM-breytingar</string>
|
||||
<string name="reset_plugin_to_default">Frumstilla stillingar viðbótar á sjálfgefin gildi</string>
|
||||
<string name="multimedia_rec_split_title">Uppskipting upptöku</string>
|
||||
<string name="multimedia_use_system_camera">Nota kerfisforrit</string>
|
||||
|
|
|
@ -3474,9 +3474,6 @@ POIの更新は利用できません</string>
|
|||
<string name="app_mode_osm">OSM</string>
|
||||
<string name="select_nav_icon_descr">ナビゲーションまたは移動中にアイコンが表示されます。</string>
|
||||
<string name="select_map_icon_descr">静止時にアイコンが表示されます</string>
|
||||
<string name="tracks_view_path">メニュー — ブックマーク — 経路</string>
|
||||
<string name="multimedia_notes_view_path">メニュー — ブックマーク — メモ</string>
|
||||
<string name="osm_edits_view_path">メニュー — ブックマーク — OSM編集</string>
|
||||
<string name="reset_plugin_to_default">プラグイン設定を初期値に戻す</string>
|
||||
<string name="multimedia_rec_split_title">記録を分割</string>
|
||||
<string name="multimedia_use_system_camera">システムアプリを使用</string>
|
||||
|
|
|
@ -3456,9 +3456,6 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="monitoring_min_distance_descr">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.</string>
|
||||
<string name="search_offline_geo_error">Nie można przeanalizować intencji geograficznej \'%s\'.</string>
|
||||
<string name="multimedia_notes_view_descr">Twoje uwagi OSM są w %1$s.</string>
|
||||
<string name="tracks_view_path">Menu — Miejsca — Ślady</string>
|
||||
<string name="multimedia_notes_view_path">Menu — Miejsca — Uwagi</string>
|
||||
<string name="osm_edits_view_path">Menu — Miejsca — Edycje OSM</string>
|
||||
<string name="osm_authorization_success">Autoryzacja zakończyła się pomyślnie</string>
|
||||
<string name="monitoring_min_speed_descr_side_effect">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.</string>
|
||||
<string name="rearrange_categories">Zmień układ kategorii</string>
|
||||
|
|
|
@ -3462,9 +3462,6 @@ Pôr do Sol: %2$s</string>
|
|||
<string name="monitoring_min_speed">Velocidade mínima</string>
|
||||
<string name="monitoring_min_accuracy">Precisão mínima</string>
|
||||
<string name="monitoring_min_distance">Deslocamento mínimo</string>
|
||||
<string name="tracks_view_path">Menu - Meus lugares - Faixas</string>
|
||||
<string name="multimedia_notes_view_path">Menu - Meus lugares - Notas</string>
|
||||
<string name="osm_edits_view_path">Menu - Meus lugares - Edições OSM</string>
|
||||
<string name="reset_plugin_to_default">Redefinir as configurações do plug-in para o padrão</string>
|
||||
<string name="multimedia_rec_split_title">Divisão do gravador</string>
|
||||
<string name="multimedia_use_system_camera">Usar aplicativo do sistema</string>
|
||||
|
|
|
@ -3459,9 +3459,6 @@ Pro praghere iscrie su còdighe intreu</string>
|
|||
<string name="monitoring_min_speed">Lestresa mìnima</string>
|
||||
<string name="monitoring_min_accuracy">Acuradesa mìnima</string>
|
||||
<string name="monitoring_min_distance">Movimentu mìnimu</string>
|
||||
<string name="tracks_view_path">Menù — Logos meos — Rastas</string>
|
||||
<string name="multimedia_notes_view_path">Menù — Logos meos — Notas</string>
|
||||
<string name="osm_edits_view_path">Menù — Logos meos — Modìficas de OSM</string>
|
||||
<string name="reset_plugin_to_default">Riprìstina sas impostatziones predefinidas de s\'estensione</string>
|
||||
<string name="multimedia_use_system_camera">Imprea s\'aplicatzione de sistema</string>
|
||||
<string name="multimedia_photo_play_sound">Sonu de s\'oturadore de sa fotocàmera</string>
|
||||
|
|
|
@ -3445,9 +3445,6 @@ Zodpovedá oblasti: %1$s x %2$s</string>
|
|||
<string name="monitoring_min_speed">Minimálna rýchlosť</string>
|
||||
<string name="monitoring_min_accuracy">Minimálna presnosť</string>
|
||||
<string name="monitoring_min_distance">Minimálny posun</string>
|
||||
<string name="tracks_view_path">Menu — Moje miesta — Stopy</string>
|
||||
<string name="multimedia_notes_view_path">Menu — Moje miesta — Poznámky</string>
|
||||
<string name="osm_edits_view_path">Menu — Moje miesta — Zmeny v OSM</string>
|
||||
<string name="reset_plugin_to_default">Resetovať modul do východzieho stavu</string>
|
||||
<string name="multimedia_rec_split_title">Rozdelenie nahrávania</string>
|
||||
<string name="multimedia_use_system_camera">Použiť systémovú aplikáciu</string>
|
||||
|
|
|
@ -3465,9 +3465,6 @@
|
|||
<string name="monitoring_min_speed">Минимална брзина</string>
|
||||
<string name="monitoring_min_accuracy">Минимална прецизност</string>
|
||||
<string name="monitoring_min_distance">Минимални померај</string>
|
||||
<string name="tracks_view_path">Мени — Моја места — Стазе</string>
|
||||
<string name="multimedia_notes_view_path">Мени — Моја места — Белешке</string>
|
||||
<string name="osm_edits_view_path">Мени — Моја места — OSM измене</string>
|
||||
<string name="reset_plugin_to_default">Ресетуј поставке додатака на подразумеване вредности</string>
|
||||
<string name="multimedia_rec_split_title">Издељивање снимања</string>
|
||||
<string name="multimedia_use_system_camera">Користи системску апликацију</string>
|
||||
|
|
|
@ -3430,9 +3430,6 @@
|
|||
<string name="monitoring_min_speed">Minimum hız</string>
|
||||
<string name="monitoring_min_accuracy">Minimum doğruluk</string>
|
||||
<string name="monitoring_min_distance">Minimum yer değiştirme</string>
|
||||
<string name="tracks_view_path">Menü — Yerlerim — İzlenen yollar</string>
|
||||
<string name="multimedia_notes_view_path">Menü — Yerlerim — Notlar</string>
|
||||
<string name="osm_edits_view_path">Menü — Yerlerim — OSM Düzenlemeleri</string>
|
||||
<string name="reset_plugin_to_default">Eklenti ayarlarını varsayılana sıfırla</string>
|
||||
<string name="multimedia_rec_split_title">Kaydedici bölmesi</string>
|
||||
<string name="multimedia_use_system_camera">Sistem uygulamasını kullan</string>
|
||||
|
|
|
@ -3465,9 +3465,6 @@
|
|||
<string name="monitoring_min_speed">Найменша швидкість</string>
|
||||
<string name="monitoring_min_accuracy">Найменша точність</string>
|
||||
<string name="monitoring_min_distance">Найменше зміщення</string>
|
||||
<string name="tracks_view_path">Меню - Мої місця - Треки</string>
|
||||
<string name="multimedia_notes_view_path">Меню — Мої місця — Примітки</string>
|
||||
<string name="osm_edits_view_path">Меню — Мої місця — OSM правки</string>
|
||||
<string name="reset_plugin_to_default">Скинути налаштування втулка до усталених</string>
|
||||
<string name="multimedia_rec_split_title">Розділений записувач</string>
|
||||
<string name="multimedia_use_system_camera">Використовувати системний застосунок</string>
|
||||
|
|
|
@ -3465,9 +3465,6 @@
|
|||
<string name="monitoring_min_speed">最低速度</string>
|
||||
<string name="monitoring_min_accuracy">最低精密度</string>
|
||||
<string name="monitoring_min_distance">最小偏移</string>
|
||||
<string name="tracks_view_path">選單 — 我的收藏 — 軌跡</string>
|
||||
<string name="multimedia_notes_view_path">選單 — 我的收藏 — 註記</string>
|
||||
<string name="osm_edits_view_path">選單 — 我的收藏 — OSM 編輯</string>
|
||||
<string name="reset_plugin_to_default">重設外掛程式設定為預設值</string>
|
||||
<string name="multimedia_rec_split_title">記錄器分黎</string>
|
||||
<string name="multimedia_use_system_camera">使用系統應用程式</string>
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
<string name="import_duplicates_description">OsmAnd already has elements with the same names as those imported.\n\nSelect an action.</string>
|
||||
<string name="import_duplicates_title">Some items already exist</string>
|
||||
<string name="select_data_to_import">Select the data to be imported.</string>
|
||||
<string name="open_settings">Open settings</string>
|
||||
<string name="plugin_disabled">Plugin disabled</string>
|
||||
<string name="plugin_disabled_descr">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.</string>
|
||||
<string name="shared_string_menu">Menu</string>
|
||||
<string name="ltr_or_rtl_triple_combine_via_dash">%1$s — %2$s — %3$s</string>
|
||||
<string name="routing_profile_direct_to">Direct-to-point</string>
|
||||
<string name="clear_recorded_data">Clear recorded data</string>
|
||||
<string name="release_3_6">
|
||||
|
@ -82,9 +87,6 @@
|
|||
<string name="monitoring_min_speed">Minimum speed</string>
|
||||
<string name="monitoring_min_accuracy">Minimum accuracy</string>
|
||||
<string name="monitoring_min_distance">Minimum displacement</string>
|
||||
<string name="tracks_view_path">Menu — My places — Tracks</string>
|
||||
<string name="multimedia_notes_view_path">Menu — My places — Notes</string>
|
||||
<string name="osm_edits_view_path">Menu — My places — OSM Edits</string>
|
||||
<string name="reset_plugin_to_default">Reset plugin settings to default</string>
|
||||
<string name="multimedia_rec_split_title">Recorder split</string>
|
||||
<string name="multimedia_use_system_camera">Use system app</string>
|
||||
|
@ -2810,6 +2812,7 @@
|
|||
<string name="index_name_africa">Africa</string>
|
||||
<string name="index_name_asia">Asia</string>
|
||||
<string name="index_name_oceania">Australia and Oceania</string>
|
||||
<string name="index_name_antarctica">Antarctica</string>
|
||||
<string name="index_name_other">Worldwide and topic maps</string>
|
||||
<string name="index_name_wiki">Worldwide Wikipedia POIs</string>
|
||||
<string name="index_name_voice">Voice prompts (recorded, limited features)</string>
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
android:title="@string/accessibility_mode_disabled" />
|
||||
|
||||
<net.osmand.plus.settings.preferences.ListPreferenceEx
|
||||
android:icon="@drawable/ic_action_android"
|
||||
android:key="accessibility_mode"
|
||||
android:layout="@layout/preference_with_descr"
|
||||
android:title="@string/accessibility_mode"
|
||||
tools:icon="@drawable/ic_action_android"
|
||||
tools:summary="@string/accessibility_default" />
|
||||
|
||||
<net.osmand.plus.settings.preferences.ListPreferenceEx
|
||||
|
|
|
@ -4,6 +4,7 @@ package net.osmand;
|
|||
import android.app.Activity;
|
||||
import android.app.KeyguardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
|
@ -158,6 +159,10 @@ public class AndroidUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean isIntentSafe(Context context, Intent intent) {
|
||||
return intent.resolveActivity(context.getPackageManager()) != null;
|
||||
}
|
||||
|
||||
public static Spannable replaceCharsWithIcon(String text, Drawable icon, String[] chars) {
|
||||
Spannable spannable = new SpannableString(text);
|
||||
for (String entry : chars) {
|
||||
|
|
|
@ -14,6 +14,7 @@ import android.support.v7.preference.PreferenceViewHolder;
|
|||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
|
@ -126,6 +127,7 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen
|
|||
ListPreferenceEx accessibilityMode = (ListPreferenceEx) findPreference(settings.ACCESSIBILITY_MODE.getId());
|
||||
accessibilityMode.setEntries(entries);
|
||||
accessibilityMode.setEntryValues(entryValues);
|
||||
accessibilityMode.setIcon(getPersistentPrefIcon(R.drawable.ic_action_android));
|
||||
accessibilityMode.setDescription(R.string.accessibility_mode_descr);
|
||||
}
|
||||
|
||||
|
@ -222,7 +224,8 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen
|
|||
@Override
|
||||
protected void onBindPreferenceViewHolder(Preference preference, PreferenceViewHolder holder) {
|
||||
super.onBindPreferenceViewHolder(preference, holder);
|
||||
if (ACCESSIBILITY_OPTIONS.equals(preference.getKey())) {
|
||||
String prefId = preference.getKey();
|
||||
if (ACCESSIBILITY_OPTIONS.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);
|
||||
|
@ -240,6 +243,12 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen
|
|||
LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) selectableView.getLayoutParams();
|
||||
params.setMargins(params.leftMargin, AndroidUtils.dpToPx(app, 6), params.rightMargin, params.bottomMargin);
|
||||
}
|
||||
} else if (settings.ACCESSIBILITY_MODE.getId().equals(prefId)) {
|
||||
ImageView imageView = (ImageView) holder.findViewById(android.R.id.icon);
|
||||
if (imageView != null) {
|
||||
boolean enabled = preference.isEnabled() && app.accessibilityEnabledForMode(getSelectedAppMode());
|
||||
imageView.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -563,6 +563,8 @@ public class AppInitializer implements IProgress {
|
|||
return app.getString(R.string.index_name_north_america);
|
||||
} else if(WorldRegion.SOUTH_AMERICA_REGION_ID.equals(id)){
|
||||
return app.getString(R.string.index_name_south_america);
|
||||
} else if(WorldRegion.ANTARCTICA_REGION_ID.equals(id)){
|
||||
return app.getString(R.string.index_name_antarctica);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ import net.osmand.plus.activities.TabActivity.TabItem;
|
|||
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
|
||||
import net.osmand.plus.dashboard.tools.DashFragmentData;
|
||||
import net.osmand.plus.development.OsmandDevelopmentPlugin;
|
||||
import net.osmand.plus.dialogs.PluginDisabledBottomSheet;
|
||||
import net.osmand.plus.dialogs.PluginInstalledBottomSheetDialog;
|
||||
import net.osmand.plus.download.IndexItem;
|
||||
import net.osmand.plus.inapp.InAppPurchaseHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.mapillary.MapillaryPlugin;
|
||||
|
@ -166,6 +166,15 @@ public abstract class OsmandPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
public void showDisableDialog(@Nullable Activity activity) {
|
||||
if (activity instanceof FragmentActivity) {
|
||||
FragmentManager fragmentManager = ((FragmentActivity) activity).getSupportFragmentManager();
|
||||
if (fragmentManager != null) {
|
||||
PluginDisabledBottomSheet.showInstance(fragmentManager, getId(), activity instanceof MapActivity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void disable(OsmandApplication app) {
|
||||
}
|
||||
|
||||
|
@ -247,7 +256,7 @@ public abstract class OsmandPlugin {
|
|||
|
||||
private static boolean updateMarketPlugin(@NonNull OsmandApplication app, @NonNull Set<String> 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<String> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<String> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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<Object> {
|
||||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue