Merge branch 'master' of github.com:osmandapp/Osmand
This commit is contained in:
commit
268441e7ba
87 changed files with 16313 additions and 16296 deletions
|
@ -157,5 +157,14 @@ public class WorldRegion {
|
|||
subregions.add(rd);
|
||||
rd.superregion = this;
|
||||
}
|
||||
|
||||
|
||||
public int getLevel() {
|
||||
int res = 0;
|
||||
WorldRegion parent = superregion;
|
||||
while (parent != null) {
|
||||
parent = parent.superregion;
|
||||
res++;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
|
@ -168,7 +168,7 @@ public class MapPoiTypes {
|
|||
addIf(tm, pt, matcher);
|
||||
}
|
||||
for (PoiType pt : pc.getPoiTypes()) {
|
||||
if (pt.isReference() || pt.isNameOnly()) {
|
||||
if (pt.isReference()){
|
||||
continue;
|
||||
}
|
||||
addIf(tm, pt, matcher);
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size_large"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="@string/lorem_ipsum"/>
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/buttons_top_border"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/dashboard_divider"/>
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
<string name="use_short_object_names_descr">Gebruik kort voorwerp name in aanraking ondersoek gebruikswyse</string>
|
||||
<string name="use_short_object_names">Gebruik voorwerp name</string>
|
||||
<string name="accessibility_preferences_descr">Toeganklikheid voorkeure</string>
|
||||
<string name="accessibility_preferences">Toeganklikheid</string>
|
||||
<string name="shared_string_accessibility">Toeganklikheid</string>
|
||||
<string name="rendering_out_of_memory">Nie genoeg proses geheue om geselekteerde area te vertoon nie</string>
|
||||
<string name="use_fluorescent_overlays">Helder oorleggings</string>
|
||||
<string name="use_fluorescent_overlays_descr">Gebruik helder kleure om paaie en roetes te vertoon</string>
|
||||
|
|
|
@ -568,7 +568,7 @@
|
|||
<string name="altitude">الارتفاع</string>
|
||||
<string name="use_short_object_names">استخدام أسماء الكائنات</string>
|
||||
<string name="accessibility_preferences_descr">التفضيلات المتعلقة بالإتاحة</string>
|
||||
<string name="accessibility_preferences">الإتاحة</string>
|
||||
<string name="shared_string_accessibility">الإتاحة</string>
|
||||
<string name="rendering_out_of_memory">ذاكرة التشغيل غير كافية لعرض المنطقة المختارة</string>
|
||||
<string name="offline_edition">التحرير دون اتصال</string>
|
||||
<string name="offline_edition_descr">استخدام التحرير دون اتصال دائماً</string>
|
||||
|
|
|
@ -938,7 +938,7 @@
|
|||
<string name="use_short_object_names_descr">Užyvać karotkіja nazvy abektaŭ u režymie ahliadu</string>
|
||||
<string name="use_short_object_names">Užyvać nazvy abektaŭ</string>
|
||||
<string name="accessibility_preferences_descr">Nalady dastupnaścі</string>
|
||||
<string name="accessibility_preferences">Dastupnaść</string>
|
||||
<string name="shared_string_accessibility">Dastupnaść</string>
|
||||
<string name="arrival_distance_factor_early">Raniej</string>
|
||||
<string name="arrival_distance_factor_normally">Zvyčajna</string>
|
||||
<string name="arrival_distance_factor_late">Paźniej</string>
|
||||
|
|
|
@ -490,7 +490,7 @@
|
|||
<string name="use_short_object_names_descr">Ужываць кароткія назвы аб\'ектаў у рэжыме агляду</string>
|
||||
<string name="use_short_object_names">Ужываць назвы аб\'ектаў</string>
|
||||
<string name="accessibility_preferences_descr">Налады даступнасьці</string>
|
||||
<string name="accessibility_preferences">Даступнасьць</string>
|
||||
<string name="shared_string_accessibility">Даступнасьць</string>
|
||||
<string name="rendering_out_of_memory">Недастаткова памяці каб паказаць абраную прастору</string>
|
||||
<string name="use_fluorescent_overlays">Флюарэсцэнтныя пласты</string>
|
||||
<string name="use_fluorescent_overlays_descr">Ужываць флюарэсцэнтныя колеры для трэкаў і шляхоў</string>
|
||||
|
|
|
@ -664,7 +664,7 @@ OsmAnd е с отворен код и активно да се развива.
|
|||
<string name="use_short_object_names_descr">Кратки имена на обекти в режим разглеждане</string>
|
||||
<string name="use_short_object_names">Използване на имена на обекти</string>
|
||||
<string name="accessibility_preferences_descr">Настройки за достъпност</string>
|
||||
<string name="accessibility_preferences">Достъпност</string>
|
||||
<string name="shared_string_accessibility">Достъпност</string>
|
||||
<string name="rendering_out_of_memory">Няма достатъчно памет за избрания район</string>
|
||||
<string name="use_fluorescent_overlays">Светещ допълнителен слой</string>
|
||||
<string name="use_fluorescent_overlays_descr">Използване на ярки цветове за осветяване на пътища и маршрути</string>
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
<string name="no_info">No hi ha informació</string>
|
||||
<string name="settings_direction_style">Estil de la direcció</string>
|
||||
<string name="i_am_here">Sóc aquí</string>
|
||||
<string name="accessibility_preferences">Accessibilitat</string>
|
||||
<string name="shared_string_accessibility">Accessibilitat</string>
|
||||
<string name="use_fluorescent_overlays_descr">Utilitza colors fluorescents per mostrar traces i rutes</string>
|
||||
<string name="local_openstreetmap_uploading">S\'està pujant…</string>
|
||||
<string name="show_warnings_descr">Mostra límits de velocitat, radars i bandes rugoses</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2411,7 +2411,7 @@
|
|||
<string name="poi_cross">Kors</string>
|
||||
<string name="poi_summit_cross">Topkors: ja</string>
|
||||
|
||||
<string name="poi_prison_camp">Fangelejr</string>
|
||||
<string name="poi_prison_camp">Tidligere fangelejr</string>
|
||||
<string name="poi_concentration_camp">Type: koncentrationslejr</string>
|
||||
<string name="poi_pow_camp">Type: krigsfangelejr</string>
|
||||
<string name="poi_labor_camp">Type: arbejdslejr</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -248,7 +248,7 @@
|
|||
<string name="use_short_object_names_descr">Benutze kurze Objektnamen im Touch-Entdeckungsmodus</string>
|
||||
<string name="use_short_object_names">Benutze Objektnamen</string>
|
||||
<string name="accessibility_preferences_descr">Einstellungen zur Barrierefreiheit</string>
|
||||
<string name="accessibility_preferences">Bedienungshilfen</string>
|
||||
<string name="shared_string_accessibility">Bedienungshilfen</string>
|
||||
<string name="rendering_out_of_memory">Zu wenig Prozess-Speicher zum Anzeigen des gewählten Gebietes</string>
|
||||
<string name="use_fluorescent_overlays">Fluoreszierende Overlays</string>
|
||||
<string name="use_fluorescent_overlays_descr">Fluoreszierende Anzeige von Tracks und Routen</string>
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
<string name="use_short_object_names_descr">Χρήση μικρών ονομάτων αντικειμένων στη λειτουργία αφής εξερεύνησης</string>
|
||||
<string name="use_short_object_names">Χρήση ονομάτων αντικειμένων</string>
|
||||
<string name="accessibility_preferences_descr">Προτιμήσεις σχετικές με προσβασιμότητα</string>
|
||||
<string name="accessibility_preferences">Προσβασιμότητα</string>
|
||||
<string name="shared_string_accessibility">Προσβασιμότητα</string>
|
||||
<string name="rendering_out_of_memory">Δεν υπάρχει αρκετή μνήμη για να εμφανιστεί η επιλεγμένη περιοχή</string>
|
||||
<string name="use_fluorescent_overlays">Φωτεινές επικαλύψεις</string>
|
||||
<string name="use_fluorescent_overlays_descr">Χρήση φωτεινών χρωμάτων για εμφάνιση ιχνών και διαδρομών</string>
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
<string name="plugin_ski_name">Vista invernal</string>
|
||||
<string name="audionotes_plugin_name">Notas multimedia</string>
|
||||
<string name="osmand_parking_plugin_name">Estacionamiento</string>
|
||||
<string name="accessibility_preferences">Accesibilidad</string>
|
||||
<string name="shared_string_accessibility">Accesibilidad</string>
|
||||
<string name="osm_settings">Edición OSM</string>
|
||||
<string name="debugging_and_development">Desarrollo de OsmAnd</string>
|
||||
<string name="back_to_map">Volver al mapa</string>
|
||||
|
@ -2004,13 +2004,10 @@
|
|||
<string name="faq_item_description">Cómo usar los complementos</string>
|
||||
<string name="map_viewing_item">Vista del mapa</string>
|
||||
<string name="search_on_the_map_item">Busqueda en el mapa</string>
|
||||
<string name="planning_trip_item">Planificación de viaje</string>
|
||||
<string name="planning_trip_item">Planificación de viaje</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mapas de curvas de nivel y sombreado</string>
|
||||
<string name="trip_recording_tool_item">Herramienta de grabación de viaje</string>
|
||||
<string name="osmand_ski_maps_item">Mapas de esquí de OsmAnd</string>
|
||||
<string name="nautical_charts_item">Cartas náuticas</string>
|
||||
<string name="audio_video_note_item">Notas multimedia</string>
|
||||
<string name="osm_editing_item">Edición de OSM</string>
|
||||
<string name="instalation_troubleshooting_item">Instalación y solución de problemas</string>
|
||||
<string name="techical_articles_item">Artículos técnicos</string>
|
||||
<string name="versions_item">Versiones</string>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -71,7 +71,7 @@
|
|||
<string name="osmo_plugin_name">OsMo (OSM Monitoorimine)</string>
|
||||
<string name="plugin_nautical_name">Merendus kaardi vaade</string>
|
||||
<string name="audionotes_plugin_name">Audio/video märkmed</string>
|
||||
<string name="accessibility_preferences">Juurdepääs</string>
|
||||
<string name="shared_string_accessibility">Juurdepääs</string>
|
||||
<string name="debugging_and_development">OsmAnd arendus</string>
|
||||
<string name="back_to_map">Tagasi kaardile</string>
|
||||
<string name="share_note">Jaga märget</string>
|
||||
|
|
|
@ -494,7 +494,7 @@
|
|||
<string name="use_short_object_names_descr">Objektuen izen motzak erabili ukipen-esplorazio moduan</string>
|
||||
<string name="use_short_object_names">Objetuen izenak erabili</string>
|
||||
<string name="accessibility_preferences_descr">Erabilerraztasunari erlazionaturiko hobespenak</string>
|
||||
<string name="accessibility_preferences">Erabilerraztasuna</string>
|
||||
<string name="shared_string_accessibility">Erabilerraztasuna</string>
|
||||
<string name="rendering_out_of_memory">Aukeratutako area erakusteko ez dago memoria nahikorik</string>
|
||||
<string name="use_fluorescent_overlays">Gainazal fluoreszenteak</string>
|
||||
<string name="use_fluorescent_overlays_descr">Erabili kolore fluoreszenteak bideak eta ibilbideak azaltzeko</string>
|
||||
|
|
|
@ -1244,7 +1244,7 @@ OsmAnd منبع باز است و فعالانه در حال توسعه است.
|
|||
<string name="use_short_object_names_descr">استفاده از نام کوتاه شی در حالت اکتشاف لمسی</string>
|
||||
<string name="use_short_object_names">استفاده از نام شی</string>
|
||||
<string name="accessibility_preferences_descr">تنظیمات مربوط به دسترسی</string>
|
||||
<string name="accessibility_preferences">دسترسی</string>
|
||||
<string name="shared_string_accessibility">دسترسی</string>
|
||||
|
||||
<string name="live_monitoring_url_descr">تعیین آدرس وب سایت با پارامترهای: lat={0}, lon={1}, timestamp={2}, hdop={3}, altitude={4}, speed={5}, bearing={6}</string>
|
||||
<string name="live_monitoring_url">آدرس وبسایت ذخیره سازی آنلاین مسیر</string>
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<string name="direction_style_clockwise">Myötäpäivään (12 sektoria)</string>
|
||||
<string name="settings_direction_style">Suunnan tyyli</string>
|
||||
<string name="i_am_here">Olen täällä</string>
|
||||
<string name="accessibility_preferences">Esteettömyys</string>
|
||||
<string name="shared_string_accessibility">Esteettömyys</string>
|
||||
<string name="accessibility_preferences_descr">Esteettömyyteen liittyvät asetukset</string>
|
||||
<string name="offline_edition">Yhteydetön editointi</string>
|
||||
<string name="local_openstreetmap_uploading">Lähetetään…</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -866,7 +866,7 @@
|
|||
<string name="use_short_object_names_descr">Empregar os nomes curtos dos obxectos no modo de exploración con toques</string>
|
||||
<string name="use_short_object_names">Empregar os nomes dos obxectos</string>
|
||||
<string name="accessibility_preferences_descr">Preferencias relacionadas coa accesibilidade</string>
|
||||
<string name="accessibility_preferences">Accesibilidade</string>
|
||||
<string name="shared_string_accessibility">Accesibilidade</string>
|
||||
<string name="arrival_distance_factor_early">Cedo</string>
|
||||
<string name="arrival_distance_factor_normally">Normal</string>
|
||||
<string name="arrival_distance_factor_late">Tarde</string>
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
<string name="use_short_object_names_descr">שימוש בשמות קצרים לפריטים במצב חקירה במגע</string>
|
||||
<string name="use_short_object_names">שימוש בשמות של פריטים</string>
|
||||
<string name="accessibility_preferences_descr">העדפות הקשורות בנגישות</string>
|
||||
<string name="accessibility_preferences">נגישות</string>
|
||||
<string name="shared_string_accessibility">נגישות</string>
|
||||
<string name="rendering_out_of_memory">אין די זיכרון לתהליך כדי להציג את האיזור הנבחר</string>
|
||||
<string name="use_fluorescent_overlays">שכבות מוארות</string>
|
||||
<string name="use_fluorescent_overlays_descr">ניתן להשתמש בצבעים מוארים כדי להציג דרכים ומסלולים</string>
|
||||
|
|
|
@ -852,7 +852,7 @@
|
|||
<string name="show_current_gpx_title">Prikaži trenutni trag</string>
|
||||
|
||||
<string name="offline_edition">Offline uređivanje</string>
|
||||
<string name="accessibility_preferences">Pristupačnost</string>
|
||||
<string name="shared_string_accessibility">Pristupačnost</string>
|
||||
<string name="offline_edition_descr">Uvijek koristi offline uređivanje</string>
|
||||
<string name="update_poi_does_not_change_indexes">POI promjene unutar aplikacije ne utječu na datoteke preuzete karte , promjene se pohranjuju u lokalnu datoteku.</string>
|
||||
<string name="local_openstreetmap_delete">Izbriši promjene</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1069,7 +1069,7 @@ POIの更新は利用できません</string>
|
|||
<string name="use_short_object_names_descr">タッチで検索する場合に短いオブジェクト名を使用します</string>
|
||||
<string name="use_short_object_names">オブジェクト名を使用</string>
|
||||
<string name="accessibility_preferences_descr">アクセシビリティ関連の設定をします</string>
|
||||
<string name="accessibility_preferences">アクセシビリティ</string>
|
||||
<string name="shared_string_accessibility">アクセシビリティ</string>
|
||||
<string name="use_fluorescent_overlays">蛍光色の重ね表示</string>
|
||||
<string name="use_fluorescent_overlays_descr">経路とルートを表示する際に、蛍光色を使用します</string>
|
||||
<string name="offline_edition">オフライン編集</string>
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<string name="use_short_object_names_descr">დათვალიერების რეჟიმში ობიექტების მოკლე დასახელებების გამოყენება</string>
|
||||
<string name="use_short_object_names">ობიექტების სახელების გამოყენება</string>
|
||||
<string name="accessibility_preferences_descr">წვდომადობის პარამეტრები</string>
|
||||
<string name="accessibility_preferences">წვდომა</string>
|
||||
<string name="shared_string_accessibility">წვდომა</string>
|
||||
<string name="rendering_out_of_memory">არასაკმარისი მეხსიერება არჩეული ადგილის საჩვენებლად</string>
|
||||
<string name="use_fluorescent_overlays">მანათობელი დაფარვები</string>
|
||||
<string name="use_fluorescent_overlays_descr">ბილიკებისა და გზების მანათობელი ფერებით ჩვენება</string>
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<string name="plugin_ski_name">ಆಕಾಶ ನಕ್ಷೆ ವೀಕ್ಷಣೆ</string>
|
||||
<string name="audionotes_plugin_name">ದೃಶ್ಯ / ಶ್ರಾವ್ಯ ಟಿಪ್ಪಣೆಗಳು</string>
|
||||
<string name="osmand_parking_plugin_name">ನಿಲುಗಡೆ ಸ್ಥಾನ</string>
|
||||
<string name="accessibility_preferences">ಲಭ್ಯಾರ್ಹತೆ</string>
|
||||
<string name="shared_string_accessibility">ಲಭ್ಯಾರ್ಹತೆ</string>
|
||||
<string name="osm_settings">ಒಎಸ್ಎಂ ಸಂಪಾದನೆ</string>
|
||||
<string name="debugging_and_development">ಒಸ್ಮಾಂಡ್ ತಂತ್ರಾಶ ಅಭಿವೃದ್ಧಿ</string>
|
||||
<string name="rename_failed">ಮರುನಾಮಕರಣ ವಿಫಲವಾಗಿದೆ</string>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<string name="use_short_object_names_descr">터치 탐색 모드에서 짧은 개체 이름을 사용합니다</string>
|
||||
<string name="use_short_object_names">개체 이름 사용</string>
|
||||
<string name="accessibility_preferences_descr">접근성(내게 필요한 옵션) 관련 선호도를 선택합니다</string>
|
||||
<string name="accessibility_preferences">접근성</string>
|
||||
<string name="shared_string_accessibility">접근성</string>
|
||||
|
||||
<string name="rendering_out_of_memory">선택 영역을 표시할 충분한 프로세스 메모리가 없습니다</string>
|
||||
<string name="use_fluorescent_overlays">형광색상 중첩(오버레이)</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -80,7 +80,7 @@
|
|||
<string name="use_short_object_names_descr">Lietot īsos objektu nosaukumus pieskārienu skata režīmā</string>
|
||||
<string name="use_short_object_names">Lietot objektu vārdus</string>
|
||||
<string name="accessibility_preferences_descr">Ar pieejamību saistītās izvēles</string>
|
||||
<string name="accessibility_preferences">Pieejamība</string>
|
||||
<string name="shared_string_accessibility">Pieejamība</string>
|
||||
<string name="rendering_out_of_memory">Nepietiek atmiņas, lai attēlotu izvēlēto apgabalu</string>
|
||||
<string name="use_fluorescent_overlays">Fluorescenti slāņi</string>
|
||||
<string name="use_fluorescent_overlays_descr">Lietot flurescentās krāsas, lai attēlotu maršruta ceļus</string>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -89,7 +89,7 @@
|
|||
<string name="use_short_object_names_descr">Gebruik korte objectnamen in aanraakmodus</string>
|
||||
<string name="use_short_object_names">Gebruik korte objectnamen</string>
|
||||
<string name="accessibility_preferences_descr">Toegankelijkheidsgerelateerde instellingen</string>
|
||||
<string name="accessibility_preferences">Toegankelijkheid</string>
|
||||
<string name="shared_string_accessibility">Toegankelijkheid</string>
|
||||
<string name="rendering_out_of_memory">Niet genoeg werkgeheugen voor weergave van het geselecteerde gebied</string>
|
||||
<string name="use_fluorescent_overlays">Fluorescerende overlays</string>
|
||||
<string name="use_fluorescent_overlays_descr">Gebruik fluorescerende kleuren voor de weergave van tracks and routes</string>
|
||||
|
|
|
@ -742,7 +742,7 @@
|
|||
<string name="use_short_object_names_descr">Używa krótkich nazw obiektów w trybie eksploracji dotykowej</string>
|
||||
<string name="use_short_object_names">Nazwy obiektów</string>
|
||||
<string name="accessibility_preferences_descr">Ustawienia ułatwień dostępu</string>
|
||||
<string name="accessibility_preferences">Ułatwienia dostępu</string>
|
||||
<string name="shared_string_accessibility">Ułatwienia dostępu</string>
|
||||
<string name="use_fluorescent_overlays">Odblaskowe nakładki</string>
|
||||
<string name="use_fluorescent_overlays_descr">Użyj odblaskowych kolorów do wyświetlania ścieżek i tras</string>
|
||||
<string name="offline_edition">Edycja w trybie offline</string>
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<string name="osmand_parking_plugin_name">Posição de estacionamento</string>
|
||||
<string name="osmand_distance_planning_plugin_name">Calculadora de distância e ferramenta de planeamento</string>
|
||||
<string name="osmand_distance_planning_plugin_description">Este complemento fornece um widget da tela mapa permitindo criar caminhos tocando no mapa, ou usar ou modificar arquivos GPX existentes, para planejar uma viagem e medir a distância entre pontos. Os resultados podem ser salvos como um arquivo GPX, que mais tarde pode ser usado para orientação.</string>
|
||||
<string name="accessibility_preferences">Acessibilidade</string>
|
||||
<string name="shared_string_accessibility">Acessibilidade</string>
|
||||
<string name="osmand_accessibility_description">Este complemento disponibiliza recursos de acessibilidade do dispositivo diretamente no OsmAnd. Facilita, por exemplo, o ajuste da velocidade para vozes TTS, configuração da navegação direcional na tela, uso do trackball para controle de zoom, ou retorno de texto para fala, como para anunciar automaticamente sua posição.</string>
|
||||
<string name="osm_settings">Edição do OSM</string>
|
||||
<string name="debugging_and_development">Desenvolvimento OsmAnd</string>
|
||||
|
|
|
@ -553,7 +553,7 @@
|
|||
<string name="use_short_object_names_descr">Use nomes curtos de objetos em modo de exploração por toque</string>
|
||||
<string name="use_short_object_names">Usar nomes de objetos</string>
|
||||
<string name="accessibility_preferences_descr">Preferências relacionadas com a acessibilidade</string>
|
||||
<string name="accessibility_preferences">Acessibilidade</string>
|
||||
<string name="shared_string_accessibility">Acessibilidade</string>
|
||||
<string name="use_fluorescent_overlays">Sobreposições Fluorescentes</string>
|
||||
<string name="use_fluorescent_overlays_descr">Use cores fluorescentes para exibir faixas e rotas</string>
|
||||
<string name="offline_edition">Edição offline</string>
|
||||
|
|
|
@ -287,7 +287,7 @@
|
|||
<string name="use_short_object_names_descr">Folosește prescurtări ale denumirilor în modul explorare a hărții</string>
|
||||
<string name="use_short_object_names">Folosește prescurtări</string>
|
||||
<string name="accessibility_preferences_descr">Preferințe pentru accesibilitate</string>
|
||||
<string name="accessibility_preferences">Accesibilitate</string>
|
||||
<string name="shared_string_accessibility">Accesibilitate</string>
|
||||
<string name="rendering_out_of_memory">Nu există suficientă memorie disponibilă pentru a afișa zona selectată</string>
|
||||
<string name="use_fluorescent_overlays">Straturi fluorescente</string>
|
||||
<string name="use_fluorescent_overlays_descr">Folosește culori fluorescente pentru reprezentarea rutelor și traseelor</string>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<string name="poi_baby_goods">Товары для детей</string>
|
||||
<string name="poi_bag">Сумки, чемоданы</string>
|
||||
<string name="poi_bathroom_furnishing">Сантехника, ванные</string>
|
||||
<string name="poi_bed">Спальные принадлежности</string>
|
||||
<string name="poi_bed">Магазин постельного белья</string>
|
||||
<string name="poi_boutique">Бутик</string>
|
||||
<string name="poi_carpet">Магазин ковров</string>
|
||||
<string name="poi_charity">Благотворительный магазин</string>
|
||||
|
@ -415,7 +415,7 @@
|
|||
<string name="poi_croquet">Крокет</string>
|
||||
<string name="poi_cycling">Велосипедный спорт</string>
|
||||
<string name="poi_diving">Прыжки в воду</string>
|
||||
<string name="poi_scuba_diving">Подводное плавание</string>
|
||||
<string name="poi_scuba_diving">Плавание с аквалангом</string>
|
||||
<string name="poi_dog_racing">Собачьи бега</string>
|
||||
<string name="poi_equestrian">Верховая езда</string>
|
||||
<string name="poi_golf">Гольф</string>
|
||||
|
@ -454,7 +454,7 @@
|
|||
<string name="poi_attraction">Достопримечательность</string>
|
||||
<string name="poi_memorial">Памятник, мемориал</string>
|
||||
<string name="poi_artwork">Произведение искусства</string>
|
||||
<string name="poi_archaeological_site">Раскопки</string>
|
||||
<string name="poi_archaeological_site">Археологические раскопки</string>
|
||||
<string name="poi_battlefield">Поле битвы</string>
|
||||
<string name="poi_boundary_stone">Межевой камень</string>
|
||||
<string name="poi_castle">Замок</string>
|
||||
|
@ -848,23 +848,23 @@
|
|||
<string name="poi_public_transport_stop_position">Остановка общественного транспорта</string>
|
||||
<string name="poi_railway_buffer_stop">Железнодорожный буфер</string>
|
||||
<string name="poi_junction">Перекрёсток</string>
|
||||
<string name="poi_observation_tower">Смотровая башня</string>
|
||||
<string name="poi_observation_tower">Наблюдательная башня</string>
|
||||
<string name="poi_bell_tower">Колокольня</string>
|
||||
<string name="poi_industrial">Промышленный район</string>
|
||||
<string name="poi_industrial">Промышленная зона</string>
|
||||
<string name="poi_allotments">Сады</string>
|
||||
<string name="poi_farmyard">Сельскохозяйственный двор</string>
|
||||
<string name="poi_farmyard">Фермерское хозяйство</string>
|
||||
<string name="poi_meadow">Луг</string>
|
||||
<string name="poi_landuse_railway">Территория железной дороги</string>
|
||||
<string name="poi_basin">Искусственный водоём</string>
|
||||
|
||||
<string name="poi_storage_tank">Резервуар</string>
|
||||
<string name="poi_storage_tank">Бак для жидкости</string>
|
||||
|
||||
<string name="poi_neighbourhood">Микрорайон</string>
|
||||
<string name="poi_residential">Жилой район</string>
|
||||
<string name="poi_religious">Религиозное землепользование</string>
|
||||
|
||||
<!-- <string name="poi_general_tourist_attraction_yes">Достопримечательность (тип неизвестен)</string>-->
|
||||
<string name="poi_attraction_amusement_ride">Парк атракционов</string>
|
||||
<string name="poi_attraction_amusement_ride">Атракцион</string>
|
||||
<string name="poi_wilderness_hut">Лесной домик</string>
|
||||
<string name="poi_hunting_lodge">Охотничий домик</string>
|
||||
|
||||
|
@ -2358,7 +2358,7 @@
|
|||
<string name="poi_cross">Крест</string>
|
||||
<string name="poi_summit_cross">Крест на вершине: есть</string>
|
||||
|
||||
<string name="poi_prison_camp">Бывший лагерь военнопленных</string>
|
||||
<string name="poi_prison_camp">Бывший тюремный лагерь</string>
|
||||
<string name="poi_concentration_camp">Тип: концентрационный лагерь</string>
|
||||
<string name="poi_pow_camp">Тип: для военнопленных</string>
|
||||
<string name="poi_labor_camp">Тип: исправительно-трудовой</string>
|
||||
|
@ -2369,4 +2369,4 @@
|
|||
<string name="poi_bathing_yes">Купание: да</string>
|
||||
<string name="poi_bathing_no">Купание: нет</string>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<string name="osmo_use_https_descr">Использовать безопасное подключение к серверу</string>
|
||||
<string name="osmo_use_https">Использовать HTTPS</string>
|
||||
<string name="srtm_plugin_description">"Плагин обеспечивает наложение контурных линий и (рельефа) затемняющего слоя, которые будут отображаться поверх оффлайн карт OsmAnd. Эта функция высоко оценится спортсменами, туристами, путешественниками и всеми, кто заинтересован в рельефной структуре ландшафта.\n\nГлобальные данные (между 70 градусов на севере и 70 градусов на юге) основываются на измерениях SRTM (Shuttle Radar Topography Mission) и ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer), инструментом визуализации Terra, флагманского спутника Земли системы наблюдения NASA. ASTER является результатом совместных усилий NASA, министерства экономики Японии, торговли и промышленности (METI), космических систем Японии (J-spacesystems). "</string>
|
||||
<string name="srtm_plugin_description">"Этот плагин обеспечивает как наложение контурных линий, так и отображения затеняющего слоя рельефа поверх стандартных карт OsmAnd. Эта функция высоко оценится спортсменами, туристами, путешественниками и всеми, кто заинтересован в рельефной структуре ландшафта.\n\nГлобальные данные (между 70 градусами на севере и 70 градусами на юге) основываются на измерениях SRTM (Shuttle Radar Topography Mission) и ASTER (Advanced Spaceborne Thermal Emission and Reflection Radiometer) — инструментом визуализации Terra, флагманского спутника Системы Наблюдения Земли NASA. ASTER является результатом совместных усилий NASA, министерства экономики Японии, торговли и промышленности (METI), а также Космических Систем Японии (J-spacesystems). "</string>
|
||||
<string name="srtm_paid_version_msg">Рассмотрите, пожалуйста, покупку плагина \"Линии высот\" в Google Play, чтобы поддержать последующую разработку.</string>
|
||||
<string name="srtm_paid_version_title">Линии высот</string>
|
||||
<string name="av_def_action_video">Запись видео</string>
|
||||
|
@ -88,8 +89,7 @@
|
|||
<string name="online_map_settings_descr">Настройки источников онлайн карт и слоёв</string>
|
||||
|
||||
|
||||
<string name="osmand_rastermaps_plugin_description">"С помощью этого плагина вы можете получить доступ ко множеству видов интернет карт (тайловых или растровых), от предопределенных тайловых OpenStreetMap (Mapnik) до спутниковых изображений и специальных слоев назначения, таких как карты погоды, климатические карты, геологических карты, слои затемнения высот и т.д.
|
||||
\nЛюбая из этих карт может быть использована в качестве основной (базовой) карты для отображения на экране OsmAnd или в виде наложения/подложки к другой базовой карте (обычной оффлайн карте OsmAnd). Для того чтобы сделать любую подложку более видимой, некоторые элементы векторной карты OsmAnd могут быть по желанию легко скрыты через меню \"Настройка карты\".\nТайловые карты могут быть получены непосредственно с помощью онлайн-источников или могут быть подготовлены для использования в автономном режиме (и вручную скопированы в папку данных OsmAnd) в качестве базы данных SQLite, которая может быть получена с помощью различных инструментов подготовки карт сторонних производителей. "</string>
|
||||
<string name="osmand_rastermaps_plugin_description">"С помощью этого плагина можно получить доступ ко множеству видов онлайн-карт (тайловых или растровых), от предопределенных тайловых OpenStreetMap (Mapnik) до спутниковых снимков и слоев специального назначения, таких как карты погоды, климатические карты, геологических карты, слои затемнения высот и т. д.\n\nЛюбая из этих карт может быть использована в качестве основной (базовой) карты для отображения на экране OsmAnd или в виде наложения или подложки к другой базовой карте (например стандартной офлайн-карте OsmAnd). Чтобы сделать какую-либо подложку лучше видимой, некоторые элементы векторной карты OsmAnd могут быть по желанию легко скрыты через меню «Настройка карты».\n\nТайловые карты можно получить непосредственно с помощью онлайн-источников или подготовить для использования в автономном режиме (и вручную скопировать в папку данных OsmAnd) в виде базы данных sqlite, которая может быть создана с помощью различных инструментов подготовки карт сторонних производителей. "</string>
|
||||
<string name="osmand_background_plugin_description">Этот плагин предоставляет навигацию и запись маршрутов в энергосберегающем режиме. Плагин работает в фоновом режиме и периодически активизирует GPS для записи маршрута или воспроизведения голосовых команд.</string>
|
||||
<string name="osmand_accessibility_description">"Плагин добавляет поддержку специальных возможностей устройства непосредственно в OsmAnd. Это облегчает, например, регулировку скорости речи для голоса TTS, настройку направленности экрана навигации, управление масштабом при помощи трекбола или использование голосовых команд обратной связи для авто аннотации вашего местоположения."</string>
|
||||
|
||||
|
@ -817,7 +817,7 @@
|
|||
<string name="accessibility_extensions_descr">Дополнительные возможности невизуального доступа для старых версий Android</string>
|
||||
<string name="accessibility_extensions">Дополнительные возможности невизуального доступа</string>
|
||||
<string name="accessibility_preferences_descr">Настройки для невизуального доступа</string>
|
||||
<string name="accessibility_preferences">Специальные возможности</string>
|
||||
<string name="shared_string_accessibility">Специальные возможности</string>
|
||||
|
||||
|
||||
|
||||
|
@ -1044,7 +1044,7 @@
|
|||
<string name="precise_routing_mode_descr">Включите, для расчёта точных маршрутов без затруднений. Всё ещё ограниченн расстоянием и медленный.</string>
|
||||
|
||||
|
||||
<string name="download_hillshade_maps">Карты с рельефом местности</string>
|
||||
<string name="download_hillshade_maps">Затемнение рельефа</string>
|
||||
<string name="av_use_external_camera_descr">Использовать системную программу для фото</string>
|
||||
<string name="av_use_external_camera">Использовать приложение Камера</string>
|
||||
<string name="index_name_openmaps">OpenMaps - Европа</string>
|
||||
|
@ -1358,7 +1358,7 @@
|
|||
<string name="osmo_group_name">Название группы</string>
|
||||
<string name="osmo_connect_to_group">Подключиться к группе</string>
|
||||
<string name="osmo_create_group">Создать группу</string>
|
||||
<string name="osmo_enable_tracker">Отправить моё местоположение</string>
|
||||
<string name="osmo_enable_tracker">Отправить мои местоположения</string>
|
||||
<string name="osmo_group_description">Описание</string>
|
||||
<string name="int_days">дней</string>
|
||||
<string name="osmo_track_interval">Интервал отправки</string>
|
||||
|
@ -1644,7 +1644,7 @@
|
|||
<string name="version_settings_descr">Скачать ночные сборки</string>
|
||||
<string name="version_settings">Сборки</string>
|
||||
|
||||
<string name="shared_string_my_location">Мое местоположение</string>
|
||||
<string name="shared_string_my_location">Моё местоположение</string>
|
||||
<string name="gps_status">Статус GPS</string>
|
||||
<string name="points">Точки</string>
|
||||
<string name="parking_place">Место для парковки</string>
|
||||
|
@ -1923,7 +1923,7 @@
|
|||
<string name="address_unknown">Адрес неизвестен</string>
|
||||
<string name="are_you_sure">Вы уверены?</string>
|
||||
<string name="unsaved_changes_will_be_lost">Все несохраненные изменения будут потеряны. Продолжить?</string>
|
||||
<string name="simulate_your_location_descr">Моделировать используя записанный GPX или рассчитанный маршрут</string>
|
||||
<string name="simulate_your_location_descr">Моделировать, используя рассчитанный маршрут или записанный GPX</string>
|
||||
<string name="simulate_your_location_stop_descr">Остановить моделирование</string>
|
||||
<string name="favorite_category_add_new">Добавить новую</string>
|
||||
<string name="favorite_category_select">Выберите категорию</string>
|
||||
|
@ -1951,7 +1951,7 @@
|
|||
<string name="world_maps">Карты мира</string>
|
||||
|
||||
<string name="favourites_context_menu_add">Добавить избранное</string>
|
||||
<string name="region_maps">Карты региона</string>
|
||||
<string name="region_maps">Региональные карты</string>
|
||||
<string name="favorite_category_dublicate_message">Категория с таким названием уже существует. Введите другое название.</string>
|
||||
<string name="favorite_category_name">Название категории</string>
|
||||
<string name="favorite_category_add_new_title">Добавить новую категорию</string>
|
||||
|
@ -1968,8 +1968,8 @@
|
|||
<string name="show_free_version_banner_description">Даже если у вас купленная версия вы еще можете увидеть баннер для бесплатной версии</string>
|
||||
<string name="confirm_download_roadmaps">Вы уверены, что хотите скачать карту автодорог, даже если у вас есть полная карта?</string>
|
||||
<string name="value_downloaded_from_max">%1$.1f из %2$.1f Мб</string>
|
||||
<string name="file_size_in_mb">%.1f Мб</string>
|
||||
<string name="update_all">Обновить все (%1$s Мб)</string>
|
||||
<string name="file_size_in_mb">%.1f МБ</string>
|
||||
<string name="update_all">Обновить все (%1$s МБ)</string>
|
||||
<string name="free_downloads_used">Использовано бесплатных загрузок</string>
|
||||
<string name="free_downloads_used_description">Вы можете посмотреть сколько бесплатных загрузок вы использовали</string>
|
||||
|
||||
|
@ -1977,6 +1977,33 @@
|
|||
<string name="share_geo">гео:</string>
|
||||
<string name="share_menu_location">Поделиться местоположением</string>
|
||||
<string name="shared_string_send">Отправить</string>
|
||||
<string name="application_dir_description">Выберите место где вы хотите сохранить файлы карт.</string>
|
||||
<string name="application_dir_description">Выберите, где вы хотите сохранить файлы карт.</string>
|
||||
<string name="show_on_start_description">Приложение будет запускаться с экрана карты</string>
|
||||
</resources>
|
||||
<string name="map_downloaded">Карта загружена</string>
|
||||
<string name="shared_string_qr_code">QR-код</string>
|
||||
<string name="go_to_map">Перейти к карте</string>
|
||||
<string name="world_map_download_descr">Базовая карта мира (покрывающая весь мир при малом увеличении) отсутствует или устарела. Пожалуйста, загрузите базовую карту мира для полноты рабочего окружения.</string>
|
||||
<string name="map_downloaded_descr">Карта %1$s загружена. Вернитесь к карте, чтобы начать её использовать.</string>
|
||||
<string name="simulate_initial_startup">Имитировать первый запуск</string>
|
||||
<string name="simulate_initial_startup_descr">Устанавливает признак первого запуска приложения, не изменяет других настроек</string>
|
||||
<string name="poll">Опрос</string>
|
||||
<string name="contact_us">Связаться с нами</string>
|
||||
<string name="versions_item">Версии</string>
|
||||
<string name="techical_articles_item">Технические статьи</string>
|
||||
<string name="instalation_troubleshooting_item">Установка и решение проблем</string>
|
||||
<string name="search_on_the_map_item">Поиск карты</string>
|
||||
<string name="map_viewing_item">Обзор карты</string>
|
||||
<string name="faq_item_description">Как пользоваться плагинами</string>
|
||||
<string name="faq_item">ЧаВо</string>
|
||||
<string name="first_usage_item">Первый запуск</string>
|
||||
<string name="first_usage_item_description">Как загрузить карты, установить основные настройки</string>
|
||||
<string name="navigation_item_description">Настройка навигации</string>
|
||||
<string name="planning_trip_item">Планирование поездки</string>
|
||||
<string name="enter_country_name">Введите название страны</string>
|
||||
<string name="new_version">Новая версия</string>
|
||||
<string name="begin_with_osmand_menu_group">Первые шаги с OsmAnd</string>
|
||||
<string name="features_menu_group">Возможности</string>
|
||||
<string name="help_us_to_improve_menu_group">Помогите улучшить OsmAnd</string>
|
||||
<string name="other_menu_group">Прочее</string>
|
||||
<string name="plugins_menu_group">Плагины</string>
|
||||
</resources>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
@ -609,7 +609,7 @@
|
|||
<string name="use_short_object_names_descr">Dokunarak keşfetme modunda kısa nesne adları kullan</string>
|
||||
<string name="use_short_object_names">Nesne adları kullan</string>
|
||||
<string name="accessibility_preferences_descr">Erişilebilirlik ile ilgili tercihler</string>
|
||||
<string name="accessibility_preferences">Erişilebilirlik</string>
|
||||
<string name="shared_string_accessibility">Erişilebilirlik</string>
|
||||
<string name="rendering_out_of_memory">Seçilen alanı görüntülemek için işlem belleği yeterli değil</string>
|
||||
<string name="use_fluorescent_overlays">Floresan bindirmeleri</string>
|
||||
<string name="use_fluorescent_overlays_descr">Parkur ve güzergah görüntülemek için floresan renkler kullan</string>
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
<string name="use_short_object_names_descr">Використовувати короткі назви для об’єктів при огляді мапи</string>
|
||||
<string name="use_short_object_names">Використовувати короткі назви для об’єктів</string>
|
||||
<string name="accessibility_preferences_descr">Налаштування для невізуального доступу</string>
|
||||
<string name="accessibility_preferences">Спеціальні можливості</string>
|
||||
<string name="shared_string_accessibility">Спеціальні можливості</string>
|
||||
<string name="rendering_out_of_memory">Недостатньо пам’яті для процесу показу мапи для виділеної ділянки</string>
|
||||
<string name="use_fluorescent_overlays">Флуоресцентні кольори</string>
|
||||
<string name="use_fluorescent_overlays_descr">Використовувати флуоресцентні кольори для відображення треків</string>
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
<string name="i_am_here">我在这里</string>
|
||||
<string name="use_short_object_names">使用对象名</string>
|
||||
<string name="accessibility_preferences_descr">无障碍相关的喜好</string>
|
||||
<string name="accessibility_preferences">无障碍</string>
|
||||
<string name="shared_string_accessibility">无障碍</string>
|
||||
<string name="offline_edition">离线编辑</string>
|
||||
<string name="offline_edition_descr">始终使用离线编辑</string>
|
||||
<string name="local_openstreetmap_uploading">正在上传…</string>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2362,7 +2362,7 @@
|
|||
<string name="poi_cross">Cross</string>
|
||||
<string name="poi_summit_cross">Summit cross: yes</string>
|
||||
|
||||
<string name="poi_prison_camp">Prison camp</string>
|
||||
<string name="poi_prison_camp">Former prison camp</string>
|
||||
<string name="poi_concentration_camp">Type: concentration camp</string>
|
||||
<string name="poi_pow_camp">Type: pow camp</string>
|
||||
<string name="poi_labor_camp">Type: labor camp</string>
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
\nBoth the location and time are visible on the OsmAnd dashboard as well as in widget on the map screen. An alarm can be added to the Android calendar as a reminder.</string>
|
||||
<string name="osmand_distance_planning_plugin_name">Distance calculator & planning tool</string>
|
||||
<string name="osmand_distance_planning_plugin_description">This plugin provides a map screen widget allowing to create paths by tapping on the map, or use or modify existing GPX files, to plan a trip and measure the distance between points. The results can be saved as a GPX file, which can later be used for guidance.</string>
|
||||
<string name="accessibility_preferences">Accessibility</string>
|
||||
<string name="shared_string_accessibility">Accessibility</string>
|
||||
<string name="osmand_accessibility_description">This plugin makes the device\'s accessibility features available directly in OsmAnd. It facilitates e.g. adjusting the speech rate for TTS voices, configuring directional-pad screen navigation, using a trackball for zoom control, or using text-to-speech feedback, like for auto announcing your position.</string>
|
||||
<string name="osm_settings">OSM editing</string>
|
||||
<string name="osm_editing_plugin_description">Via this plugin OsmAnd can be used to make OSM contributions like creating or modifying OSM POI objects, opening or commenting OSM bugs, and contributing recorded GPX files. OSM is a community driven, global public domain mapping project. For details please refer to http://openstreetmap.org. Active participation is appreciated, and contributions can be made directly from OsmAnd, if you specify your personal OSM credentials in the app.</string>
|
||||
|
@ -2042,17 +2042,11 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="first_usage_item">First usage</string>
|
||||
<string name="first_usage_item_description">How to download maps, set basic settings</string>
|
||||
<string name="navigation_item_description">Setup navigation</string>
|
||||
<string name="planning_trip_item">Planning a trip</string>
|
||||
<string name="faq_item">FAQ</string>
|
||||
<string name="faq_item_description">How to use plugins</string>
|
||||
<string name="map_viewing_item">Map viewing</string>
|
||||
<string name="search_on_the_map_item">Map searching</string>
|
||||
<string name="planning_trip_item">Planning a trip</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Contour lines and hillshade maps</string>
|
||||
<string name="trip_recording_tool_item">Trip recording tool</string>
|
||||
<string name="osmand_ski_maps_item">OsmAnd Ski maps</string>
|
||||
<string name="nautical_charts_item">Nautical charts</string>
|
||||
<string name="audio_video_note_item">Audio/video notes</string>
|
||||
<string name="osm_editing_item">OSM editing</string>
|
||||
<string name="instalation_troubleshooting_item">Installation and troubleshooting</string>
|
||||
<string name="techical_articles_item">Technical articles</string>
|
||||
<string name="versions_item">Versions</string>
|
||||
|
|
|
@ -1,36 +1,40 @@
|
|||
package net.osmand.access;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import android.app.Activity;
|
||||
|
||||
public class AccessibilityPlugin extends OsmandPlugin {
|
||||
private static final String ID = "osmand.accessibility";
|
||||
private OsmandApplication app;
|
||||
|
||||
|
||||
public AccessibilityPlugin(OsmandApplication app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return app.getString(R.string.osmand_accessibility_description);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return app.getString(R.string.accessibility_preferences);
|
||||
return app.getString(R.string.shared_string_accessibility);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return SettingsAccessibilityActivity.class;
|
||||
|
@ -41,7 +45,7 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
public int getAssetResourceName() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_plugin_accessibility;
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
package net.osmand.access;
|
||||
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.access.AccessibilityMode;
|
||||
import net.osmand.plus.access.RelativeDirectionStyle;
|
||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.PreferenceCategory;
|
||||
import android.preference.PreferenceScreen;
|
||||
|
||||
public class SettingsAccessibilityActivity extends SettingsBaseActivity {
|
||||
|
||||
|
@ -25,7 +26,7 @@ public class SettingsAccessibilityActivity extends SettingsBaseActivity {
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
((OsmandApplication) getApplication()).applyTheme(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
getToolbar().setTitle(R.string.accessibility_preferences);
|
||||
getToolbar().setTitle(R.string.shared_string_accessibility);
|
||||
PreferenceScreen grp = getPreferenceScreen();
|
||||
|
||||
String[] entries = new String[AccessibilityMode.values().length];
|
||||
|
|
|
@ -39,7 +39,8 @@ public class PointDescription {
|
|||
public static final String POINT_TYPE_ALARM = "alarm";
|
||||
public static final String POINT_TYPE_TARGET = "destination";
|
||||
public static final String POINT_TYPE_OSM_BUG = "bug";
|
||||
|
||||
public static final String POINT_TYPE_WORLD_REGION = "world_region";
|
||||
|
||||
|
||||
public static final PointDescription LOCATION_POINT = new PointDescription(POINT_TYPE_LOCATION, "");
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class AppInitializer implements IProgress {
|
|||
private static final String VERSION_INSTALLED = "VERSION_INSTALLED"; //$NON-NLS-1$
|
||||
private static final String EXCEPTION_FILE_SIZE = "EXCEPTION_FS"; //$NON-NLS-1$
|
||||
|
||||
public static final String LATEST_CHANGES_URL = "changes-2.1.html";
|
||||
public static final String LATEST_CHANGES_URL = "http://osmand.net/changes-2.1.html";
|
||||
public static final int APP_EXIT_CODE = 4;
|
||||
public static final String APP_EXIT_KEY = "APP_EXIT_KEY";
|
||||
private OsmandApplication app;
|
||||
|
|
|
@ -92,6 +92,10 @@ public abstract class OsmandPlugin {
|
|||
public void disable(OsmandApplication app) {
|
||||
}
|
||||
|
||||
public String getHelpFileName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void initPlugins(OsmandApplication app) {
|
||||
OsmandSettings settings = app.getSettings();
|
||||
Set<String> enabledPlugins = settings.getEnabledPlugins();
|
||||
|
|
|
@ -66,6 +66,7 @@ import net.osmand.plus.helpers.WakeLockHelper;
|
|||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
|
||||
import net.osmand.plus.mapcontextmenu.editors.PointEditor;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu;
|
||||
import net.osmand.plus.render.RendererRegistry;
|
||||
import net.osmand.plus.resources.ResourceManager;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
|
@ -99,6 +100,7 @@ public class MapActivity extends AccessibleActivity {
|
|||
|
||||
private static MapViewTrackingUtilities mapViewTrackingUtilities;
|
||||
private static MapContextMenu mapContextMenu = new MapContextMenu();
|
||||
private static MapMultiSelectionMenu mapMultiSelectionMenu;
|
||||
|
||||
/**
|
||||
* Called when the activity is first created.
|
||||
|
@ -162,7 +164,14 @@ public class MapActivity extends AccessibleActivity {
|
|||
settings = app.getSettings();
|
||||
app.applyTheme(this);
|
||||
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
if (mapMultiSelectionMenu == null) {
|
||||
mapMultiSelectionMenu = new MapMultiSelectionMenu(this);
|
||||
} else {
|
||||
mapMultiSelectionMenu.setMapActivity(this);
|
||||
}
|
||||
mapContextMenu.setMapActivity(this);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
// Full screen is not used here
|
||||
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
@ -970,6 +979,10 @@ public class MapActivity extends AccessibleActivity {
|
|||
return mapContextMenu;
|
||||
}
|
||||
|
||||
public MapMultiSelectionMenu getMultiSelectionMenu() {
|
||||
return mapMultiSelectionMenu;
|
||||
}
|
||||
|
||||
public FavoritePointEditor getFavoritePointEditor() {
|
||||
if (favoritePointEditor == null) {
|
||||
favoritePointEditor = new FavoritePointEditor(app, this);
|
||||
|
|
|
@ -451,6 +451,10 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.audionotes_plugin_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/audio-video-notes-plugin.html";
|
||||
}
|
||||
@Override
|
||||
public boolean init(final OsmandApplication app, Activity activity) {
|
||||
initializeRemoteControlRegistrationMethods();
|
||||
|
|
|
@ -43,6 +43,11 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.debugging_and_development);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/development_plugin.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
registerWidget(activity);
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package net.osmand.plus.dialogs;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.AppInitializer;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
|
@ -15,7 +19,6 @@ import org.apache.commons.logging.Log;
|
|||
|
||||
public class WhatsNewDialogFragment extends DialogFragment {
|
||||
private static final Log LOG = PlatformUtil.getLog(WhatsNewDialogFragment.class);
|
||||
private static final String FILE_ANDROID_ASSET_HELP = "file:///android_asset/help/";
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
|
@ -27,7 +30,15 @@ public class WhatsNewDialogFragment extends DialogFragment {
|
|||
.setMessage(getString(R.string.last_release))
|
||||
.setNegativeButton(R.string.shared_string_close, null);
|
||||
// TODO: 10/28/15 Implement
|
||||
builder.setPositiveButton("Read more", null);
|
||||
builder.setPositiveButton("Read more", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(AppInitializer.LATEST_CHANGES_URL));
|
||||
startActivity(i);
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
package net.osmand.plus.dialogs.helpscreen;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -18,6 +21,7 @@ import android.widget.TextView;
|
|||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.Version;
|
||||
|
@ -60,7 +64,7 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
MenuCategory.OTHER.initItems(createOtherItems());
|
||||
|
||||
ExpandableListView listView = (ExpandableListView) view.findViewById(android.R.id.list);
|
||||
final HelpAdapter listAdapter = new HelpAdapter(getOsmandApplication());
|
||||
final HelpAdapter listAdapter = new HelpAdapter(getActivity());
|
||||
listView.setAdapter(listAdapter);
|
||||
for (int i = 0; i < listAdapter.getGroupCount(); i++) {
|
||||
listView.expandGroup(i);
|
||||
|
@ -76,8 +80,6 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
@Override
|
||||
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
|
||||
int childPosition, long id) {
|
||||
LOG.debug("Chield=" + categories[groupPosition].getItem(childPosition) + "; clicker="
|
||||
+ categories[groupPosition].getItem(childPosition).getOnClickListener());
|
||||
if (categories[groupPosition] != MenuCategory.HELP_US_TO_IMPROVE &&
|
||||
categories[groupPosition].getItem(childPosition).getOnClickListener() != null) {
|
||||
LOG.debug("nice");
|
||||
|
@ -87,10 +89,12 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
}
|
||||
|
||||
public static class HelpAdapter extends OsmandBaseExpandableListAdapter {
|
||||
private OsmandApplication ctx;
|
||||
private final OsmandApplication ctx;
|
||||
private final Activity activity;
|
||||
|
||||
public HelpAdapter(OsmandApplication ctx) {
|
||||
this.ctx = ctx;
|
||||
public HelpAdapter(Activity activity) {
|
||||
this.ctx = (OsmandApplication) activity.getApplication();
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -110,7 +114,7 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
@Override
|
||||
public View getChildView(final int groupPosition, final int childPosition, boolean isLastChild,
|
||||
View convertView, ViewGroup parent) {
|
||||
if(categories[groupPosition] == MenuCategory.HELP_US_TO_IMPROVE) {
|
||||
if (categories[groupPosition] == MenuCategory.HELP_US_TO_IMPROVE) {
|
||||
convertView = LayoutInflater.from(parent.getContext()).inflate(
|
||||
R.layout.help_to_improve_item, parent, false);
|
||||
TextView pollButton = (TextView) convertView.findViewById(R.id.pollButton);
|
||||
|
@ -121,6 +125,18 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
ctx.getIconsCache().getContentIcon(R.drawable.ic_action_message);
|
||||
contactUsButton.setCompoundDrawablesWithIntrinsicBounds(null, contactUsIcon, null,
|
||||
null);
|
||||
final String email = ctx.getString(R.string.support_email);
|
||||
contactUsButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(Intent.ACTION_SENDTO);
|
||||
intent.setData(Uri.parse("mailto:")); // only email apps should handle this
|
||||
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
|
||||
if (intent.resolveActivity(ctx.getPackageManager()) != null) {
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
} else {
|
||||
final MyMenuItem child = getChild(groupPosition, childPosition);
|
||||
|
@ -260,102 +276,107 @@ public class HelpScreenDialogFragment extends DialogFragment implements Expandab
|
|||
}
|
||||
|
||||
|
||||
private List<MyMenuItem> createBeginWithOsmandItems(){
|
||||
private List<MyMenuItem> createBeginWithOsmandItems() {
|
||||
ArrayList<MyMenuItem> arrayList = new ArrayList<>();
|
||||
ShowArticleOnTouchListener listener = null;
|
||||
MyMenuItem.Builder builder = new MyMenuItem.Builder()
|
||||
.setTitle(R.string.first_usage_item)
|
||||
.setDescription(R.string.first_usage_item_description, getActivity());
|
||||
.setTitle(R.string.first_usage_item, getActivity())
|
||||
.setDescription(R.string.first_usage_item_description, getActivity())
|
||||
.setListener(listener);
|
||||
arrayList.add(builder.create());
|
||||
listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/navigation.html", getActivity());
|
||||
builder = new MyMenuItem.Builder()
|
||||
.setTitle(R.string.shared_string_navigation)
|
||||
.setDescription(R.string.navigation_item_description, getActivity());
|
||||
.setTitle(R.string.shared_string_navigation, getActivity())
|
||||
.setDescription(R.string.navigation_item_description, getActivity())
|
||||
.setListener(listener);
|
||||
arrayList.add(builder.create());
|
||||
listener = new ShowArticleOnTouchListener("feature_articles/faq.html", getActivity());
|
||||
builder = new MyMenuItem.Builder()
|
||||
.setTitle(R.string.faq_item)
|
||||
.setDescription(R.string.faq_item_description, getActivity());
|
||||
.setTitle(R.string.faq_item, getActivity())
|
||||
.setDescription(R.string.faq_item_description, getActivity())
|
||||
.setListener(listener);
|
||||
arrayList.add(builder.create());
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static List<MyMenuItem> createFeaturesItems() {
|
||||
private List<MyMenuItem> createFeaturesItems() {
|
||||
ArrayList<MyMenuItem> arrayList = new ArrayList<>();
|
||||
arrayList.add(new MyMenuItem(R.string.map_viewing_item));
|
||||
arrayList.add(new MyMenuItem(R.string.search_on_the_map_item));
|
||||
arrayList.add(new MyMenuItem(R.string.planning_trip_item));
|
||||
String name = getActivity().getString(R.string.map_viewing_item);
|
||||
ShowArticleOnTouchListener listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/map-viewing.html", getActivity());
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
name = getActivity().getString(R.string.search_on_the_map_item);
|
||||
listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/find-something-on-map.html", getActivity());
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
name = getActivity().getString(R.string.planning_trip_item);
|
||||
listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/trip-planning.html", getActivity());
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private List<MyMenuItem> createPluginsItems() {
|
||||
ArrayList<MyMenuItem> arrayList = new ArrayList<>();
|
||||
MyMenuItem.Builder builder = new MyMenuItem.Builder()
|
||||
.setTitle(R.string.shared_string_online_maps)
|
||||
.setIcon(R.drawable.ic_world_globe_dark)
|
||||
.setListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
HelpArticleDialogFragment.createInstance(
|
||||
"feature_articles/online-maps-plugin.html")
|
||||
.show(getActivity().getSupportFragmentManager(), null);
|
||||
}
|
||||
});
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.contour_lines_and_hillshade_maps_item)
|
||||
.setIcon(R.drawable.ic_plugin_srtm);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.trip_recording_tool_item)
|
||||
.setIcon(R.drawable.ic_action_polygom_dark);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.osmand_ski_maps_item)
|
||||
.setIcon(R.drawable.ic_plugin_skimaps);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.nautical_charts_item)
|
||||
.setIcon(R.drawable.ic_action_sail_boat_dark);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.audio_video_note_item)
|
||||
.setIcon(R.drawable.ic_action_micro_dark);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.osm_editing_item)
|
||||
.setIcon(R.drawable.ic_action_bug_dark);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.osmand_distance_planning_plugin_name)
|
||||
.setIcon(R.drawable.ic_action_ruler);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.poi_filter_parking)
|
||||
.setIcon(R.drawable.ic_action_parking_dark);
|
||||
arrayList.add(builder.create());
|
||||
builder.reset()
|
||||
.setTitle(R.string.debugging_and_development)
|
||||
.setIcon(R.drawable.ic_plugin_developer);
|
||||
arrayList.add(builder.create());
|
||||
MyMenuItem.Builder builder = new MyMenuItem.Builder();
|
||||
for (final OsmandPlugin osmandPlugin : OsmandPlugin.getAvailablePlugins()) {
|
||||
builder.reset();
|
||||
builder.setTitle(osmandPlugin.getName())
|
||||
.setIcon(osmandPlugin.getLogoResourceId());
|
||||
final String helpFileName = osmandPlugin.getHelpFileName();
|
||||
if (helpFileName != null) {
|
||||
builder.setListener(new ShowArticleOnTouchListener(helpFileName, getActivity()));
|
||||
}
|
||||
arrayList.add(builder.create());
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private List<MyMenuItem> createOtherItems() {
|
||||
ArrayList<MyMenuItem> arrayList = new ArrayList<>();
|
||||
arrayList.add(new MyMenuItem(R.string.instalation_troubleshooting_item));
|
||||
arrayList.add(new MyMenuItem(R.string.techical_articles_item));
|
||||
arrayList.add(new MyMenuItem(R.string.versions_item));
|
||||
String name = getActivity().getString(R.string.instalation_troubleshooting_item);
|
||||
ShowArticleOnTouchListener listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/installation-and-troubleshooting.html", getActivity());
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
|
||||
name = getActivity().getString(R.string.techical_articles_item);
|
||||
listener = null;
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
name = getActivity().getString(R.string.versions_item);
|
||||
listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/changes.html", getActivity());
|
||||
arrayList.add(new MyMenuItem(name, listener));
|
||||
|
||||
String releasedate = "";
|
||||
if (!this.getString(R.string.app_edition).equals("")) {
|
||||
releasedate = this.getString(R.string.shared_string_release) + ": \t" + this.getString(R.string.app_edition);
|
||||
}
|
||||
String version = Version.getFullVersion(getOsmandApplication()) + "\n" + releasedate;
|
||||
// + "\n\n" + this.getString(R.string.about_content);
|
||||
|
||||
String version = Version.getFullVersion(getOsmandApplication()) + " " + releasedate;
|
||||
listener = new ShowArticleOnTouchListener(
|
||||
"feature_articles/changes-2.1.html", getActivity());
|
||||
MyMenuItem.Builder builder = new MyMenuItem.Builder()
|
||||
.setTitle(R.string.shared_string_about)
|
||||
.setDescription(version);
|
||||
.setTitle(R.string.shared_string_about, getActivity())
|
||||
.setDescription(version)
|
||||
.setListener(listener);
|
||||
|
||||
arrayList.add(builder.create());
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
private static class ShowArticleOnTouchListener implements View.OnClickListener {
|
||||
private final String filename;
|
||||
private final FragmentActivity ctx;
|
||||
|
||||
private ShowArticleOnTouchListener(String filename, FragmentActivity ctx) {
|
||||
this.filename = filename;
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
HelpArticleDialogFragment.createInstance(filename)
|
||||
.show(ctx.getSupportFragmentManager(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,35 +6,30 @@ import android.support.annotation.StringRes;
|
|||
import android.view.View.OnClickListener;
|
||||
|
||||
public class MyMenuItem {
|
||||
private final int title;
|
||||
private final String title;
|
||||
private final String desription;
|
||||
@DrawableRes
|
||||
private final int icon;
|
||||
private final OnClickListener onClickListener;
|
||||
|
||||
public MyMenuItem(@StringRes int title) {
|
||||
this.title = title;
|
||||
this.onClickListener = null;
|
||||
desription = null;
|
||||
icon = -1;
|
||||
public MyMenuItem(String title) {
|
||||
this(title, null);
|
||||
}
|
||||
|
||||
public MyMenuItem(@StringRes int title, OnClickListener onClickListener) {
|
||||
this.title = title;
|
||||
this.onClickListener = onClickListener;
|
||||
desription = null;
|
||||
icon = -1;
|
||||
public MyMenuItem(@StringRes int title, Context context) {
|
||||
this(context.getString(title));
|
||||
}
|
||||
|
||||
private MyMenuItem(@StringRes int title, @StringRes int desription, @DrawableRes int icon,
|
||||
public MyMenuItem(String title, OnClickListener onClickListener) {
|
||||
this(title, null, -1, onClickListener);
|
||||
}
|
||||
|
||||
private MyMenuItem(String title, @StringRes int desription, @DrawableRes int icon,
|
||||
Context context, OnClickListener onClickListener) {
|
||||
this.title = title;
|
||||
this.onClickListener = onClickListener;
|
||||
this.desription = context.getString(desription);
|
||||
this.icon = icon;
|
||||
this(title, context.getString(desription), icon, onClickListener);
|
||||
}
|
||||
|
||||
private MyMenuItem(@StringRes int title, String desription, @DrawableRes int icon,
|
||||
private MyMenuItem(String title, String desription, @DrawableRes int icon,
|
||||
OnClickListener onClickListener) {
|
||||
this.title = title;
|
||||
this.desription = desription;
|
||||
|
@ -42,7 +37,7 @@ public class MyMenuItem {
|
|||
this.onClickListener = onClickListener;
|
||||
}
|
||||
|
||||
public int getTitle() {
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
@ -59,13 +54,17 @@ public class MyMenuItem {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
@StringRes
|
||||
private int title = -1;
|
||||
private String title = null;
|
||||
private String description = null;
|
||||
private int icon = -1;
|
||||
private OnClickListener listener;
|
||||
|
||||
public Builder setTitle(@StringRes int title) {
|
||||
public Builder setTitle(@StringRes int titleId, Context context) {
|
||||
this.title = context.getString(titleId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
@ -91,7 +90,7 @@ public class MyMenuItem {
|
|||
}
|
||||
|
||||
public Builder reset() {
|
||||
title = -1;
|
||||
title = null;
|
||||
description = null;
|
||||
icon = -1;
|
||||
listener = null;
|
||||
|
|
|
@ -1,14 +1,30 @@
|
|||
package net.osmand.plus.distancecalculator;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Cap;
|
||||
import android.graphics.Paint.Join;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.PointF;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.CallbackWithObject;
|
||||
import net.osmand.IndexConstants;
|
||||
|
@ -38,31 +54,16 @@ import net.osmand.plus.views.OsmandMapLayer;
|
|||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
||||
import net.osmand.util.MapUtils;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Cap;
|
||||
import android.graphics.Paint.Join;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.PointF;
|
||||
import android.os.AsyncTask;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||
private static final String ID = "osmand.distance";
|
||||
|
@ -96,6 +97,11 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.osmand_distance_planning_plugin_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/distance-calculator-and-planning-tool.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLayers(OsmandMapTileView mapView, MapActivity activity) {
|
||||
if(isActive()) {
|
||||
|
|
|
@ -100,11 +100,6 @@ public class DownloadResourceGroup {
|
|||
this.parentGroup = parentGroup;
|
||||
}
|
||||
|
||||
public WorldRegion getIndexItemRegion(IndexItem item) {
|
||||
DownloadResourceGroup group = getIndexItemGroup(item);
|
||||
return getRegion(group);
|
||||
}
|
||||
|
||||
public static WorldRegion getRegion(DownloadResourceGroup group) {
|
||||
if (group != null) {
|
||||
if (group.getRegion() != null) {
|
||||
|
@ -119,26 +114,6 @@ public class DownloadResourceGroup {
|
|||
}
|
||||
}
|
||||
|
||||
public DownloadResourceGroup getIndexItemGroup(IndexItem item) {
|
||||
DownloadResourceGroup res = null;
|
||||
for (DownloadResourceGroup group : getGroups()) {
|
||||
if (group.getIndividualResources() != null) {
|
||||
for (IndexItem i : group.getIndividualResources()) {
|
||||
if (i == item) {
|
||||
res = group;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res = group.getIndexItemGroup(item);
|
||||
if (res != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public void trimEmptyGroups() {
|
||||
if(groups != null) {
|
||||
for(DownloadResourceGroup gr : groups) {
|
||||
|
|
|
@ -19,6 +19,10 @@ public abstract class BaseMenuController {
|
|||
|
||||
public BaseMenuController(MapActivity mapActivity) {
|
||||
this.mapActivity = mapActivity;
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
portraitMode = AndroidUiHelper.isOrientationPortrait(mapActivity);
|
||||
largeDevice = AndroidUiHelper.isXLargeDevice(mapActivity);
|
||||
light = mapActivity.getMyApplication().getSettings().isLightContent();
|
||||
|
@ -28,6 +32,11 @@ public abstract class BaseMenuController {
|
|||
return mapActivity;
|
||||
}
|
||||
|
||||
public void setMapActivity(MapActivity mapActivity) {
|
||||
this.mapActivity = mapActivity;
|
||||
init();
|
||||
}
|
||||
|
||||
public boolean isLight() {
|
||||
return light;
|
||||
}
|
||||
|
|
|
@ -104,9 +104,6 @@ public class MapContextMenu extends MenuTitleController {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.object != null) {
|
||||
clearSelectedObject(this.object);
|
||||
}
|
||||
setSelectedObject(object);
|
||||
|
||||
if (pointDescription == null) {
|
||||
|
@ -166,6 +163,9 @@ public class MapContextMenu extends MenuTitleController {
|
|||
|
||||
public void close() {
|
||||
active = false;
|
||||
if (this.object != null) {
|
||||
clearSelectedObject(this.object);
|
||||
}
|
||||
hide();
|
||||
mapActivity.getMapView().refreshMap();
|
||||
}
|
||||
|
@ -365,4 +365,12 @@ public class MapContextMenu extends MenuTitleController {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean fabVisible() {
|
||||
return menuController == null || menuController.fabVisible();
|
||||
}
|
||||
|
||||
public boolean buttonsVisible() {
|
||||
return menuController == null || menuController.buttonsVisible();
|
||||
}
|
||||
}
|
|
@ -345,12 +345,23 @@ public class MapContextMenuFragment extends Fragment {
|
|||
|
||||
// FAB
|
||||
fabView = (ImageView)view.findViewById(R.id.context_menu_fab_view);
|
||||
fabView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
menu.fabPressed();
|
||||
}
|
||||
});
|
||||
if (menu.fabVisible()) {
|
||||
fabView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
menu.fabPressed();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fabView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!menu.buttonsVisible()) {
|
||||
View buttonsTopBorder = view.findViewById(R.id.buttons_top_border);
|
||||
View buttons = view.findViewById(R.id.context_menu_buttons);
|
||||
buttonsTopBorder.setVisibility(View.GONE);
|
||||
buttons.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Action buttons
|
||||
final ImageButton buttonFavorite = (ImageButton) view.findViewById(R.id.context_menu_fav_button);
|
||||
|
|
|
@ -3,10 +3,12 @@ package net.osmand.plus.mapcontextmenu;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.map.WorldRegion;
|
||||
import net.osmand.plus.GPXUtilities.WptPt;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -24,6 +26,7 @@ import net.osmand.plus.mapcontextmenu.controllers.OsMoMenuController;
|
|||
import net.osmand.plus.mapcontextmenu.controllers.ParkingPositionMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.PointDescriptionMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.TargetPointMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MapDataMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.WptPtMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.other.ShareMenu;
|
||||
import net.osmand.plus.osmedit.OsmPoint;
|
||||
|
@ -109,6 +112,8 @@ public abstract class MenuController extends BaseMenuController {
|
|||
menuController = new EditPOIMenuController(app, mapActivity, pointDescription, (OsmPoint) object);
|
||||
} else if (object instanceof WptPt) {
|
||||
menuController = new WptPtMenuController(app, mapActivity, (WptPt) object);
|
||||
} else if (object instanceof BinaryMapDataObject) {
|
||||
menuController = new MapDataMenuController(app, mapActivity, (BinaryMapDataObject) object);
|
||||
} else if (object instanceof LatLon) {
|
||||
if (pointDescription.isParking()) {
|
||||
menuController = new ParkingPositionMenuController(app, mapActivity, pointDescription);
|
||||
|
@ -204,7 +209,11 @@ public abstract class MenuController extends BaseMenuController {
|
|||
return titleButtonController;
|
||||
}
|
||||
|
||||
public boolean shouldShowButtons() {
|
||||
public boolean fabVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean buttonsVisible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ public class AudioVideoNoteMenuController extends MenuController {
|
|||
private Recording recording;
|
||||
|
||||
private DateFormat dateFormat;
|
||||
private DateFormat timeFormat;
|
||||
private AudioVideoNotesPlugin plugin;
|
||||
|
||||
public AudioVideoNoteMenuController(OsmandApplication app, MapActivity mapActivity, final Recording recording) {
|
||||
|
@ -30,6 +31,7 @@ public class AudioVideoNoteMenuController extends MenuController {
|
|||
this.recording = recording;
|
||||
plugin = OsmandPlugin.getPlugin(AudioVideoNotesPlugin.class);
|
||||
dateFormat = android.text.format.DateFormat.getMediumDateFormat(mapActivity);
|
||||
timeFormat = android.text.format.DateFormat.getTimeFormat(mapActivity);
|
||||
|
||||
if (!recording.isPhoto()) {
|
||||
titleButtonController = new TitleButtonController() {
|
||||
|
@ -71,7 +73,7 @@ public class AudioVideoNoteMenuController extends MenuController {
|
|||
String recName = recording.getName(getMapActivity());
|
||||
if (file != null && recType.equals(recName)) {
|
||||
Date date = new Date(recording.getFile().lastModified());
|
||||
return dateFormat.format(date);
|
||||
return dateFormat.format(date) + " " + timeFormat.format(date);
|
||||
} else {
|
||||
return recording.getName(getMapActivity());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,101 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.map.OsmandRegions;
|
||||
import net.osmand.map.WorldRegion;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.download.DownloadActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
|
||||
public class MapDataMenuController extends MenuController {
|
||||
private WorldRegion region;
|
||||
private String regionName;
|
||||
|
||||
public MapDataMenuController(OsmandApplication app, MapActivity mapActivity, final BinaryMapDataObject dataObject) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
OsmandRegions osmandRegions = app.getRegions();
|
||||
String fullName = osmandRegions.getFullName(dataObject);
|
||||
final WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||
this.region = region;
|
||||
if (region != null) {
|
||||
regionName = region.getLocaleName();
|
||||
} else {
|
||||
regionName = dataObject.getName();
|
||||
}
|
||||
titleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
getMapActivity().getContextMenu().close();
|
||||
|
||||
final Intent intent = new Intent(getMapActivity(), getMapActivity().getMyApplication()
|
||||
.getAppCustomization().getDownloadIndexActivity());
|
||||
intent.putExtra(DownloadActivity.FILTER_KEY, regionName);
|
||||
intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.DOWNLOAD_TAB);
|
||||
getMapActivity().startActivity(intent);
|
||||
}
|
||||
};
|
||||
titleButtonController.caption = getMapActivity().getString(R.string.shared_string_download_map);
|
||||
titleButtonController.leftIconId = R.drawable.ic_action_import;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSupportedMenuStatesPortrait() {
|
||||
return MenuState.HEADER_ONLY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needTypeStr() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return getIcon(R.drawable.ic_map, R.color.osmand_orange_dark, R.color.osmand_orange);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return regionName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
String res;
|
||||
if (region != null && region.getSuperregion() != null) {
|
||||
res = region.getSuperregion().getLocaleName();
|
||||
} else {
|
||||
res = getMapActivity().getString(R.string.shared_string_map);
|
||||
}
|
||||
if (getMenuType() == MenuType.STANDARD) {
|
||||
res += "\n";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needStreetName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, LatLon latLon) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean fabVisible() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean buttonsVisible() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package net.osmand.plus.mapcontextmenu.editors.dialogs;
|
||||
package net.osmand.plus.mapcontextmenu.editors;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -6,7 +6,6 @@ import android.content.DialogInterface;
|
|||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.Button;
|
||||
|
@ -19,8 +18,6 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.helpers.ColorDialogs;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenuFragment;
|
||||
import net.osmand.plus.mapcontextmenu.editors.PointEditor;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
|
@ -33,7 +33,6 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenuFragment;
|
||||
import net.osmand.plus.mapcontextmenu.editors.dialogs.SelectCategoryDialogFragment;
|
||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.widgets.AutoCompleteTextViewEx;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package net.osmand.plus.mapcontextmenu.editors.dialogs;
|
||||
package net.osmand.plus.mapcontextmenu.editors;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
|
@ -19,8 +19,6 @@ import net.osmand.plus.IconsCache;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.editors.PointEditor;
|
||||
import net.osmand.plus.mapcontextmenu.editors.PointEditorFragment;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package net.osmand.plus.mapcontextmenu.other;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -12,32 +11,30 @@ import net.osmand.plus.mapcontextmenu.MenuController.MenuType;
|
|||
import net.osmand.plus.mapcontextmenu.MenuTitleController;
|
||||
import net.osmand.plus.views.ContextMenuLayer;
|
||||
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class ObjectSelectionMenu extends BaseMenuController {
|
||||
|
||||
private static final String KEY_OBJ_SEL_MENU_LATLON = "key_obj_sel_menu_latlon";
|
||||
private static final String KEY_OBJ_SEL_MENU_OBJECTS = "key_obj_sel_menu_objects";
|
||||
public class MapMultiSelectionMenu extends BaseMenuController {
|
||||
|
||||
private LatLon latLon;
|
||||
private LinkedList<MenuObject> objects = new LinkedList<>();
|
||||
private Map<Object, IContextMenuProvider> selectedObjects = new HashMap<>();
|
||||
|
||||
public static class MenuObject extends MenuTitleController implements Serializable {
|
||||
public static class MenuObject extends MenuTitleController {
|
||||
|
||||
private LatLon latLon;
|
||||
private PointDescription pointDescription;
|
||||
private Object object;
|
||||
|
||||
private transient MapActivity mapActivity;
|
||||
private transient MenuController controller;
|
||||
private MapActivity mapActivity;
|
||||
private MenuController controller;
|
||||
|
||||
public MenuObject(LatLon latLon, PointDescription pointDescription, Object object, MapActivity mapActivity) {
|
||||
this.latLon = latLon;
|
||||
|
@ -87,9 +84,16 @@ public class ObjectSelectionMenu extends BaseMenuController {
|
|||
}
|
||||
}
|
||||
|
||||
private ObjectSelectionMenu(LatLon latLon, MapActivity mapActivity) {
|
||||
public MapMultiSelectionMenu(MapActivity mapActivity) {
|
||||
super(mapActivity);
|
||||
this.latLon = latLon;
|
||||
}
|
||||
|
||||
public void setMapActivity(MapActivity mapActivity) {
|
||||
super.setMapActivity(mapActivity);
|
||||
for (MenuObject o : objects) {
|
||||
o.mapActivity = mapActivity;
|
||||
o.init();
|
||||
}
|
||||
}
|
||||
|
||||
public List<MenuObject> getObjects() {
|
||||
|
@ -102,12 +106,17 @@ public class ObjectSelectionMenu extends BaseMenuController {
|
|||
}
|
||||
|
||||
private void createCollection(Map<Object, IContextMenuProvider> selectedObjects) {
|
||||
this.selectedObjects.clear();
|
||||
this.selectedObjects.putAll(selectedObjects);
|
||||
objects.clear();
|
||||
int order = Integer.MAX_VALUE;
|
||||
MenuObject topObject = null;
|
||||
for (Map.Entry<Object, IContextMenuProvider> e : selectedObjects.entrySet()) {
|
||||
Object selectedObj = e.getKey();
|
||||
IContextMenuProvider contextObject = selectedObjects.get(selectedObj);
|
||||
LatLon ll = null;
|
||||
PointDescription pointDescription = null;
|
||||
|
||||
if (contextObject != null) {
|
||||
ll = contextObject.getObjectLocation(selectedObj);
|
||||
pointDescription = contextObject.getObjectName(selectedObj);
|
||||
|
@ -121,40 +130,65 @@ public class ObjectSelectionMenu extends BaseMenuController {
|
|||
|
||||
MenuObject menuObject = new MenuObject(ll, pointDescription, selectedObj, getMapActivity());
|
||||
objects.add(menuObject);
|
||||
|
||||
if (contextObject instanceof ContextMenuLayer.IContextMenuProviderSelection) {
|
||||
int i = ((ContextMenuLayer.IContextMenuProviderSelection) contextObject).getOrder(selectedObj);
|
||||
if (i < order) {
|
||||
topObject = menuObject;
|
||||
order = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(objects, new Comparator<MenuObject>() {
|
||||
@Override
|
||||
public int compare(MenuObject obj1, MenuObject obj2) {
|
||||
return obj1.getTitleStr().compareToIgnoreCase(obj2.getTitleStr());
|
||||
}
|
||||
});
|
||||
|
||||
if (topObject != null) {
|
||||
objects.remove(topObject);
|
||||
objects.add(0, topObject);
|
||||
}
|
||||
}
|
||||
|
||||
public static void show(LatLon latLon, Map<Object, IContextMenuProvider> selectedObjects, MapActivity mapActivity) {
|
||||
private void clearMenu() {
|
||||
clearSelectedObjects();
|
||||
objects.clear();
|
||||
}
|
||||
|
||||
if (isVisible(mapActivity)) {
|
||||
hide(mapActivity);
|
||||
public void show(LatLon latLon, Map<Object, IContextMenuProvider> selectedObjects) {
|
||||
if (isVisible()) {
|
||||
hide();
|
||||
}
|
||||
|
||||
ObjectSelectionMenu menu = new ObjectSelectionMenu(latLon, mapActivity);
|
||||
menu.createCollection(selectedObjects);
|
||||
ObjectSelectionMenuFragment.showInstance(menu);
|
||||
for (Map.Entry<Object, IContextMenuProvider> e : selectedObjects.entrySet()) {
|
||||
if (e.getValue() instanceof ContextMenuLayer.IContextMenuProviderSelection) {
|
||||
((ContextMenuLayer.IContextMenuProviderSelection) e.getValue()).setSelectedObject(e.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
this.latLon = latLon;
|
||||
createCollection(selectedObjects);
|
||||
MapMultiSelectionMenuFragment.showInstance(getMapActivity());
|
||||
}
|
||||
|
||||
public static boolean isVisible(MapActivity mapActivity) {
|
||||
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(ObjectSelectionMenuFragment.TAG);
|
||||
public boolean isVisible() {
|
||||
Fragment fragment = getMapActivity().getSupportFragmentManager().findFragmentByTag(MapMultiSelectionMenuFragment.TAG);
|
||||
return fragment != null;
|
||||
}
|
||||
|
||||
public static void hide(MapActivity mapActivity) {
|
||||
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(ObjectSelectionMenuFragment.TAG);
|
||||
public void hide() {
|
||||
clearMenu();
|
||||
Fragment fragment = getMapActivity().getSupportFragmentManager().findFragmentByTag(MapMultiSelectionMenuFragment.TAG);
|
||||
if (fragment != null) {
|
||||
ObjectSelectionMenuFragment menuFragment = (ObjectSelectionMenuFragment) fragment;
|
||||
MapMultiSelectionMenuFragment menuFragment = (MapMultiSelectionMenuFragment) fragment;
|
||||
menuFragment.dismissMenu();
|
||||
}
|
||||
}
|
||||
|
||||
public void onDismiss() {
|
||||
public void onStop() {
|
||||
clearSelectedObjects();
|
||||
}
|
||||
|
||||
|
@ -162,7 +196,7 @@ public class ObjectSelectionMenu extends BaseMenuController {
|
|||
if (selectedObjects.containsKey(menuObject.getObject())) {
|
||||
selectedObjects.remove(menuObject.getObject());
|
||||
}
|
||||
hide(getMapActivity());
|
||||
hide();
|
||||
getMapActivity().getContextMenu()
|
||||
.show(menuObject.getLatLon(), menuObject.getPointDescription(), menuObject.getObject());
|
||||
}
|
||||
|
@ -173,32 +207,6 @@ public class ObjectSelectionMenu extends BaseMenuController {
|
|||
((ContextMenuLayer.IContextMenuProviderSelection) p).clearSelectedObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void saveMenu(Bundle bundle) {
|
||||
bundle.putSerializable(KEY_OBJ_SEL_MENU_LATLON, latLon);
|
||||
bundle.putSerializable(KEY_OBJ_SEL_MENU_OBJECTS, objects);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ObjectSelectionMenu restoreMenu(Bundle bundle, MapActivity mapActivity) {
|
||||
|
||||
LatLon latLon = null;
|
||||
Object latLonObj = bundle.getSerializable(KEY_OBJ_SEL_MENU_LATLON);
|
||||
if (latLonObj != null) {
|
||||
latLon = (LatLon) latLonObj;
|
||||
}
|
||||
Object objects = bundle.getSerializable(KEY_OBJ_SEL_MENU_OBJECTS);
|
||||
|
||||
ObjectSelectionMenu menu = new ObjectSelectionMenu(latLon, mapActivity);
|
||||
if (objects != null) {
|
||||
menu.objects = (LinkedList<MenuObject>) objects;
|
||||
for (MenuObject menuObject : menu.objects) {
|
||||
menuObject.mapActivity = mapActivity;
|
||||
menuObject.init();
|
||||
}
|
||||
}
|
||||
|
||||
return menu;
|
||||
selectedObjects.clear();
|
||||
}
|
||||
}
|
|
@ -22,34 +22,27 @@ import android.widget.TextView;
|
|||
import net.osmand.plus.IconsCache;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.other.ObjectSelectionMenu.MenuObject;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu.MenuObject;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
||||
|
||||
public class ObjectSelectionMenuFragment extends Fragment implements AdapterView.OnItemClickListener {
|
||||
public static final String TAG = "ObjectSelectionMenuFragment";
|
||||
public class MapMultiSelectionMenuFragment extends Fragment implements AdapterView.OnItemClickListener {
|
||||
public static final String TAG = "MapMultiSelectionMenuFragment";
|
||||
|
||||
private View view;
|
||||
private ArrayAdapter<MenuObject> listAdapter;
|
||||
private ObjectSelectionMenu menu;
|
||||
|
||||
public ObjectSelectionMenu getMenu() {
|
||||
return menu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (savedInstanceState != null && getActivity() instanceof MapActivity) {
|
||||
menu = ObjectSelectionMenu.restoreMenu(savedInstanceState, (MapActivity) getActivity());
|
||||
}
|
||||
}
|
||||
private MapMultiSelectionMenu menu;
|
||||
private boolean dismissing = false;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
menu = ((MapActivity) getActivity()).getMultiSelectionMenu();
|
||||
|
||||
view = inflater.inflate(R.layout.menu_obj_selection_fragment, container, false);
|
||||
|
||||
ListView listView = (ListView) view.findViewById(R.id.list);
|
||||
|
@ -72,21 +65,19 @@ public class ObjectSelectionMenuFragment extends Fragment implements AdapterView
|
|||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
menu.onDismiss();
|
||||
if (!dismissing) {
|
||||
menu.onStop();
|
||||
}
|
||||
menu.getMapActivity().getContextMenu().setBaseFragmentVisibility(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
menu.saveMenu(outState);
|
||||
}
|
||||
public static void showInstance(final MapActivity mapActivity) {
|
||||
MapMultiSelectionMenu menu = mapActivity.getMultiSelectionMenu();
|
||||
|
||||
public static void showInstance(ObjectSelectionMenu menu) {
|
||||
int slideInAnim = menu.getSlideInAnimation();
|
||||
int slideOutAnim = menu.getSlideOutAnimation();
|
||||
|
||||
ObjectSelectionMenuFragment fragment = new ObjectSelectionMenuFragment();
|
||||
fragment.menu = menu;
|
||||
MapMultiSelectionMenuFragment fragment = new MapMultiSelectionMenuFragment();
|
||||
menu.getMapActivity().getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim)
|
||||
.add(R.id.fragmentContainer, fragment, TAG)
|
||||
|
@ -122,7 +113,7 @@ public class ObjectSelectionMenuFragment extends Fragment implements AdapterView
|
|||
}
|
||||
|
||||
private ArrayAdapter<MenuObject> createAdapter() {
|
||||
final List<MenuObject> items = menu.getObjects();
|
||||
final List<MenuObject> items = new LinkedList<>(menu.getObjects());
|
||||
return new ArrayAdapter<MenuObject>(menu.getMapActivity(), R.layout.menu_obj_list_item, items) {
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
|
@ -175,6 +166,7 @@ public class ObjectSelectionMenuFragment extends Fragment implements AdapterView
|
|||
}
|
||||
|
||||
public void dismissMenu() {
|
||||
dismissing = true;
|
||||
if (menu.getMapActivity().getContextMenu().isVisible()) {
|
||||
menu.getMapActivity().getContextMenu().hide();
|
||||
} else {
|
|
@ -1,29 +1,5 @@
|
|||
package net.osmand.plus.monitoring;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.ValueHolder;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
import net.osmand.plus.NavigationService;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||
import net.osmand.plus.dashboard.tools.DashFragmentData;
|
||||
import net.osmand.plus.views.MapInfoLayer;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
|
@ -43,6 +19,30 @@ import android.widget.SeekBar;
|
|||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.ValueHolder;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
import net.osmand.plus.NavigationService;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.dashboard.tools.DashFragmentData;
|
||||
import net.osmand.plus.views.MapInfoLayer;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import gnu.trove.list.array.TIntArrayList;
|
||||
|
||||
public class OsmandMonitoringPlugin extends OsmandPlugin {
|
||||
private static final String ID = "osmand.monitoring";
|
||||
public final static String OSMAND_SAVE_SERVICE_ACTION = "OSMAND_SAVE_SERVICE_ACTION";
|
||||
|
@ -90,6 +90,12 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.record_plugin_name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/trip-recording-plugin.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
registerWidget(activity);
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
package net.osmand.plus.openseamapsplugin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.download.DownloadActivity;
|
||||
import net.osmand.plus.render.RendererRegistry;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
|
||||
public class NauticalMapsPlugin extends OsmandPlugin {
|
||||
|
||||
|
@ -45,6 +46,11 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
|||
return app.getString(net.osmand.plus.R.string.plugin_nautical_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/nautical-charts.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean init(final OsmandApplication app, final Activity activity) {
|
||||
if(activity != null) {
|
||||
|
|
|
@ -331,6 +331,12 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
return R.drawable.osm_editing;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/osm-editing-plugin.html";
|
||||
}
|
||||
|
||||
public static String getEditName(OsmPoint point) {
|
||||
String prefix = getPrefix(point);
|
||||
if (point.getGroup() == OsmPoint.Group.POI) {
|
||||
|
|
|
@ -122,6 +122,11 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
|||
return R.drawable.ic_osmo_dark;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/osmo-plugin.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
|
||||
|
|
|
@ -400,6 +400,11 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
|
|||
}, 350);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder(Object o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedObject(Object o) {
|
||||
if(o instanceof OsMoDevice) {
|
||||
|
|
|
@ -162,6 +162,12 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.osmand_parking_plugin_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/parking-plugin.html";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
// remove old if existing after turn
|
||||
|
|
|
@ -77,6 +77,12 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
public String getName() {
|
||||
return app.getString(R.string.shared_string_online_maps);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/online-maps-plugin.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
createLayers();
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package net.osmand.plus.skimapsplugin;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.render.RendererRegistry;
|
||||
import android.app.Activity;
|
||||
|
||||
public class SkiMapsPlugin extends OsmandPlugin {
|
||||
|
||||
|
@ -36,7 +37,13 @@ public class SkiMapsPlugin extends OsmandPlugin {
|
|||
public int getAssetResourceName() {
|
||||
return R.drawable.ski_map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/ski-plugin.html";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean init(final OsmandApplication app, final Activity activity) {
|
||||
if(activity != null) {
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.srtmplugin;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
|
@ -53,6 +54,10 @@ public class SRTMPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.srtm_plugin_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpFileName() {
|
||||
return "feature_articles/contour-lines-plugin.html";
|
||||
}
|
||||
@Override
|
||||
public boolean init(final OsmandApplication app, Activity activity) {
|
||||
OsmandSettings settings = app.getSettings();
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.osmand.data.RotatedTileBox;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MapContextMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.ObjectSelectionMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -39,6 +39,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
|
||||
public interface IContextMenuProviderSelection {
|
||||
|
||||
int getOrder(Object o);
|
||||
void setSelectedObject(Object o);
|
||||
void clearSelectedObject();
|
||||
}
|
||||
|
@ -47,6 +48,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
|
||||
private final MapActivity activity;
|
||||
private MapContextMenu menu;
|
||||
private MapMultiSelectionMenu multiSelectionMenu;
|
||||
private CallbackWithObject<LatLon> selectOnMap = null;
|
||||
|
||||
private ImageView contextMarker;
|
||||
|
@ -56,6 +58,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
public ContextMenuLayer(MapActivity activity){
|
||||
this.activity = activity;
|
||||
menu = activity.getContextMenu();
|
||||
multiSelectionMenu = activity.getMultiSelectionMenu();
|
||||
movementListener = new GestureDetector(activity, new MenuLayerOnGestureListener());
|
||||
}
|
||||
|
||||
|
@ -189,9 +192,9 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
l.collectObjectsFromPoint(point, tileBox, s);
|
||||
for (Object o : s) {
|
||||
selectedObjects.put(o, l);
|
||||
if (l instanceof IContextMenuProviderSelection) {
|
||||
((IContextMenuProviderSelection) l).setSelectedObject(o);
|
||||
}
|
||||
// if (l instanceof IContextMenuProviderSelection) {
|
||||
// ((IContextMenuProviderSelection) l).setSelectedObject(o);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,13 +249,13 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
private void hideVisibleMenues() {
|
||||
if (ObjectSelectionMenu.isVisible(activity)) {
|
||||
ObjectSelectionMenu.hide(activity);
|
||||
if (multiSelectionMenu.isVisible()) {
|
||||
multiSelectionMenu.hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void showContextMenuForSelectedObjects(final LatLon latLon, final Map<Object, IContextMenuProvider> selectedObjects) {
|
||||
ObjectSelectionMenu.show(latLon, selectedObjects, activity);
|
||||
multiSelectionMenu.show(latLon, selectedObjects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -262,8 +265,8 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
if (menu.isVisible()) {
|
||||
menu.hide();
|
||||
}
|
||||
if (ObjectSelectionMenu.isVisible(activity)) {
|
||||
ObjectSelectionMenu.hide(activity);
|
||||
if (multiSelectionMenu.isVisible()) {
|
||||
multiSelectionMenu.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,5 @@
|
|||
package net.osmand.plus.views;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.map.OsmandRegions;
|
||||
import net.osmand.map.WorldRegion;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.resources.ResourceManager;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
@ -30,13 +13,37 @@ import android.text.TextPaint;
|
|||
import android.util.DisplayMetrics;
|
||||
import android.view.WindowManager;
|
||||
|
||||
public class DownloadedRegionsLayer extends OsmandMapLayer {
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.map.OsmandRegions;
|
||||
import net.osmand.map.WorldRegion;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.resources.ResourceManager;
|
||||
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
|
||||
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProviderSelection;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMenuProvider, IContextMenuProviderSelection {
|
||||
|
||||
private static final int ZOOM_THRESHOLD = 2;
|
||||
|
||||
private OsmandMapTileView view;
|
||||
private Paint paint;
|
||||
private Paint paintSelected;
|
||||
private Path path;
|
||||
private Path pathSelected;
|
||||
private OsmandRegions osmandRegions;
|
||||
|
||||
|
||||
|
@ -44,7 +51,8 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
private ResourceManager rm;
|
||||
|
||||
private MapLayerData<List<BinaryMapDataObject>> data;
|
||||
|
||||
private List<BinaryMapDataObject> selectedObjects;
|
||||
|
||||
private static int ZOOM_TO_SHOW_MAP_NAMES = 6;
|
||||
private static int ZOOM_AFTER_BASEMAP = 12;
|
||||
|
||||
|
@ -62,6 +70,14 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
paint.setStrokeCap(Cap.ROUND);
|
||||
paint.setStrokeJoin(Join.ROUND);
|
||||
|
||||
paintSelected = new Paint();
|
||||
paintSelected.setStyle(Style.FILL_AND_STROKE);
|
||||
paintSelected.setStrokeWidth(1);
|
||||
paintSelected.setColor(Color.argb(100, 255, 143, 0));
|
||||
paintSelected.setAntiAlias(true);
|
||||
paintSelected.setStrokeCap(Cap.ROUND);
|
||||
paintSelected.setStrokeJoin(Join.ROUND);
|
||||
|
||||
textPaint = new TextPaint();
|
||||
final WindowManager wmgr = (WindowManager) view.getApplication().getSystemService(Context.WINDOW_SERVICE);
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
|
@ -71,6 +87,7 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
textPaint.setTextAlign(Paint.Align.CENTER);
|
||||
|
||||
path = new Path();
|
||||
pathSelected = new Path();
|
||||
data = new MapLayerData<List<BinaryMapDataObject>>() {
|
||||
|
||||
@Override
|
||||
|
@ -106,11 +123,13 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
}
|
||||
private static int ZOOM_TO_SHOW_BORDERS_ST = 5;
|
||||
private static int ZOOM_TO_SHOW_BORDERS = 7;
|
||||
|
||||
private static int ZOOM_TO_SHOW_SELECTION_ST = 3;
|
||||
private static int ZOOM_TO_SHOW_SELECTION = 10;
|
||||
|
||||
@Override
|
||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
final int zoom = tileBox.getZoom();
|
||||
if(zoom < ZOOM_TO_SHOW_BORDERS_ST) {
|
||||
if(zoom < ZOOM_TO_SHOW_SELECTION_ST) {
|
||||
return;
|
||||
}
|
||||
// draw objects
|
||||
|
@ -135,6 +154,23 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
}
|
||||
canvas.drawPath(path, paint);
|
||||
}
|
||||
|
||||
final List<BinaryMapDataObject> selectedObjects = this.selectedObjects;
|
||||
if (zoom >= ZOOM_TO_SHOW_SELECTION_ST && zoom < ZOOM_TO_SHOW_SELECTION && osmandRegions.isInitialized() &&
|
||||
selectedObjects != null) {
|
||||
pathSelected.reset();
|
||||
for (BinaryMapDataObject o : selectedObjects) {
|
||||
double lat = MapUtils.get31LatitudeY(o.getPoint31YTile(0));
|
||||
double lon = MapUtils.get31LongitudeX(o.getPoint31XTile(0));
|
||||
pathSelected.moveTo(tileBox.getPixXFromLonNoRot(lon), tileBox.getPixYFromLatNoRot(lat));
|
||||
for (int j = 1; j < o.getPointsLength(); j++) {
|
||||
lat = MapUtils.get31LatitudeY(o.getPoint31YTile(j));
|
||||
lon = MapUtils.get31LongitudeX(o.getPoint31XTile(j));
|
||||
pathSelected.lineTo(tileBox.getPixXFromLonNoRot(lon), tileBox.getPixYFromLatNoRot(lat));
|
||||
}
|
||||
}
|
||||
canvas.drawPath(pathSelected, paintSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -278,10 +314,6 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
return filter.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean drawInScreenPixels() {
|
||||
return false;
|
||||
|
@ -299,4 +331,106 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
|
|||
}
|
||||
|
||||
|
||||
// IContextMenuProvider
|
||||
@Override
|
||||
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> objects) {
|
||||
getWorldRegionFromPoint(tileBox, point, objects);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LatLon getObjectLocation(Object o) {
|
||||
if (o instanceof BinaryMapDataObject) {
|
||||
String fullName = osmandRegions.getFullName((BinaryMapDataObject) o);
|
||||
final WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||
if (region != null) {
|
||||
return region.getRegionCenter();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getObjectDescription(Object o) {
|
||||
return view.getContext().getString(R.string.shared_string_map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
return new PointDescription(PointDescription.POINT_TYPE_WORLD_REGION,
|
||||
view.getContext().getString(R.string.shared_string_map), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableSingleTap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableLongPressOnMap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void getWorldRegionFromPoint(RotatedTileBox tb, PointF point, List<? super BinaryMapDataObject> dataObjects) {
|
||||
int zoom = tb.getZoom();
|
||||
if (zoom >= ZOOM_TO_SHOW_SELECTION_ST && zoom < ZOOM_TO_SHOW_SELECTION && osmandRegions.isInitialized()) {
|
||||
LatLon pointLatLon = tb.getLatLonFromPixel(point.x, point.y);
|
||||
int point31x = MapUtils.get31TileNumberX(pointLatLon.getLongitude());
|
||||
int point31y = MapUtils.get31TileNumberY(pointLatLon.getLatitude());
|
||||
|
||||
int left = MapUtils.get31TileNumberX(tb.getLeftTopLatLon().getLongitude());
|
||||
int right = MapUtils.get31TileNumberX(tb.getRightBottomLatLon().getLongitude());
|
||||
int top = MapUtils.get31TileNumberY(tb.getLeftTopLatLon().getLatitude());
|
||||
int bottom = MapUtils.get31TileNumberY(tb.getRightBottomLatLon().getLatitude());
|
||||
|
||||
List<BinaryMapDataObject> result;
|
||||
try {
|
||||
result = osmandRegions.queryBbox(left, right, top, bottom);
|
||||
} catch (IOException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
Iterator<BinaryMapDataObject> it = result.iterator();
|
||||
while (it.hasNext()) {
|
||||
BinaryMapDataObject o = it.next();
|
||||
if (!osmandRegions.isDownloadOfType(o, OsmandRegions.MAP_TYPE) || !osmandRegions.contain(o, point31x, point31y)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
selectedObjects = result;
|
||||
|
||||
for (BinaryMapDataObject o : result) {
|
||||
dataObjects.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder(Object o) {
|
||||
if (o instanceof BinaryMapDataObject) {
|
||||
String fullName = osmandRegions.getFullName((BinaryMapDataObject) o);
|
||||
final WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||
if (region != null) {
|
||||
return region.getLevel();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedObject(Object o) {
|
||||
if (o instanceof BinaryMapDataObject) {
|
||||
List<BinaryMapDataObject> list = new LinkedList<>();
|
||||
if (selectedObjects != null) {
|
||||
list.addAll(selectedObjects);
|
||||
}
|
||||
list.add((BinaryMapDataObject) o);
|
||||
selectedObjects = list;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearSelectedObject() {
|
||||
selectedObjects = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,9 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
|
||||
@Override
|
||||
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) {
|
||||
getFavoriteFromPoint(tileBox, point, res);
|
||||
if (this.settings.SHOW_FAVORITES.get()) {
|
||||
getFavoriteFromPoint(tileBox, point, res);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue