Merge pull request #9817 from osmandapp/master

update test branch
This commit is contained in:
Hardy 2020-09-15 21:05:15 +02:00 committed by GitHub
commit 2aed1d320c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 618 additions and 396 deletions

View file

@ -1,8 +1,8 @@
---
name: "📚 Outdated FAQ"
about: Report an issue in FAQ
---
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
Please do not file FAQ issues on the GitHub issues tracker.

View file

@ -2,6 +2,7 @@
name: "\U0001F41E Bug report"
about: Report a bug in OsmAnd
---
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅
Oh hi there! 😄
@ -28,29 +29,29 @@ Please give us the following information so that we can try to **reproduce** you
<!-- Did this behavior use to work in the previous version? -->
<!-- ✍️--> Yes, the previous version in which this bug was not present was: ....
### Description
<!-- ✍️--> A clear and concise description of the problem...
<!-- A clear and concise description of the problem... -->
## 🔬 Minimal Reproduction
<!--
If the bug is reproducible, please describe steps below:
-->
<!-- ✍️--> 1. Open app, and click on ...
## 🔥 Exception or Error
<pre><code>
<!-- If the issue is accompanied by an exception or an error, please share it below: -->
<!-- ✍️-->
</code></pre>
## 🌍 Your Environment
## 🌍 Your Environment
**OsmAnd Version:**
<pre><code>
<!-- paste version below -->
<!-- ✍️-->
@ -60,10 +61,11 @@ If the bug is reproducible, please describe steps below:
**Device and Android/iOS version:**
**Maps used (online or offline):**
<!-- Please tick the correct box [x] (or both) -->
- [ ] Offline maps offered within the OsmAnd app for download.
<!-- If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. -->
<!-- If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. -->
- [ ] Online (tile / raster) maps <!-- Please name it -->
**Anything else relevant?**

View file

@ -2,6 +2,7 @@
name: "\U0001F6A9 Routing report"
about: Report a routing issue in OsmAnd
---
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅
Oh hi there! 😄
@ -26,10 +27,12 @@ Please give us the following information so that we can try to **reproduce** you
### Routing engine
<!-- Which routing provider was used? (please tick the proper box [x]) -->
- [ ] OsmAnd's in-app offline routing
- [ ] Any online routing provider (YOURS, OpenRouteService, OSRM, etc.)
### Routing Profile
<!-- What routing profile is chosen in the OsmAnd app? (car, bike, pedestrian, fastest or shortest, etc.) -->
### Start and end points
@ -38,6 +41,7 @@ Please give us the following information so that we can try to **reproduce** you
Also, a permalink from [openstreetmap.org](https://www.openstreetmap.org/) can be helpful. -->
### Actual and expected routes
<!-- Tell us your expected routing and how OsmAnd routes, or add screenshots here. -->
### Is this a regression?
@ -45,9 +49,10 @@ Also, a permalink from [openstreetmap.org](https://www.openstreetmap.org/) can b
<!-- Did this behavior use to work in the previous version? -->
<!-- ✍️--> Yes, the previous version in which this bug was not present was: ....
## 🌍 Your Environment
## 🌍 Your Environment
**OsmAnd Version:**
<pre><code>
<!-- paste version below -->
<!-- ✍️-->
@ -57,10 +62,11 @@ Also, a permalink from [openstreetmap.org](https://www.openstreetmap.org/) can b
**Device and Android/iOS version:**
**Maps used (online or offline):**
<!-- Please tick the correct box [x] (or both) -->
- [ ] Offline maps offered within the OsmAnd app for download.
<!-- If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. -->
<!-- If you have an issue related to offline maps, tell us the exact name of the map file where the issue occurs and its edition date. -->
- [ ] Online (tile / raster) maps <!-- Please name it -->
**Anything else relevant?**

View file

@ -1,8 +1,8 @@
---
name: "\U0001F680 Feature request"
about: Suggest a feature for OsmAnd
---
<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅
Oh hi there! 😄
@ -22,12 +22,13 @@ Please be sure to read our [FAQ](https://osmand.net/help-online) before creating
# 🚀 feature request
### Description
<!-- ✍️--> A clear and concise description of the problem or missing capability...
<!-- ✍️ A clear and concise description of the feature... -->
### Describe the solution you'd like
<!-- ✍️--> If you have a solution in mind, please describe it.
### Describe alternatives you've considered
<!-- ✍️--> Have you considered any alternative solutions or workarounds?

View file

@ -119,7 +119,7 @@ public class Algorithms {
}
public static String getFileNameWithoutExtension(String name) {
int i = name.indexOf('.');
int i = name.lastIndexOf('.');
if (i >= 0) {
name = name.substring(0, i);
}

View file

@ -63,7 +63,7 @@
<string name="do_not_have_telegram">У меня нет учетной записи Telegram</string>
<string name="enter_phone_number">Введите номер телефона</string>
<string name="enter_authentication_code">Введите код аутентификации</string>
<string name="shared_string_add">Сохранить</string>
<string name="shared_string_add">Добавить</string>
<string name="enter_device_name_description">Назовите новое устройство макс. 200 символов.</string>
<string name="shared_string_distance">Расстояние</string>
<string name="my_location">Моя локация</string>

View file

@ -21,6 +21,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/context_menu_padding_margin_tiny"
android:visibility="gone"
android:paddingBottom="@dimen/content_padding">
<androidx.recyclerview.widget.RecyclerView

View file

@ -1339,4 +1339,5 @@
<string name="navigation_profile">Amaɣnu n tunigin</string>
<string name="route_between_points_add_track_desc">Fren afaylu n uḍfar iɣer ara yernu uḥric amaynut.</string>
<string name="plan_route_exit_dialog_descr">Tebɣiḍ s tidet ad tmedleḍ abrid n uɣawas war asekles\? Ad tesruḥeḍ akk ibeddilen.</string>
<string name="shared_string_is_saved">Ittwasekles</string>
</resources>

View file

@ -3812,4 +3812,7 @@ Abasta l\'àrea: %1$s x %2$s</string>
<string name="monitoring_control_start">REC</string>
<string name="disable_recording_once_app_killed_descrp">Aturarà l\'enregistrament de traces quan es mati l\'aplicació (mitjançant aplicacions recents). (La indicació de fons OsmAnd desapareix de la barra de notificacions d\'Android.)</string>
<string name="save_global_track_interval_descr">Trieu l\'interval d\'enregistrament general dels desplaçaments (s\'activa mitjançant el giny de gravació del mapa).</string>
<string name="simplified_track">Traça simplificada</string>
<string name="simplified_track_description">Només es desarà la línia del trajecte, les fites s\'esborraran.</string>
<string name="number_of_gpx_files_selected_pattern">%s arxius de traces seleccionats</string>
</resources>

View file

@ -2785,7 +2785,7 @@
<string name="coord_input_save_as_track">Als Track speichern</string>
<string name="coord_input_save_as_track_descr">Sie haben %1$s Punkte hinzugefügt. Geben Sie einen Dateinamen ein und klicken Sie auf „Speichern“.</string>
<string name="point_deleted">Punkt %1$s gelöscht</string>
<string name="send_search_query_description">Ihre Suchanfrage wird an: \"%1 s\" gesendet, zusammen mit Ihrem Standort.
<string name="send_search_query_description">Ihre Suchanfrage wird an: \"%1$s\" gesendet, zusammen mit Ihrem Standort.
\n
\nPersönliche Informationen werden nicht gesammelt, sondern nur Suchdaten, die zur Verbesserung der Suche benötigt werden.</string>
<string name="search_no_results_description">Keine Ergebnisse?

View file

@ -2335,7 +2335,7 @@
<string name="poi_water_tap">Akvokrano</string>
<string name="poi_button_operated_yes">Butonprema: jes</string>
<string name="poi_button_operated_no">Butonprema: ne</string>
<string name="poi_bicycle_repair_station">Bicikla mem-riparejo;memriparejo bicikla;riparejo bicikla;pumpilo bicikla;aerpumpilo bicikla</string>
<string name="poi_bicycle_repair_station">Bicikla memriparejo;memriparejo bicikla;riparejo bicikla;pumpilo bicikla;aerpumpilo bicikla</string>
<string name="poi_sport_free_flying">Aersportoj</string>
<string name="poi_free_flying_site_takeoff">elteriĝejo</string>
<string name="poi_free_flying_site_landing">surteriĝejo</string>

View file

@ -2673,7 +2673,7 @@
<string name="routing_attr_width_name">Laiuspiirang</string>
<string name="routing_attr_width_description">Määra teedel lubatud sõiduki laius.</string>
<string name="simulate_your_location_gpx_descr">Simuleeri oma asukohta kasutades salvestatud GPX rada.</string>
<string name="quick_action_directions_from_desc">Nupp ekraani keskkoha lähtekohaks muutmiseks ja sihtkohta teekonna arvutamiseks või sihtkoha valimise dialoogi avamiseks kui sihtkoha marker puudub kaardil.</string>
<string name="quick_action_directions_from_desc">Nupp ekraani keskkoha lähtekohaks muutmiseks. Seejärel on kas võimalik valida sihtkohta või alustada teekonna arvutamist.</string>
<string name="record_plugin_description">See lisa aktiveerib radade salvestamise funktsionaalsuse, puudutades käsitsi kaardil GPX logimisvidinat või logides automaatselt kõik oma navigeerimise marsruudid GPX faili.
\n
\nSalvestatud radu saab jagada oma sõpradega või kasutada OSM kaastöödeks. Sportlased saavad kasutada salvestatud radu oma treeningute jälgimiseks. Mõningast raja põhianalüüsi saab teha otse OsmAnd sees, näiteks ringiajad, keskmine kiirus jne. Lisaks muidugi saab radu hiljem analüüsia ka spetsiaalsetete 3. osapoolte analüüsitööriistadega.</string>
@ -2706,7 +2706,7 @@
<string name="osmand_parking_plugin_description">Võimaldab registreerida oma auto parkimiskoha ja jälgida järelejäänud parkimisaega.
\nNii asukoht kui aeg on nähtavad nii OsmAnd armatuurlaual kui kaardi vidinas. Meeldetuletust saab lisada Androidi kalendrisse.</string>
<string name="unit_of_length_descr">Muuda kauguse mõõtmise ühikuid.</string>
<string name="osmand_distance_planning_plugin_description">See lisa annab kaardi vidina, mis võimaldab teekondade loomist kaarti koputades või olemasolevaid GPX-faile kasutades, et reise kavandada ja punktide vahelist kaugust mõõta. Tulemusi saab salvestada GPX-failina, mida saab hiljem juhendamiseks kasutada.</string>
<string name="osmand_distance_planning_plugin_description">Selleks, et reise kavandada ja punktide vahelist kaugust mõõta, loo teekondi kaardil koputades või olemasolevaid GPX-faile kasutades, Tulemusi saad salvestada GPX-failina, mida on hiljem võimalik juhendamiseks kasutada.</string>
<string name="osmand_accessibility_description">See lisa teeb seadme erivajadusega kasutajatele mõeldud funktsioonid otse OsmAndis kättesaadavaks. See lihtsustab nt. kõnesünteesi häälte kõnekiiruse reguleerimist, ekraanil navigeerimise suuna seadistamist, rulliku kasutamist suurenduse juhtimiseks või kõnesünteesi tagasisidet, näiteks oma asukoha automaatseks teatamiseks.</string>
<string name="osm_editing_plugin_description">See lisa võimaldab OsmAnd abil OSM kaastöid teha, näiteks OSM huvipunkte luua või muuta, OSM märkmeid avada või kommenteerida ning salvestatud GPX faile lisada. OSM on kogukonna juhitud globaalne üldkasutatav kaardistamisprojekt. Üksikasju leiad https://openstreetmap.org. Aktiivset osalemist hinnatakse ja panust saab teha otse OsmAnd rakendusest, kui seadistada rakenduses oma isiklikud OSM kasutajatunnused.</string>
<string name="osmand_development_plugin_description">See lisa kuvab arendus- ja silumisfunktsioonide sätteid nagu teekonna arvutamine, renderdamise jõudlus või hääljuhiste testimine ja simuleerimine. Need seaded on mõeldud arendajatele ja pole tavakasutaja jaoks vajalikud.</string>
@ -3495,7 +3495,7 @@
<string name="lang_an">Aragoni</string>
<string name="lang_lmo">Lombardi</string>
<string name="custom_color">Kohandatud värv</string>
<string name="set_working_days_to_continue">Jätkamiseks pead valima tööpäevad</string>
<string name="set_working_days_to_continue">Jätkamiseks vali tööpäevad</string>
<string name="route_between_points">Teekond punktide vahel</string>
<string name="plan_a_route">Kavanda teekonda</string>
<string name="add_to_a_track">Lisa rajale</string>
@ -3552,8 +3552,8 @@
<string name="quick_action_showhide_mapillary_descr">Nupp, mis näitab või peidab kaardil Mapillary kihti.</string>
<string name="shared_string_uninstall_and_restart">Eemalda ja taaskäivita</string>
<string name="app_mode_inline_skates">Rulluisud</string>
<string name="quick_action_remove_next_destination">Kustuta järgmine sihtpunkt</string>
<string name="use_volume_buttons_as_zoom_descr">Sisselülitades saad seadme helitugevuse nuppudega kontrollida kaardi suumi taset.</string>
<string name="quick_action_remove_next_destination">Kustuta lähim sihtpunkt</string>
<string name="use_volume_buttons_as_zoom_descr">Nutiseadme helitugevuse nuppudega kontrollida saad kaardi suumi taset.</string>
<string name="use_volume_buttons_as_zoom">Helitugevuse nupud toimivad suumina</string>
<string name="please_provide_point_name_error">Palun sisestage punkti nimi</string>
<string name="search_download_wikipedia_maps">Lae alla Vikipeedia kaardid</string>
@ -3582,7 +3582,7 @@
<string name="routing_attr_length_name">Pikkuse piirang</string>
<string name="shared_string_bearing">Kurss</string>
<string name="item_deleted">%1$s on kustutatud</string>
<string name="speed_cameras_restart_descr">Selleks, et eemaldada kõik kiiruskaamerate andmed on vajalik seadme taaskäivitamine.</string>
<string name="speed_cameras_restart_descr">Kiiruskaamerate kõikide andmete eemaldamiseks on vajalik nutiseadme taaskäivitamine.</string>
<string name="speed_cameras_removed_descr">Siin seadmes puudub teave liikluskaamerate kohta.</string>
<string name="shared_string_add_profile">Lisa profiil</string>
<string name="change_application_profile">Muuda rakenduse profiili</string>
@ -3682,7 +3682,7 @@
<string name="marker_save_as_track">Salvesta rada failina</string>
<string name="follow_track">Jälgi rada</string>
<string name="follow_track_descr">Vali rajafail, mida soovid kasutada</string>
<string name="import_track_descr">Vali rajafail, mida soovid kasutada või impordi see.</string>
<string name="import_track_descr">Vali rajafail, mida soovid kasutada või impordi see oma nutiseadmest.</string>
<string name="select_another_track">Vali muu rada</string>
<string name="navigate_to_track_descr">Navigeeri minu asukohast rajale</string>
<string name="pass_whole_track_descr">Asukoht rajal, kuhu me liigume</string>
@ -3729,4 +3729,13 @@
<string name="attach_to_the_roads">Kinnita teede külge</string>
<string name="route_between_points_warning_desc">Selle valiku kasutamiseks mõne oma navigeerimisprofiili kasutamisel kinnita oma rada lähimale lubatud teele.</string>
<string name="route_between_points_next_segment_button_desc">Valitud profiili alusel arvutatakse uus teekond vaid järgmise segmendi osas.</string>
<string name="main_actions">Põhitegevused</string>
<string name="osm_live_payment_subscription_management">Ostu kinnitusel võetakse sinu Google Play kontolt tasu.
\n
\nTellimus uuendatakse automaatselt, kui sa seda enne uuendamise kuupäeva ei tühista. Sonu kontolt võetakse pikendamisperioodi eest (kuu/kolm kuud/aasta) tasu ainult uuendamise kuupäeval.
\n
\nTellimuste haldamiseks ja tühistamiseks ava Google Play seadistused.</string>
<string name="export_import_quick_actions_with_profiles_promo">Kiirtegevusi saad eksportida või importida koos rakenduse profiilidega.</string>
<string name="delete_all_actions_message_q">Kas sa oled kindel, et soovid pöördumatult kustutada %d kiirtegevust\?</string>
<string name="route_between_points_desc">Vali kas soovid ühendada punkte sirge joonega või arvutada nendevahelist teekonda vastavalt oma valitud profiilile.</string>
</resources>

View file

@ -3843,4 +3843,23 @@
<string name="plan_route_select_track_file_for_open">یک فایل رد انتخاب کنید تا باز شود.</string>
<string name="shared_string_done">تمام</string>
<string name="overwrite_track">بَرنویسی رد</string>
<string name="open_saved_track">آهنگ ذخیره شده را باز کنید</string>
<string name="shared_string_is_saved">ذخیره شده</string>
<string name="one_point_error">لطفا حداقل دو امتیاز اضافه کنید.</string>
<string name="shared_string_redo">آماده</string>
<string name="release_3_8">"به روز شده برنامه یک عملکرد مسیر: اجازه می دهد تا از انواع مختلف پیمایش در هر بخش و گنجاندن مسیرها استفاده کنید
\n
\n • منوی New Appearance برای آهنگ ها، رنگ ، ضخامت ، فلش جهت نمایش ، نمادهای شروع / پایان استفاده می شوئ
\n
\n • بهبود دید نود های دوچرخه.
\n
\n • آهنگ ها اکنون قابل لمس هستند ، دارای منوی زمینه با اطلاعات اولیه هستند.
\n
\n • بهبود الگوریتم های جستجو
\n
\n • گزینه های ردیابی را در پیمایش بهبود بخشید
\n
\n • مشکلات مربوط به واردات / صادرات تنظیمات نمایه برطرف شده است
\n
\n"</string>
</resources>

View file

@ -3839,4 +3839,17 @@ Lon %2$s</string>
<string name="shared_string_custom">Personalizado</string>
<string name="gpx_direction_arrows">Frechas de dirección</string>
<string name="track_coloring_solid">Sólido</string>
<string name="gpx_monitoring_stop">Deter a gravación da viaxe</string>
<string name="gpx_monitoring_start">Retomar a gravación da viaxe</string>
<string name="system_default_theme">Predefinido do sistema</string>
<string name="all_next_segments">Todos os segmentos seguintes</string>
<string name="previous_segment">Segmento anterior</string>
<string name="all_previous_segments">Todos os segmentos anteriores</string>
<string name="only_selected_segment_recalc">Só o segmento marcado será recalculado empregando o perfil escollido.</string>
<string name="all_next_segments_will_be_recalc">Todos os segmentos seguintes serán recalculados empregando o perfil escollido.</string>
<string name="all_previous_segments_will_be_recalc">Todos os segmentos anteriores serán recalculados empregando o perfil escollido.</string>
<string name="open_saved_track">Abrir pista gardada</string>
<string name="shared_string_is_saved">está gardado</string>
<string name="one_point_error">Engade polo menos dous puntos.</string>
<string name="shared_string_redo">Refacer</string>
</resources>

View file

@ -1863,7 +1863,7 @@
<string name="poi_scout_camp">Cserkésztáborhely</string>
<string name="poi_backcountry">Nomád</string>
<string name="poi_resort_type">Típus</string>
<string name="poi_drive_in">Autós</string>
<string name="poi_drive_in">Autós (drive-in)</string>
<string name="poi_beauty_salon_service">Szolgáltatás</string>
<string name="poi_recycling_type">Típus</string>
<string name="poi_recycling_accepted_waste">Elfogadott hulladék</string>
@ -3050,7 +3050,7 @@
<string name="poi_wetland_palsa_bog">Dagadóláp (palsa-láp)</string>
<string name="poi_fuel_100ll">Avgas 100LL repülőbenzin</string>
<string name="poi_fuel_jeta1">Jet A-1 kerozin</string>
<string name="poi_fuel_adblue">AdBlue adalékanyag</string>
<string name="poi_fuel_adblue">Diesel kipufogó-folyadék</string>
<string name="poi_social_facility_outreach">Szolgáltatóközpont hátrányos helyzetűeknek</string>
<string name="poi_fortification_type_sconce">Erődítmény típusa: földsánc</string>
<string name="poi_fortification_type_ring_ditch">Erődítmény típusa: újkőkori körárok</string>
@ -3808,7 +3808,7 @@
<string name="poi_fire_hydrant_type_pipe">Cső</string>
<string name="poi_drinking_water_refill_network">Ivóvíz-utántöltő hálózat</string>
<string name="poi_drinking_water_refill_no">Ivóvíz-utántöltés nincs</string>
<string name="poi_drinking_water_refill_yes">Ivóvíz-utántöltés</string>
<string name="poi_drinking_water_refill_yes">van</string>
<string name="poi_seamark_water_level_below_mwl">Vízszint: közepes vízszint alatt</string>
<string name="poi_seamark_water_level_above_mwl">Vízszint: közepes vízszint fölött</string>
<string name="poi_seamark_water_level_floating">Vízszint: lebegő</string>
@ -3821,4 +3821,16 @@
<string name="poi_tactile_paving_incorrect">Félrevezető</string>
<string name="poi_tactile_paving_primitive">Véletlenül használható más elemek</string>
<string name="poi_tactile_paving_contrasted">Kontrasztos színű</string>
<string name="poi_departures_board_timetable">Menetrend</string>
<string name="poi_departures_board_realtime">Valós idejű</string>
<string name="poi_departures_board_delay">Késés</string>
<string name="poi_departures_board_yes">van</string>
<string name="poi_departures_board_no">Indulásiidő-kijelző nincs</string>
<string name="poi_elevator">Lift</string>
<string name="poi_traffic_signals_arrow_no">Nyíl nincs</string>
<string name="poi_pump_status_missing_beam">Szivattyú állapota: hiányzik a kar</string>
<string name="poi_osmand_fire_hydrant_pressure_suction">Szívás</string>
<string name="poi_recycling_small_electrical_appliances">Kis elektronikus készülékek</string>
<string name="poi_departures_board">Indulásiidő-kijelző</string>
<string name="poi_drinking_water_refill">Ivóvíz-utántöltés</string>
</resources>

View file

@ -134,11 +134,11 @@
<string name="pref_raster_map">Térképforrás beállítások</string>
<string name="pref_vector_map">Vektoros térkép beállítások</string>
<string name="delete_confirmation_msg">Biztosan törli: %1$s\?</string>
<string name="city_type_suburb">településrész</string>
<string name="city_type_hamlet">falucska</string>
<string name="city_type_village">község</string>
<string name="city_type_town">város</string>
<string name="city_type_city">város</string>
<string name="city_type_suburb">Településrész</string>
<string name="city_type_hamlet">Falucska</string>
<string name="city_type_village">Község</string>
<string name="city_type_town">Kisváros</string>
<string name="city_type_city">Város</string>
<string name="animate_route_off">Szimuláció leállítása</string>
<string name="animate_route">Szimuláció indítása</string>
<string name="file_can_not_be_renamed">Nem sikerült átnevezni a fájlt.</string>
@ -350,7 +350,7 @@
<string name="renderers_descr">Megjelenítési stílus kiválasztása</string>
<string name="poi_context_menu_website">POI weboldal megtekintése</string>
<string name="poi_context_menu_call">POI telefonszám megtekintése</string>
<string name="website">weboldal</string>
<string name="website">Weboldal</string>
<string name="phone">telefon</string>
<string name="download_type_to_filter">szűrés</string>
<string name="use_high_res_maps">Nagy felbontású kijelző</string>
@ -901,7 +901,7 @@
<string name="recording_context_menu_play">Lejátszás</string>
<string name="recording_default_name">Felvétel</string>
<string name="shared_string_control_start">Indítás</string>
<string name="map_widget_av_notes">hang/videojegyzetek</string>
<string name="map_widget_av_notes">Hang/videojegyzetek</string>
<string name="osmand_srtm_short_description_80_chars">OsmAnd-bővítmény offline szintvonalakhoz</string>
<string name="map_widget_distancemeasurement">Távolságmérés</string>
<string name="audionotes_plugin_description">Készítsen hang/fénykép/videó jegyzeteket utazás közben egy térképen lévő gomb vagy egy pozíció helyi menüjének használatával.</string>
@ -1727,7 +1727,7 @@
<string name="instalation_troubleshooting_item">Telepítés és hibaelhárítás</string>
<string name="techical_articles_item">Technikai cikkek</string>
<string name="versions_item">Verziók</string>
<string name="feedback">szavazás</string>
<string name="feedback">Visszajelzés</string>
<string name="contact_us">Kapcsolat</string>
<string name="read_more">Bővebben</string>
<string name="whats_new">Újdonságok</string>
@ -2493,9 +2493,9 @@
<string name="context_menu_points_of_group">A csoport összes pontja</string>
<string name="open_from">Nyitva ekkortól:</string>
<string name="open_till">Nyitva eddig:</string>
<string name="will_close_at">Ekkor fog bezárni:</string>
<string name="will_open_at">Ekkor fog kinyitni:</string>
<string name="will_open_on">Ekkor fog kinyitni:</string>
<string name="will_close_at">Bezár ekkor:</string>
<string name="will_open_at">Kinyit ekkor:</string>
<string name="will_open_on">Kinyit ekkor:</string>
<string name="additional_actions">További műveletek</string>
<string name="av_locations_selected_desc">GPX fájl a kijelölt jegyzetek koordinátáival és adataival.</string>
<string name="av_locations_all_desc">GPX fájl az összes jegyzet koordinátáival és adataival.</string>
@ -2747,8 +2747,8 @@
<string name="add_intermediate_point">Köztes célpont hozzáadása</string>
<string name="add_start_point">Kiindulópont megadása</string>
<string name="intermediate_waypoint">Köztes célpont</string>
<string name="transfers">átszállások</string>
<string name="on_foot">gyalog</string>
<string name="transfers">Átszállások</string>
<string name="on_foot">Gyalog</string>
<string name="route_way">Út</string>
<string name="points_of_interests">Érdekes helyek (POI)</string>
<string name="waiting_for_route_calculation">Útvonal tervezése…</string>
@ -3314,7 +3314,7 @@
<string name="reorder_profiles">Profilok listájának szerkesztése</string>
<string name="selected_profile">Kiválasztott profil</string>
<string name="select_base_profile_dialog_message">A létrehozandó egyedi profil az alkalmazás egyik alapprofilján fog alapulni, ez határozza meg az alapvető beállításokat, mint például a widgetek láthatóságát vagy a sebesség és távolság mértékegységeit. Ezek az alapprofilok, néhány pédával az egyedi profilokra, amikre kiterjeszthetők:</string>
<string name="get_discount_title">Szerezze meg %1$d %2$s %3$s kedvezménnyel</string>
<string name="get_discount_title">Szerezze meg %1$d %2$s %3$s kedvezménnyel.</string>
<string name="get_discount_first_part">%1$s az első %2$s</string>
<string name="get_discount_first_few_part">%1$s az első %2$s</string>
<string name="get_discount_second_part">utána %1$s</string>
@ -3702,7 +3702,7 @@
<string name="speed_cameras_alert">Bizonyos országokban a traffipax riasztások törvényileg tiltottak.</string>
<string name="shared_string_bearing">Tájolás</string>
<string name="item_deleted">%1$s törölve</string>
<string name="speed_cameras_restart_descr">A traffipax adatok végleges eltávolításához újraindítás szükséges.</string>
<string name="speed_cameras_restart_descr">A traffipaxadatok végleges törléséhez indítsa újra az alkalmazást.</string>
<string name="shared_string_uninstall_and_restart">Eltávolítás és Újraindítás</string>
<string name="routing_attr_length_description">Adja meg az útvonalakon a járművekre vonatkozó hosszkorlátozást.</string>
<string name="routing_attr_length_name">Hosszkorlátozás</string>
@ -3728,12 +3728,12 @@
<string name="monitoring_min_accuracy">Legkisebb pontosság</string>
<string name="monitoring_min_distance">Legkisebb elmozdulás</string>
<string name="reset_plugin_to_default">Bővítménybeállítások visszaállítása alapértelmezettre</string>
<string name="use_volume_buttons_as_zoom_descr">Engedélyezésével a térkép nagyítási szintje az eszköz hangerőgombjaival állítható.</string>
<string name="use_volume_buttons_as_zoom_descr">A térképnagyítás szintjének vezérlése a készülék hangerőgombjaival.</string>
<string name="use_volume_buttons_as_zoom">Hangerőgombok használata nagyításhoz</string>
<string name="app_mode_inline_skates">Görkorcsolya</string>
<string name="please_provide_point_name_error">Kérem, adjon nevet a pontnak</string>
<string name="lenght_limit_description">Adja meg a járműve hosszát (a hosszú járművekre útvonalkorlátozások vonatkozhatnak).</string>
<string name="quick_action_remove_next_destination">Következő célpont törlése</string>
<string name="quick_action_remove_next_destination">Legközelebbi célpont törlése</string>
<string name="search_download_wikipedia_maps">Wikipédia térképek letöltése</string>
<string name="export_profile_dialog_description">További adatokat is kijelölhet exportálásra a profillal együtt.</string>
<string name="shared_string_include_data">Kiegészítő adatok átvétele</string>
@ -3745,14 +3745,14 @@
\n
\nAz előfizetéseit a Google Play beállításainál tudja kezelni és lemondani.</string>
<string name="quick_action_remove_next_destination_descr">Törli az útvonal soron következő célpontját. Amennyiben ez a végző célpont, a navigáció megáll.</string>
<string name="plugin_wikipedia_description">Szerezzen információt az érdekes helyekkel kapcsolatban a Wikipédiáról. Ez az ön offline zseb útikönyve - egyszerűen engedélyezze a Wikipédia bővítményt és élvezze az ön körül lévő objektumokról szóló cikkeket.</string>
<string name="plugin_wikipedia_description">Tudjon meg többet az érdekes pontokról a Wikipédiából. Ez az Ön offline zsebútikönyve egyszerűen kapcsolja be a Wikipédia-bővítményt, és élvezze az Ön körüli objektumokról szóló cikkeket.</string>
<string name="app_mode_enduro_motorcycle">Salakmotor</string>
<string name="app_mode_motor_scooter">Robogó</string>
<string name="app_mode_wheelchair">Kerekesszék</string>
<string name="app_mode_go_cart">Gokart</string>
<string name="osm_edit_closed_note">Lezárt OSM-jegyzet</string>
<string name="app_mode_wheelchair_forward">Előre döntött kerekesszék</string>
<string name="set_working_days_to_continue">A folytatáshoz adja meg a munkanapokat</string>
<string name="set_working_days_to_continue">A folytatáshoz állítsa be a munkanapokat</string>
<string name="route_between_points">Útvonal pontok között</string>
<string name="plan_a_route">Útvonaltervezés</string>
<string name="add_to_a_track">Hozzáadás nyomvonalhoz</string>
@ -3826,7 +3826,7 @@
<string name="marker_save_as_track">Mentés nyomvonalfájlként</string>
<string name="select_another_track">Másik nyomvonal kiválasztása</string>
<string name="open_saved_track">Elmentett nyomvonal megnyitása</string>
<string name="import_track_descr">Válassza ki a követni kívánt nyomvonalfájlt, vagy importáljon egyet.</string>
<string name="import_track_descr">Válassza ki a követni kívánt nyomvonalfájlt, vagy importáljon egyet a készülékéről.</string>
<string name="gpx_direction_arrows">Irányt mutató nyilak</string>
<string name="monitoring_min_distance_descr_recommendation">Javaslat: Az 5 méteres beállítás megfelelő lehet, ha nem szükséges ennél finomabb részleteket rögzítenie, és nyugalmi állapotban sem akar kifejezetten adatokat rögzíteni.</string>
<string name="next_segment">Következő szakasz</string>
@ -3848,9 +3848,7 @@
<string name="track_coloring_solid">Tömör</string>
<string name="access_hint_enter_address">Adja meg a címet</string>
<string name="route_between_points_next_segment_button_desc">Csak a következő szakasz lesz újraszámítva a kiválasztott profilnak megfelelően.</string>
<string name="route_between_points_warning_desc">Ennek a beállításnak a használatához az OsmAndnak hozzá kell tördelnie a nyomvonalát a térképen található utakhoz.
\n
\n A következő lépésben ki kell választania a navigációs profilt az engedélyezett utak és a küszöbtávolság észleléséhez, hogy a nyomvonalát közelíteni lehessen az utakhoz.</string>
<string name="route_between_points_warning_desc">Ezután a beállítás használatához igazítsa a nyomvonalat a legközelebbi úthoz az egyik navigációs profil segítségével.</string>
<string name="shared_string_custom">Egyedi</string>
<string name="gpx_monitoring_stop">Utazás rögzítésének szüneteltetése</string>
<string name="shared_string_save_as_gpx">Mentés új nyomvonalfájlként</string>
@ -3861,7 +3859,7 @@
<string name="navigation_profile">Navigációs profil</string>
<string name="monitoring_min_speed_descr_remark">Megjegyzés a „sebesség &gt; 0” ellenőrzéséhez: A legtöbb GPS lapkakészlet (chipset) csak akkor mutat sebességértéket, ha az algoritmus megállapítja, hogy mozgásban van. Ha nincs mozgás, akkor nem mutatnak sebességet. Ezért ebben a szűrőben a „&gt; 0” beállítás bizonyos értelemben a GPS lapkakészlet mozgásérzékelését használja. De még ha a rögzítés ideje alatt itt nem is szűrjük a GPX elemzése során mégis használjuk ezt a funkciót a korrigált távolság meghatározásához, vagyis az abban a mezőben megjelenített érték a mozgás közben rögzített távolság.</string>
<string name="only_selected_segment_recalc">Csak a kijelölt szakasz lesz újraszámítva a kiválasztott profilnak megfelelően.</string>
<string name="plan_route_exit_dialog_descr">Biztos, hogy mentés nélkül bezárja az útvonaltervezőt\? Minden változást elveszít.</string>
<string name="plan_route_exit_dialog_descr">Biztos, hogy mentés nélkül bezárja az útvonaltervezőt\? Minden változást elvész.</string>
<string name="follow_track_descr">Válassza ki a követendő nyomvonalfájlt</string>
<string name="listed_exist">A felsorolt %1$s már létezik az OsmAndban.</string>
<string name="all_previous_segments">Minden korábbi szakasz</string>
@ -3880,4 +3878,19 @@
<string name="route_between_points_add_track_desc">Jelölje ki azt a nyomvonalfájlt, amelyhez az új szakasz hozzáadódjék.</string>
<string name="show_gpx">Nyomvonalak</string>
<string name="shared_string_redo">Mégis</string>
<string name="release_3_8">• A Tervezett útvonal mód frissítésével különböző navigációtípusok is használathatók az egyes szakaszokhoz, és bármilyen nyomvonal az utakhoz köthető
\n
\n • Új megjelenési lehetőségek a nyomvonalakhoz: válassza ki a színt, a vastagságot, kapcsolja be az iránynyilakat és a kezdő / befejező jeleket
\n
\n • A kerékpáros csomópontok jobb láthatósága
\n
\n • Helyi menü a nyomvonalak az alapvető adataival
\n
\n • Továbbfejlesztett keresési algoritmusok
\n
\n • Javított nyomvonalkövetési beállítások a Navigációban
\n
\n • Javítva a profilbeállítások importálásával / exportálásával kapcsolatos problémák
\n
\n</string>
</resources>

View file

@ -3863,4 +3863,31 @@ POIの更新は利用できません</string>
<string name="get_discount_second_part">次年度以降 %1$s</string>
<string name="get_discount_first_few_part">初%2$s度 %1$s</string>
<string name="get_discount_first_part">初%2$s度 %1$s</string>
<string name="gpx_monitoring_stop">ルート記録を一時停止</string>
<string name="gpx_monitoring_start">ルート記録を続行</string>
<string name="system_default_theme">システムのデフォルト</string>
<string name="all_next_segments_will_be_recalc">以後のすべてのセグメントは、選択したプロファイルを使用して再計算されます。</string>
<string name="all_next_segments">以後のすべてのセグメント</string>
<string name="previous_segment">前のセグメント</string>
<string name="all_previous_segments">以前のすべてのセグメント</string>
<string name="only_selected_segment_recalc">選択したセグメントのみ、選択したプロファイルを使用して再計算されます。</string>
<string name="all_previous_segments_will_be_recalc">以前のセグメントは、選択したプロファイルを使用して再計算されます。</string>
<string name="open_saved_track">保存した経路を開く</string>
<string name="one_point_error">少なくとも2つの地点を追加してください。</string>
<string name="shared_string_redo">繰り返し</string>
<string name="release_3_8">• アップデートで追加されたルート計画モードは、セグメントごとに異なるナビゲーションタイプを使用でき、おおまかな指定を実際の道路に沿って反映可能に。
\n
\n• 経路の新しい外観オプション : 色、厚さを選択し、方向矢印のオン、マークの開始/終了など
\n
\n• 自転車ノードの可視性の向上
\n
\n• 基本情報を含む経路のコンテキストメニュー追加
\n
\n• 検索アルゴリズムの改善
\n
\n• ナビゲーションの追跡オプションの改善
\n
\n• プロファイル設定のインポート/エクスポートに関する問題を修正
\n
\n</string>
</resources>

View file

@ -145,9 +145,9 @@
<string name="routing_attr_height_obstacles_description">Фактор рельефа местности (по данным SRTM, ASTER и EU-DEM).</string>
<string name="quick_action_duplicates">Действие переименовано в %1$s, чтобы избежать дублирования.</string>
<string name="quick_action_duplicate">Обнаружен дубликат имени</string>
<string name="quick_action_showhide_favorites_descr">Переключатель, чтобы показать или скрыть сохранённые точки на карте.</string>
<string name="quick_action_showhide_favorites_descr">Переключатель, чтобы показать или скрыть избранные точки на карте.</string>
<string name="quick_action_showhide_poi_descr">Переключатель, чтобы показать или скрыть POI на карте.</string>
<string name="quick_action_showhide_favorites_title">Показать/скрыть Мои места</string>
<string name="quick_action_showhide_favorites_title">Показать/скрыть избранные</string>
<string name="quick_action_add_category">Добавить категорию</string>
<string name="quick_action_add_create_items">Действия</string>
<string name="quick_action_fav_name_descr">Если оставить это поле пустым, то оно будет автоматически заполнено адресом или названием места.</string>
@ -462,7 +462,7 @@
<string name="search_position_current_location_search">Определение положения…</string>
<string name="search_position_current_location_found">Моё местоположение (найдено)</string>
<string name="search_position_address">Адрес…</string>
<string name="search_position_favorites">Сохранённые…</string>
<string name="search_position_favorites">Избранные…</string>
<string name="shared_string_undefined">Неопределённо</string>
<string name="search_position_map_view">Текущий центр карты</string>
<string name="select_search_position">Начало:</string>
@ -475,7 +475,7 @@
<string name="local_index_mi_upload_gpx">Отправить в OSM</string>
<string name="show_more_map_detail">Детализированная карта</string>
<string name="show_more_map_detail_descr">Показывать детали (дороги и др.), начиная с мелких масштабов.</string>
<string name="favourites_delete_multiple_succesful">Сохранённые места удалены.</string>
<string name="favourites_delete_multiple_succesful">Избранные точки удалены.</string>
<string name="favorite_delete_multiple">Вы уверены, что хотите удалить %1$d избранных и %2$d избранных групп\?</string>
<string name="favorite_home_category">Дом</string>
<string name="favorite_friends_category">Друзья</string>
@ -610,7 +610,7 @@
\nНавигация временно переключена на онлайн-сервис CloudMade.</string>
<string name="specified_dir_doesnt_exist">Невозможно найти указанную папку.</string>
<string name="application_dir">Папка хранилища данных</string>
<string name="osmand_net_previously_installed">У вас установлена предыдущая версия OsmAnd. Все локальные данные поддерживаются новой версией. Однако сохранённые точки нужно вручную экспортировать из старой версии и импортировать в новую.</string>
<string name="osmand_net_previously_installed">У вас установлена предыдущая версия OsmAnd. Все локальные данные поддерживаются новой версией. Однако избранные точки нужно выгрузить из предыдущей версии приложения и загрузить в новую.</string>
<string name="build_installed">Сборка {0} успешно установлена ({1}).</string>
<string name="downloading_build">Загружается сборка…</string>
<string name="install_selected_build">Установить OsmAnd — {0} из {1} {2} МБ\?</string>
@ -675,7 +675,7 @@
<string name="rotate_map_to_bearing_descr">Выравнивание карты:</string>
<string name="rotate_map_to_bearing">Ориентация карты</string>
<string name="show_route">Детали маршрута</string>
<string name="fav_imported_sucessfully">Сохранённые успешно импортированы</string>
<string name="fav_imported_sucessfully">Избранные точки успешно импортированы</string>
<string name="fav_file_to_load_not_found">GPX-файл с сохранёнными точками отсутствует в {0}</string>
<string name="fav_saved_sucessfully">Точки сохранены в {0}</string>
<string name="no_fav_to_save">Нет избранных точек для сохранения</string>
@ -796,7 +796,7 @@
<string name="downloading_list_indexes">Загружается список доступных регионов…</string>
<string name="list_index_files_was_not_loaded">Не удалось получить список регионов с https://osmand.net.</string>
<string name="fav_points_edited">Отредактирована избранная точка</string>
<string name="fav_points_not_exist">Нет сохранённых точек</string>
<string name="fav_points_not_exist">Избранные точки отсутствуют</string>
<string name="update_existing">Заменить</string>
<string name="only_show">Только показать</string>
<string name="follow">Запуск сопровождения</string>
@ -906,11 +906,11 @@
<string name="shared_string_cancel">Отмена</string>
<string name="shared_string_no">Нет</string>
<string name="add_favorite_dialog_top_text">Название точки</string>
<string name="add_favorite_dialog_default_favourite_name">Сохранённая</string>
<string name="add_favorite_dialog_favourite_added_template">Точка «{0}» сохранена.</string>
<string name="add_favorite_dialog_default_favourite_name">Избранная</string>
<string name="add_favorite_dialog_favourite_added_template">Точка «{0}» была успешно добавлена к избранным.</string>
<string name="favourites_context_menu_edit">Редактировать место</string>
<string name="favourites_context_menu_delete">Удалить из моих</string>
<string name="favourites_remove_dialog_msg">Удалить точку «%s» из сохранённых\?</string>
<string name="favourites_remove_dialog_msg">Удалить точку «%s» из избранных\?</string>
<string name="favourites_remove_dialog_success">Точка {0} удалена.</string>
<string name="osb_comment_dialog_success">Комментарий добавлен</string>
<string name="osb_comment_dialog_error">Не удалось добавить комментарий.</string>
@ -1460,7 +1460,7 @@
<string name="index_item_world_bitcoin_payments">Мировые пункты обмена bitcoin</string>
<string name="int_days">дней</string>
<string name="osmo_connect_menu">Соединение</string>
<string name="import_file_favourites">Сохранить данные в файл GPX или импортировать путевые точки в Мои места\?</string>
<string name="import_file_favourites">Сохранить данные как трек файл или импортировать путевые точки в избранные\?</string>
<string name="rendering_value_pink_name">Розовый</string>
<string name="rendering_value_brown_name">Коричневый</string>
<string name="gpx_file_is_empty">Пустой файл GPX</string>
@ -1701,7 +1701,7 @@
<string name="shared_string_rename">Переименовать</string>
<string name="shared_string_delete">Удалить</string>
<string name="shared_string_delete_all">Удалить все</string>
<string name="shared_string_add">Сохранить</string>
<string name="shared_string_add">Добавить</string>
<string name="shared_string_apply">Применить</string>
<string name="shared_string_control_start">Старт</string>
<string name="shared_string_control_stop">Стоп</string>
@ -1722,7 +1722,7 @@
<string name="shared_string_show_on_map">Показывать на карте</string>
<string name="shared_string_map">Карта</string>
<string name="shared_string_favorite">Сохранено</string>
<string name="shared_string_favorites">Сохранённые</string>
<string name="shared_string_favorites">Избранные</string>
<string name="shared_string_add_to_favorites">Добавить к избранным</string>
<string name="shared_string_audio">Аудио</string>
<string name="shared_string_video">Видео</string>
@ -1958,7 +1958,7 @@
<string name="traffic_warning_hazard">Опасность</string>
<string name="regions">Регионы</string>
<string name="world_maps">Карты мира</string>
<string name="favourites_context_menu_add">Добавить в избранное</string>
<string name="favourites_context_menu_add">Добавить в избранные</string>
<string name="region_maps">Региональные карты</string>
<string name="favorite_category_dublicate_message">Задайте название, которое ещё не используется.</string>
<string name="favorite_category_name">Название категории</string>
@ -2207,7 +2207,7 @@
<string name="clear_tile_data">Очистить всю плитку</string>
<string name="routing_attr_short_way_name">Снижать расход топлива</string>
<string name="routing_attr_short_way_description">Использование топливо-сберегающего пути (обычно короче).</string>
<string name="replace_favorite_confirmation">Вы уверены, что хотите заменить %1$s\?</string>
<string name="replace_favorite_confirmation">Вы уверены, что хотите заменить избранные %1$s\?</string>
<string name="shared_string_change">Изменить</string>
<string name="get_started">Начать</string>
<string name="shared_string_from">от</string>
@ -2264,11 +2264,11 @@
<string name="quick_action_add_parking">Добавить место парковки</string>
<string name="quick_action_new_action">Добавить действие</string>
<string name="quick_action_edit_action">Редактировать действие</string>
<string name="quick_action_add_favorite">Добавить в избранное</string>
<string name="quick_action_add_favorite">Добавить в избранные</string>
<string name="dialog_add_action_title">Добавить действие</string>
<string name="quick_actions_delete">Удалить действие</string>
<string name="quick_actions_delete_text">Вы уверены, что хотите удалить действие «%s»\?</string>
<string name="quick_action_favorites_show">Показать сохранённые</string>
<string name="quick_action_favorites_show">Показать избранные</string>
<string name="quick_action_favorites_hide">Скрыть сохранённые</string>
<string name="quick_action_showhide_poi_title">Показать/скрыть POI</string>
<string name="quick_action_poi_show">Показать %1$s</string>
@ -2357,7 +2357,7 @@
<string name="measurement_tool_save_as_new_track_descr">Сохранить точки, как точки маршрута или как линию.</string>
<string name="choose_navigation_type">Выберите профиль навигации</string>
<string name="of">%1$d из %2$d</string>
<string name="shared_string_list">Списком</string>
<string name="shared_string_list">Список</string>
<string name="shared_string_groups">Группы</string>
<string name="passed">Использовано: %1$s</string>
<string name="make_active">Сделать активным</string>
@ -2476,7 +2476,7 @@
<string name="shared_string_left">Налево</string>
<string name="show_number_pad">Показать цифровую панель</string>
<string name="tap_on_map_to_hide_interface_descr">Нажатие на карте переключает кнопки управления и виджеты.</string>
<string name="import_gpx_file_description">возможет импорт в сохранённые точки или как файл GPX.</string>
<string name="import_gpx_file_description">возможен импорт в избранные точки или как трек файл.</string>
<string name="shared_string_more_without_dots">Больше</string>
<string name="import_as_gpx">Импортировать как файл GPX</string>
<string name="import_as_favorites">Импортировать в Мои места</string>
@ -2583,7 +2583,7 @@
<string name="save_route_point">Сохранить точку маршрута</string>
<string name="waypoint_one">Путевая точка 1</string>
<string name="route_point_one">Точка маршрута 1</string>
<string name="empty_state_favourites">Добавить сохранённые</string>
<string name="empty_state_favourites">Добавить избранные</string>
<string name="empty_state_favourites_desc">Избранное можно импортировать или создать, отмечая точки на карте.</string>
<string name="import_track">Импортировать файл GPX</string>
<string name="move_point">Переместить точку</string>
@ -2703,7 +2703,7 @@
<string name="north_abbreviation">С</string>
<string name="optional_point_name">Необязательное имя точки</string>
<string name="rendering_attr_whiteWaterSports_name">Спортивные сплавы</string>
<string name="distance_farthest">По удалённости (сначала дальние)</string>
<string name="distance_farthest">Сначала дальние</string>
<string name="distance_nearest">Удалённость (сначала ближние)</string>
<string name="group_deleted">Группа удалена</string>
<string name="clear_all_intermediates">Очистить все промежуточные точки</string>
@ -3346,7 +3346,7 @@
<string name="select_map_icon">Положение значка в состоянии покоя</string>
<string name="delete_profiles_descr">После нажатия кнопки «Применить» удалённые профили будут полностью потеряны.</string>
<string name="master_profile">Базовый профиль</string>
<string name="select_color">Цвет</string>
<string name="select_color">Выберите цвет</string>
<string name="edit_profiles_descr">Вы не можете удалить стандартные профили OsmAnd, но вы можете отключить их на предыдущем экране или переместить вниз.</string>
<string name="edit_profiles">Редактировать профили</string>
<string name="select_nav_profile_dialog_message">«Тип навигации» определяет способ расчета маршрутов.</string>
@ -3833,8 +3833,8 @@
\nНа следующем шаге необходимо выбрать профиль навигации для определения разрешенных дорог и пороговое расстояние, чтобы приблизительно привязать маршрут к дорогам.</string>
<string name="route_between_points_desc">Выберите способ соединения точек: прямой линией или прокладкой маршрута с выбранным профилем.</string>
<string name="in_case_of_reverse_direction">При обратном направлении</string>
<string name="plan_route_exit_dialog_descr">Вы уверены, что хотите отменить все изменения в запланированном маршруте, закрыв его\?</string>
<string name="street_level_imagery">Изображения на уровне улиц</string>
<string name="plan_route_exit_dialog_descr">Все изменения будут утеряны. Закрыть план маршрута\?</string>
<string name="street_level_imagery">Съёмка уличного уровня</string>
<string name="shared_string_save_as_gpx">Сохранить как новый файл трека</string>
<string name="add_segment_to_the_track">Добавить в файл трека</string>
<string name="shared_string_gpx_files">Треки</string>

View file

@ -3778,27 +3778,27 @@
<string name="speed_cameras_alert">某些國家禁止使用測速照相的警報裝置。</string>
<string name="shared_string_bearing">方向</string>
<string name="item_deleted">%1$s 已刪除</string>
<string name="speed_cameras_restart_descr">必須重新啟動才能完全刪除測速照相的資料。</string>
<string name="speed_cameras_restart_descr">重新啟動應用程式以刪除所有測速照相的資料。</string>
<string name="shared_string_uninstall_and_restart">解除安裝並重新啟動</string>
<string name="routing_attr_length_description">指定路線上允許的車輛長度。</string>
<string name="routing_attr_length_name">長度限制</string>
<string name="speed_cameras_removed_descr">此裝置沒有測速照相機。</string>
<string name="app_mode_inline_skates">直排輪鞋</string>
<string name="use_volume_buttons_as_zoom_descr">用裝置音量按鈕控制地圖縮放等級。</string>
<string name="use_volume_buttons_as_zoom_descr">使用裝置音量按鈕控制地圖縮放等級。</string>
<string name="use_volume_buttons_as_zoom">音量按鈕以縮放</string>
<string name="lenght_limit_description">提供您的車輛長度,某些路徑限制可能適用於較長的車輛。</string>
<string name="quick_action_remove_next_destination">刪除下一個目的地點</string>
<string name="quick_action_remove_next_destination">刪除最近的目的地點</string>
<string name="please_provide_point_name_error">請提供點的名稱</string>
<string name="quick_action_remove_next_destination_descr">目前路徑上的目的地點將會被刪除。如果其將為目的地,導航就會停止。</string>
<string name="search_download_wikipedia_maps">下載維基百科地圖</string>
<string name="plugin_wikipedia_description">從維基百科取得關於興趣點的資訊。這是您的離線口袋指南 ── 只要啟維基百科外掛程式並享受有關於您周圍景點的文章。</string>
<string name="plugin_wikipedia_description">從維基百科取得關於興趣點的資訊。這是您的離線口袋指南 ── 只要啟維基百科外掛程式並享受有關於您周圍景點的文章。</string>
<string name="app_mode_enduro_motorcycle">耐力賽摩托車</string>
<string name="app_mode_motor_scooter">小型摩托車</string>
<string name="app_mode_wheelchair">輪椅</string>
<string name="app_mode_wheelchair_forward">輪椅向前</string>
<string name="app_mode_go_cart">卡丁車</string>
<string name="osm_edit_closed_note">已關閉的 OSM 註記</string>
<string name="set_working_days_to_continue">您必須設定工作天以繼續</string>
<string name="set_working_days_to_continue">設定工作天以繼續</string>
<string name="route_between_points">點與點之間的路線</string>
<string name="plan_a_route">規劃路線</string>
<string name="add_to_a_track">新增到軌跡</string>
@ -3824,14 +3824,12 @@
<string name="route_between_points_desc">選取如何連接點,用直線或以選定的設定檔計算其間的路徑。</string>
<string name="whole_track">整個軌道</string>
<string name="next_segment">下一段</string>
<string name="route_between_points_warning_desc">要使用此選項OsmAnd 必須將您的軌跡捕捉到地圖道路上。
\n
\n在下一步您只需要選取設定檔以偵測允許的道路與距離門檻以追蹤道路。</string>
<string name="route_between_points_warning_desc">接下來,使用您其中一個導航設定檔來將路線貼齊到最近可用的道路上以使用此選項。</string>
<string name="threshold_distance">門檻距離</string>
<string name="navigation_profile">導航設定檔</string>
<string name="route_between_points_add_track_desc">選取要加入新片段的軌道檔案。</string>
<string name="street_level_imagery">街道級照片</string>
<string name="plan_route_exit_dialog_descr">您確定要不儲存就關閉計劃錄線嗎?您將會失去所有變更。</string>
<string name="plan_route_exit_dialog_descr">您確定要關閉計畫路線來放棄所有變更嗎?</string>
<string name="in_case_of_reverse_direction">反向時</string>
<string name="shared_string_save_as_gpx">儲存為新的軌跡檔案</string>
<string name="add_segment_to_the_track">新增到軌跡檔案</string>
@ -3849,7 +3847,7 @@
<string name="marker_save_as_track">儲存為軌跡檔案</string>
<string name="follow_track">跟隨軌跡</string>
<string name="follow_track_descr">選擇要跟隨的軌跡檔案</string>
<string name="import_track_descr">選擇要跟隨的軌跡檔案,或是匯入一個</string>
<string name="import_track_descr">選擇要跟隨的軌跡檔案,或是從您的裝置匯入。</string>
<string name="select_another_track">選取其他軌跡</string>
<string name="navigate_to_track_descr">從我的位置導航到軌跡</string>
<string name="pass_whole_track_descr">要導航的軌跡點</string>

View file

@ -4253,4 +4253,6 @@
<string name="poi_departures_board_realtime">Realtime</string>
<string name="poi_departures_board_timetable">Timetable</string>
<string name="poi_beehive">Beehive</string>
</resources>

View file

@ -12,10 +12,10 @@
-->
<string name="release_3_8">
• Updated "Plan Route" mode allows using different navigation types for each segment and attaches any track to the roads\n\n
• New "Appearance" options for tracks: select color, thickness turn on the direction arrows and start/finish marks\n\n
• Improved bicycle nodes visibility\n\n
Context menu for tracks with basic info\n\n
• Updated "Plan a route" function: allows using different navigation types per segment and the inclusion of tracks\n\n
• New "Appearance" menu for tracks: select color, thickness, display direction arrows, start/finish icons\n\n
• Improved visibility of bicycle nodes.\n\n
Tracks are now tappable, have context menu with basic info.\n\n
• Improved "Search" algorithms\n\n
• Improved "Follow track" options in Navigation\n\n
• Fixed issues with import/export of profile settings\n\n
@ -51,7 +51,7 @@
<string name="nearest_point">Nearest point</string>
<string name="start_of_the_track">Start of the track</string>
<string name="pass_whole_track_descr">Point of the track to navigate</string>
<string name="navigate_to_track_descr">Navigate from my location to the track</string>
<string name="navigate_to_track_descr">Navigate from my position to the track</string>
<string name="select_another_track">Select another track</string>
<string name="import_track_descr">Choose track file to follow or import it from your device.</string>
<string name="follow_track_descr">Choose track file to follow</string>
@ -78,8 +78,8 @@
<string name="route_between_points_warning_desc">Next, snap your track to the nearest allowed road with one of your navigation profiles to use this option.</string>
<string name="next_segment">Next segment</string>
<string name="whole_track">Whole track</string>
<string name="route_between_points_desc">Select how to connect points, with a straight line, or calculate a route between them with selected profile.</string>
<string name="route_between_points_next_segment_button_desc">Only the next segment will be recalculated using selected profile.</string>
<string name="route_between_points_desc">Select how to connect points, by a straight line, or calculate a route between them as specified below.</string>
<string name="route_between_points_next_segment_button_desc">Only the next segment will be recalculated using the selected profile.</string>
<string name="route_between_points_whole_track_button_desc">The whole track will be recalculated using the selected profile.</string>
<string name="reverse_route">Reverse route</string>
<string name="save_as_new_track">Save as new track</string>

View file

@ -8,6 +8,7 @@ import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import net.osmand.plus.GpxSelectionHelper;
@ -165,6 +166,18 @@ public class FileUtils {
return dest;
}
public static String createUniqueFileName(@NonNull OsmandApplication app, String name, String dirName, String extension) {
String uniqueFileName = name;
File dir = app.getAppPath(dirName);
File fout = new File(dir, name + extension);
int ind = 0;
while (fout.exists()) {
uniqueFileName = name + "_" + (++ind);
fout = new File(dir, uniqueFileName + extension);
}
return uniqueFileName;
}
public interface RenameCallback {
void renamedTo(File file);
}

View file

@ -7,6 +7,7 @@ import android.graphics.BitmapFactory;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import net.osmand.GPXUtilities.WptPt;
@ -89,6 +90,7 @@ public class FavouritePoint implements Serializable, LocationPoint {
return color;
}
@Nullable
public String getAddress() {
return address;
}

View file

@ -9,6 +9,7 @@ import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import net.osmand.AndroidUtils;
import net.osmand.FileUtils;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.WptPt;
@ -1005,15 +1006,14 @@ public class MapMarkersHelper {
}
public String generateGpx(String fileName) {
final File dir = ctx.getAppPath(IndexConstants.GPX_INDEX_DIR + IndexConstants.MAP_MARKERS_INDEX_DIR);
String dirName = IndexConstants.GPX_INDEX_DIR + IndexConstants.MAP_MARKERS_INDEX_DIR;
File dir = ctx.getAppPath(dirName);
if (!dir.exists()) {
dir.mkdirs();
}
File fout = new File(dir, fileName + IndexConstants.GPX_FILE_EXT);
int ind = 1;
while (fout.exists()) {
fout = new File(dir, fileName + "_" + (++ind) + IndexConstants.GPX_FILE_EXT);
}
String uniqueFileName = FileUtils.createUniqueFileName(ctx, fileName, dirName, IndexConstants.GPX_FILE_EXT);
File fout = new File(dir, uniqueFileName + IndexConstants.GPX_FILE_EXT);
GPXFile file = new GPXFile(Version.getFullVersion(ctx));
for (MapMarker marker : mapMarkers) {
WptPt wpt = new WptPt();

View file

@ -86,7 +86,6 @@ import net.osmand.plus.base.FailSafeFuntions;
import net.osmand.plus.base.MapViewTrackingUtilities;
import net.osmand.plus.chooseplan.OsmLiveCancelledDialog;
import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.dashboard.DashboardOnMap.DashboardType;
import net.osmand.plus.dialogs.CrashBottomSheetDialogFragment;
import net.osmand.plus.dialogs.ImportGpxBottomSheetDialogFragment;
import net.osmand.plus.dialogs.RateUsBottomSheetDialogFragment;
@ -109,21 +108,15 @@ import net.osmand.plus.helpers.ScrollHelper.OnScrollEventListener;
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.MenuController;
import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
import net.osmand.plus.mapcontextmenu.builders.cards.dialogs.ContextMenuCardDialogFragment;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
import net.osmand.plus.mapcontextmenu.editors.PointEditorFragmentNew;
import net.osmand.plus.mapcontextmenu.editors.WptPtEditor;
import net.osmand.plus.mapcontextmenu.other.DestinationReachedMenu;
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu;
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
import net.osmand.plus.mapmarkers.PlanRouteFragment;
import net.osmand.plus.measurementtool.GpxApproximationFragment;
import net.osmand.plus.measurementtool.GpxData;
import net.osmand.plus.measurementtool.MeasurementEditingContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.SnapTrackWarningFragment;
import net.osmand.plus.quickaction.QuickActionListFragment;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routepreparationmenu.ChooseRouteFragment;
@ -141,12 +134,8 @@ import net.osmand.plus.settings.backend.OsmAndAppCustomization.OsmAndAppCustomiz
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.fragments.BaseSettingsFragment;
import net.osmand.plus.settings.fragments.BaseSettingsFragment.SettingsScreenType;
import net.osmand.plus.settings.fragments.ConfigureMenuItemsFragment;
import net.osmand.plus.settings.fragments.ConfigureProfileFragment;
import net.osmand.plus.settings.fragments.DataStorageFragment;
import net.osmand.plus.settings.fragments.ImportCompleteFragment;
import net.osmand.plus.settings.fragments.ImportSettingsFragment;
import net.osmand.plus.settings.fragments.ProfileAppearanceFragment;
import net.osmand.plus.track.TrackAppearanceFragment;
import net.osmand.plus.views.AddGpxPointBottomSheetHelper.NewGpxPoint;
import net.osmand.plus.views.AnimateDraggingMapThread;
@ -158,7 +147,6 @@ import net.osmand.plus.views.OsmandMapTileView.OnDrawMapListener;
import net.osmand.plus.views.corenative.NativeCoreContext;
import net.osmand.plus.views.layers.MapControlsLayer;
import net.osmand.plus.views.layers.MapInfoLayer;
import net.osmand.plus.views.layers.MapQuickActionLayer;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarControllerType;
import net.osmand.render.RenderingRulesStorage;
@ -669,85 +657,17 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
closeDrawer();
return;
}
if (getQuickSearchDialogFragment() != null) {
showQuickSearch(ShowQuickSearchMode.CURRENT, false);
return;
}
if (trackDetailsMenu.isVisible()) {
trackDetailsMenu.hide(true);
if (mapContextMenu.isActive() && mapContextMenu.getPointDescription() != null
&& mapContextMenu.getPointDescription().isGpxPoint()) {
mapContextMenu.show();
return;
}
if (prevActivityIntent == null) {
return;
}
}
PlanRouteFragment planRouteFragment = getPlanRouteFragment();
if (planRouteFragment != null) {
if (planRouteFragment.quit(true)) {
MapMarkersDialogFragment.showInstance(this);
}
return;
}
SnapTrackWarningFragment snapTrackWarningFragment = getSnapTrackWarningBottomSheet();
if (snapTrackWarningFragment != null) {
snapTrackWarningFragment.dismissImmediate();
return;
}
GpxApproximationFragment gpxApproximationFragment = getGpxApproximationFragment();
if (gpxApproximationFragment != null) {
gpxApproximationFragment.dismissImmediate();
return;
}
MeasurementToolFragment measurementToolFragment = getMeasurementToolFragment();
if (measurementToolFragment != null) {
measurementToolFragment.quit(true);
return;
}
ChooseRouteFragment chooseRouteFragment = getChooseRouteFragment();
if (chooseRouteFragment != null) {
chooseRouteFragment.dismiss(true);
return;
}
ProfileAppearanceFragment profileAppearanceFragment = getProfileAppearanceFragment();
if (profileAppearanceFragment != null) {
if (profileAppearanceFragment.isProfileAppearanceChanged()) {
return;
}
}
PointEditorFragmentNew pointEditorFragmentNew = getPointEditorFragmentNew();
if (pointEditorFragmentNew != null) {
pointEditorFragmentNew.showExitDialog();
return;
}
TrackAppearanceFragment trackAppearanceFragment = getTrackAppearanceFragment();
if (trackAppearanceFragment != null) {
trackAppearanceFragment.dismissImmediate();
if (prevActivityIntent == null) {
return;
}
}
if (mapContextMenu.isVisible() && mapContextMenu.isClosable()) {
if (mapContextMenu.getCurrentMenuState() != MenuState.HEADER_ONLY && !isLandscapeLayout()) {
mapContextMenu.openMenuHeaderOnly();
} else {
mapContextMenu.close();
}
return;
}
if (getMapLayers().getContextMenuLayer().isInAddGpxPointMode()) {
quitAddGpxPointMode();
}
if (prevActivityIntent != null && getSupportFragmentManager().getBackStackEntryCount() == 0) {
if (getSupportFragmentManager().getBackStackEntryCount() == 0 && launchPrevActivityIntent()) {
return;
}
super.onBackPressed();
}
public boolean launchPrevActivityIntent() {
if (prevActivityIntent != null) {
prevActivityIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
LatLon loc = getMapLocation();
prevActivityIntent.putExtra(SearchActivity.SEARCH_LAT, loc.getLatitude());
@ -755,40 +675,13 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
if (mapViewTrackingUtilities.isMapLinkedToLocation()) {
prevActivityIntent.putExtra(SearchActivity.SEARCH_NEARBY, true);
}
this.startActivity(prevActivityIntent);
startActivity(prevActivityIntent);
prevActivityIntent = null;
return;
return true;
}
QuickActionListFragment quickActionListFragment = getQuickActionListFragment();
if (quickActionListFragment != null && quickActionListFragment.isVisible()) {
if (quickActionListFragment.fromDashboard()) {
this.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_SCREEN, null);
} else {
getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed();
}
} else if (getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) {
return;
}
ImportSettingsFragment importSettingsFragment = getImportSettingsFragment();
if (importSettingsFragment != null) {
importSettingsFragment.showExitDialog();
return;
}
ImportCompleteFragment importCompleteFragment = getImportCompleteFragment();
if (importCompleteFragment != null) {
importCompleteFragment.dismissFragment();
return;
}
ConfigureMenuItemsFragment configureMenuItemsFragment = getConfigureMenuItemsFragment();
if (configureMenuItemsFragment != null) {
configureMenuItemsFragment.exitFragment();
return;
}
super.onBackPressed();
return false;
}
private void quitAddGpxPointMode() {
getMapLayers().getContextMenuLayer().getAddGpxPointBottomSheetHelper().hide();
getMapLayers().getContextMenuLayer().quitAddGpxPoint();
@ -930,7 +823,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
DataStoragePlaceDialogFragment.showInstance(getSupportFragmentManager(), true);
} else {
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE},
DownloadActivity.PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
}
}
@ -2301,30 +2194,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
return getFragment(ChooseRouteFragment.TAG);
}
public ProfileAppearanceFragment getProfileAppearanceFragment() {
return getFragment(ProfileAppearanceFragment.TAG);
}
public QuickActionListFragment getQuickActionListFragment() {
return getFragment(QuickActionListFragment.TAG);
}
public ImportSettingsFragment getImportSettingsFragment() {
return getFragment(ImportSettingsFragment.TAG);
}
public ImportCompleteFragment getImportCompleteFragment() {
return getFragment(ImportCompleteFragment.TAG);
}
public ConfigureMenuItemsFragment getConfigureMenuItemsFragment() {
return getFragment(ConfigureMenuItemsFragment.TAG);
}
public TrackAppearanceFragment getTrackAppearanceFragment() {
return getFragment(TrackAppearanceFragment.TAG);
}
public GpxApproximationFragment getGpxApproximationFragment() {
return getFragment(GpxApproximationFragment.TAG);
}
@ -2333,15 +2202,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
return getFragment(SnapTrackWarningFragment.TAG);
}
public PointEditorFragmentNew getPointEditorFragmentNew() {
PointEditorFragmentNew pointEditorFragmentNew;
pointEditorFragmentNew = getFragment(FavoritePointEditor.TAG);
if (pointEditorFragmentNew == null) {
pointEditorFragmentNew = getFragment(WptPtEditor.TAG);
}
return pointEditorFragmentNew;
}
public void backToConfigureProfileFragment() {
FragmentManager fragmentManager = getSupportFragmentManager();
int backStackEntryCount = fragmentManager.getBackStackEntryCount();
@ -2353,7 +2213,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
}
}
<T> T getFragment(String fragmentTag){
<T> T getFragment(String fragmentTag) {
Fragment fragment = getSupportFragmentManager().findFragmentByTag(fragmentTag);
return fragment != null && !fragment.isDetached() && !fragment.isRemoving() ? (T) fragment : null;
}

View file

@ -294,7 +294,7 @@ public class MapActivityActions implements DialogProvider {
dlg.findViewById(R.id.DuplicateFileName).setVisibility(View.VISIBLE);
} else {
dlg.dismiss();
new SaveDirectionsAsyncTask(app).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, toSave);
new SaveDirectionsAsyncTask(app, false).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, toSave);
}
}
});
@ -310,33 +310,42 @@ public class MapActivityActions implements DialogProvider {
return dlg;
}
private static class SaveDirectionsAsyncTask extends AsyncTask<File, Void, String> {
public static class SaveDirectionsAsyncTask extends AsyncTask<File, Void, GPXFile> {
private final OsmandApplication app;
boolean showOnMap;
public SaveDirectionsAsyncTask(OsmandApplication app) {
public SaveDirectionsAsyncTask(OsmandApplication app, boolean showOnMap) {
this.app = app;
this.showOnMap = showOnMap;
}
@Override
protected String doInBackground(File... params) {
protected GPXFile doInBackground(File... params) {
if (params.length > 0) {
File file = params[0];
String fileName = file.getName();
GPXFile gpx = app.getRoutingHelper().generateGPXFileWithRoute(fileName.substring(0,fileName.length()-GPX_FILE_EXT.length()));
GPXUtilities.writeGpxFile(file, gpx);
return app.getString(R.string.route_successfully_saved_at, file.getName());
String fileName = Algorithms.getFileNameWithoutExtension(file);
GPXFile gpx = app.getRoutingHelper().generateGPXFileWithRoute(fileName);
gpx.error = GPXUtilities.writeGpxFile(file, gpx);
return gpx;
}
return null;
}
@Override
protected void onPostExecute(String result) {
if (result != null) {
protected void onPostExecute(GPXFile gpxFile) {
if (gpxFile.error == null) {
app.getSelectedGpxHelper().selectGpxFile(gpxFile, showOnMap, false);
String result = app.getString(R.string.route_successfully_saved_at, gpxFile.tracks.get(0).name);
Toast.makeText(app, result, Toast.LENGTH_LONG).show();
} else {
String errorMessage = gpxFile.error.getMessage();
if (errorMessage == null) {
errorMessage = app.getString(R.string.error_occurred_saving_gpx);
}
Toast.makeText(app, errorMessage, Toast.LENGTH_LONG).show();
}
}
}
public void addActionsToAdapter(final double latitude,
@ -476,6 +485,7 @@ public class MapActivityActions implements DialogProvider {
} else if (standardId == R.string.avoid_road) {
getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null);
} else if (standardId == R.string.shared_string_add || standardId == R.string.favourites_context_menu_edit) {
mapActivity.getContextMenu().hide();
mapActivity.getContextMenu().buttonFavoritePressed();
} else if (standardId == R.string.shared_string_marker || standardId == R.string.shared_string_edit) {
mapActivity.getContextMenu().buttonWaypointPressed();

View file

@ -113,30 +113,27 @@ public class GpxAppearanceAdapter extends ArrayAdapter<GpxAppearanceAdapter.Appe
}
if (trackWidthProp != null) {
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR, "",
SettingsActivity.getStringPropertyValue(app, trackWidthProp.getDefaultValueDescription()));
items.add(item);
for (int j = 0; j < trackWidthProp.getPossibleValues().length; j++) {
item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR,
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_WIDTH_ATTR,
trackWidthProp.getPossibleValues()[j],
SettingsActivity.getStringPropertyValue(app, trackWidthProp.getPossibleValues()[j]));
items.add(item);
if (j == trackWidthProp.getPossibleValues().length - 1) {
item.setLastItem(true);
}
}
item.setLastItem(true);
}
if (trackColorProp != null) {
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR, "",
SettingsActivity.getStringPropertyValue(app, trackColorProp.getDefaultValueDescription()),
parseTrackColor(renderer, ""));
items.add(item);
for (int j = 0; j < trackColorProp.getPossibleValues().length; j++) {
item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR,
AppearanceListItem item = new AppearanceListItem(ConfigureMapMenu.CURRENT_TRACK_COLOR_ATTR,
trackColorProp.getPossibleValues()[j],
SettingsActivity.getStringPropertyValue(app, trackColorProp.getPossibleValues()[j]),
parseTrackColor(renderer, trackColorProp.getPossibleValues()[j]));
items.add(item);
if (j == trackColorProp.getPossibleValues().length - 1) {
item.setLastItem(true);
}
}
item.setLastItem(true);
}
return items;
}

View file

@ -63,6 +63,7 @@ public class InAppPurchaseHelper {
private InAppPurchases purchases;
private long lastValidationCheckTime;
private boolean inventoryRequested;
private static final long PURCHASE_VALIDATION_PERIOD_MSEC = 1000 * 60 * 60 * 24; // daily
// (arbitrary) request code for the purchase flow
@ -333,8 +334,8 @@ public class InAppPurchaseHelper {
}
public boolean needRequestInventory() {
return (isSubscribedToLiveUpdates(ctx) && Algorithms.isEmpty(ctx.getSettings().BILLING_PURCHASE_TOKENS_SENT.get()))
|| System.currentTimeMillis() - lastValidationCheckTime > PURCHASE_VALIDATION_PERIOD_MSEC;
return !inventoryRequested && ((isSubscribedToLiveUpdates(ctx) && Algorithms.isEmpty(ctx.getSettings().BILLING_PURCHASE_TOKENS_SENT.get()))
|| System.currentTimeMillis() - lastValidationCheckTime > PURCHASE_VALIDATION_PERIOD_MSEC);
}
public void requestInventory() {
@ -803,6 +804,7 @@ public class InAppPurchaseHelper {
protected void onPostExecute(String response) {
logDebug("Response=" + response);
if (response != null) {
inventoryRequested = true;
try {
JSONObject obj = new JSONObject(response);
JSONArray names = obj.names();

View file

@ -37,6 +37,7 @@ import android.widget.OverScroller;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
@ -108,11 +109,8 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private InterceptorLinearLayout mainView;
private View toolbarContainer;
private View toolbarView;
private ImageView toolbarBackButton;
private TextView toolbarTextView;
private View topButtonContainer;
private LockableScrollView menuScrollView;
private LinearLayout mainRouteBadgeContainer;
private LinearLayout nearbyRoutesLayout;
@ -123,8 +121,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private TextView localRoutesMoreTv;
private View zoomButtonsView;
private ImageButton zoomInButtonView;
private ImageButton zoomOutButtonView;
private MapContextMenu menu;
private OnLayoutChangeListener containerLayoutListener;
@ -149,7 +145,6 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private int topScreenPosY;
private int bottomToolbarPosY;
private int minHalfY;
private int shadowHeight;
private int zoomPaddingTop;
private OsmandMapTileView map;
@ -164,13 +159,32 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
private boolean wasDrawerDisabled;
private boolean zoomIn;
private int screenOrientation;
private boolean created;
private boolean transportBadgesCreated;
private UpdateLocationViewCache updateLocationViewCache;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
boolean enabled = mapActivity.getQuickSearchDialogFragment() == null;
mapActivity.getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(enabled) {
public void handleOnBackPressed() {
if (menu.isVisible() && menu.isClosable()) {
if (menu.getCurrentMenuState() != MenuState.HEADER_ONLY && !menu.isLandscapeLayout()) {
menu.openMenuHeaderOnly();
} else {
menu.close();
}
}
}
});
}
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
@ -188,7 +202,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
markerPaddingPx = dpToPx(MARKER_PADDING_DP);
markerPaddingXPx = dpToPx(MARKER_PADDING_X_DP);
shadowHeight = dpToPx(SHADOW_HEIGHT_TOP_DP);
int shadowHeight = dpToPx(SHADOW_HEIGHT_TOP_DP);
topScreenPosY = addStatusBarHeightIfNeeded(-shadowHeight);
bottomToolbarPosY = addStatusBarHeightIfNeeded(getResources().getDimensionPixelSize(R.dimen.dashboard_map_toolbar));
minHalfY = viewHeight - (int) (viewHeight * menu.getHalfScreenMaxHeightKoef());
@ -204,8 +218,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
mainView = view.findViewById(R.id.context_menu_main);
toolbarContainer = view.findViewById(R.id.context_menu_toolbar_container);
toolbarView = view.findViewById(R.id.context_menu_toolbar);
toolbarBackButton = view.findViewById(R.id.context_menu_toolbar_back);
ImageView toolbarBackButton = view.findViewById(R.id.context_menu_toolbar_back);
toolbarTextView = (TextView) view.findViewById(R.id.context_menu_toolbar_text);
updateVisibility(toolbarContainer, 0);
toolbarBackButton.setOnClickListener(new View.OnClickListener() {
@ -510,9 +523,9 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
// Zoom buttons
zoomButtonsView = view.findViewById(R.id.context_menu_zoom_buttons);
zoomInButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_in_button);
zoomOutButtonView = (ImageButton) view.findViewById(R.id.context_menu_zoom_out_button);
if (menu.zoomButtonsVisible()) {
ImageButton zoomInButtonView = view.findViewById(R.id.context_menu_zoom_in_button);
ImageButton zoomOutButtonView = view.findViewById(R.id.context_menu_zoom_out_button);
AndroidUtils.updateImageButton(app, zoomInButtonView, R.drawable.ic_zoom_in, R.drawable.ic_zoom_in,
R.drawable.btn_circle_trans, R.drawable.btn_circle_night, nightMode);
AndroidUtils.updateImageButton(app, zoomOutButtonView, R.drawable.ic_zoom_out, R.drawable.ic_zoom_out,
@ -2303,4 +2316,3 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
runLayoutListener();
}
}

View file

@ -28,6 +28,7 @@ import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragment;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditorFragmentNew;
import net.osmand.plus.transport.TransportStopRoute;
import net.osmand.plus.widgets.style.CustomTypefaceSpan;
import net.osmand.util.Algorithms;
import net.osmand.util.OpeningHoursParser;
import net.osmand.view.GravityDrawable;
@ -160,11 +161,16 @@ public class FavouritePointMenuController extends MenuController {
@NonNull
@Override
public CharSequence getSubtypeStr() {
Typeface typeface = FontCache.getRobotoRegular(getMapActivity());
SpannableString addressSpannable = new SpannableString(fav.getAddress());
addressSpannable.setSpan(new CustomTypefaceSpan(typeface), 0, addressSpannable.length(), 0);
MapActivity mapActivity = getMapActivity();
if (mapActivity != null && !Algorithms.isEmpty(fav.getAddress())) {
Typeface typeface = FontCache.getRobotoRegular(mapActivity);
SpannableString addressSpannable = new SpannableString(fav.getAddress());
addressSpannable.setSpan(new CustomTypefaceSpan(typeface), 0, addressSpannable.length(), 0);
return addressSpannable;
return addressSpannable;
} else {
return "";
}
}
@Override

View file

@ -25,6 +25,7 @@ import android.widget.ImageView;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
@ -49,6 +50,7 @@ import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.ColorDialogs;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.other.HorizontalSelectionAdapter;
import net.osmand.plus.widgets.FlowLayout;
import net.osmand.util.Algorithms;
@ -99,6 +101,19 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
private EditText addressEdit;
private int layoutHeightPrevious = 0;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
showExitDialog();
}
}
});
}
@SuppressLint("ClickableViewAccessibility")
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
@ -867,14 +882,28 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment {
dismissDialog.setPositiveButton(R.string.shared_string_exit, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
cancelled = true;
dismiss();
exitEditing();
}
});
dismissDialog.show();
} else {
cancelled = true;
dismiss();
exitEditing();
}
}
private void exitEditing() {
cancelled = true;
dismiss();
showContextMenu();
}
private void showContextMenu() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
MapContextMenu mapContextMenu = mapActivity.getContextMenu();
if (!mapContextMenu.isVisible() && mapContextMenu.isActive()) {
mapContextMenu.show();
}
}
}

View file

@ -12,6 +12,7 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
@ -49,11 +50,33 @@ public class TrackDetailsMenuFragment extends BaseOsmAndFragment implements OsmA
return (MapActivity) requireMyActivity();
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final MapActivity mapActivity = requireMapActivity();
menu = mapActivity.getTrackDetailsMenu();
mapActivity.getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
if (menu.isVisible()) {
menu.hide(true);
MapContextMenu contextMenu = mapActivity.getContextMenu();
if (contextMenu.isActive() && contextMenu.getPointDescription() != null
&& contextMenu.getPointDescription().isGpxPoint()) {
contextMenu.show();
} else {
mapActivity.launchPrevActivityIntent();
}
}
}
});
}
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
MapActivity mapActivity = requireMapActivity();
menu = mapActivity.getTrackDetailsMenu();
nightMode = mapActivity.getMyApplication().getDaynightHelper().isNightModeForMapControls();
View view = UiUtilities.getInflater(mapActivity, nightMode).inflate(R.layout.track_details, container, false);
if (!AndroidUiHelper.isOrientationPortrait(mapActivity)) {

View file

@ -43,7 +43,6 @@ import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.PopupMenu;
import androidx.core.content.ContextCompat;
@ -57,6 +56,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import net.osmand.AndroidUtils;
import net.osmand.FileUtils;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.WptPt;
@ -67,7 +67,6 @@ import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.Version;
@ -79,6 +78,7 @@ import net.osmand.plus.mapmarkers.CoordinateInputFormats.DDM;
import net.osmand.plus.mapmarkers.CoordinateInputFormats.DMS;
import net.osmand.plus.mapmarkers.CoordinateInputFormats.Format;
import net.osmand.plus.mapmarkers.adapters.CoordinateInputAdapter;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.widgets.EditTextEx;
import net.osmand.util.Algorithms;
import net.osmand.util.LocationParser;
@ -1498,15 +1498,13 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
protected Void doInBackground(Void... params) {
if (Algorithms.isEmpty(gpx.path)) {
if (!Algorithms.isEmpty(fileName)) {
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR + IndexConstants.MAP_MARKERS_INDEX_DIR);
String dirName = IndexConstants.GPX_INDEX_DIR + IndexConstants.MAP_MARKERS_INDEX_DIR;
File dir = app.getAppPath(dirName);
if (!dir.exists()) {
dir.mkdirs();
}
File fout = new File(dir, fileName + IndexConstants.GPX_FILE_EXT);
int ind = 1;
while (fout.exists()) {
fout = new File(dir, fileName + "_" + (++ind) + IndexConstants.GPX_FILE_EXT);
}
String uniqueFileName = FileUtils.createUniqueFileName(app, fileName, dirName, IndexConstants.GPX_FILE_EXT);
File fout = new File(dir, uniqueFileName + IndexConstants.GPX_FILE_EXT);
GPXUtilities.writeGpxFile(fout, gpx);
}
} else {

View file

@ -17,6 +17,7 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -57,8 +58,8 @@ import net.osmand.plus.measurementtool.SnapToRoadBottomSheetDialogFragment.SnapT
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.views.layers.MapMarkersLayer;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.layers.MapMarkersLayer;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory;
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController;
import net.osmand.util.MapUtils;
@ -96,6 +97,19 @@ public class PlanRouteFragment extends BaseOsmAndFragment implements OsmAndLocat
private View mainView;
private RecyclerView markersRv;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null && quit(true)) {
MapMarkersDialogFragment.showInstance(mapActivity);
}
}
});
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

View file

@ -21,6 +21,7 @@ import androidx.core.content.ContextCompat;
import com.google.android.material.textfield.TextInputLayout;
import net.osmand.AndroidUtils;
import net.osmand.FileUtils;
import net.osmand.IndexConstants;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
@ -28,7 +29,6 @@ import net.osmand.plus.base.BottomSheetDialogFragment;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.widgets.OsmandTextFieldBoxes;
import java.io.File;
import java.util.Date;
import static net.osmand.plus.mapmarkers.CoordinateInputDialogFragment.ADDED_POINTS_NUMBER_KEY;
@ -85,21 +85,13 @@ public class SaveAsTrackBottomSheetDialogFragment extends BottomSheetDialogFragm
}
}
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR + "/map markers");
if (!dir.exists()) {
dir.mkdirs();
}
Date date = new Date();
final String suggestedName = app.getString(R.string.markers) + "_" + DateFormat.format("yyyy-MM-dd", date).toString();
String displayedName = suggestedName;
File fout = new File(dir, suggestedName + IndexConstants.GPX_FILE_EXT);
int ind = 1;
while (fout.exists()) {
displayedName = suggestedName + "_" + (++ind);
fout = new File(dir, displayedName + IndexConstants.GPX_FILE_EXT);
}
final EditText nameEditText = (EditText) mainView.findViewById(R.id.name_edit_text);
nameEditText.setText(displayedName);
String dirName = IndexConstants.GPX_INDEX_DIR + IndexConstants.MAP_MARKERS_INDEX_DIR;
String suggestedName = app.getString(R.string.markers) + "_" + DateFormat.format("yyyy-MM-dd", date).toString();
String uniqueFileName = FileUtils.createUniqueFileName(app, suggestedName, dirName, IndexConstants.GPX_FILE_EXT);
final EditText nameEditText = mainView.findViewById(R.id.name_edit_text);
nameEditText.setText(uniqueFileName);
nameEditText.setTextColor(ContextCompat.getColor(getContext(), textPrimaryColor));
mainView.findViewById(R.id.save_button).setOnClickListener(new View.OnClickListener() {

View file

@ -9,6 +9,7 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
@ -97,6 +98,16 @@ public class GpxApproximationFragment extends ContextMenuScrollFragment
return MenuState.HALF_SCREEN;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
dismissImmediate();
}
});
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

View file

@ -20,6 +20,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -34,6 +35,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import net.osmand.AndroidUtils;
import net.osmand.FileUtils;
import net.osmand.GPXUtilities;
import net.osmand.GPXUtilities.GPXFile;
import net.osmand.GPXUtilities.Track;
@ -170,6 +172,16 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
this.directionMode = directionMode;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
quit(true);
}
});
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@ -1445,18 +1457,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
GpxData gpxData = editingCtx.getGpxData();
String displayedName;
if (gpxData == null) {
final String suggestedName = new SimpleDateFormat("EEE dd MMM yyyy", Locale.US).format(new Date());
displayedName = suggestedName;
OsmandApplication app = getMyApplication();
if (app != null) {
File dir = app.getAppPath(GPX_INDEX_DIR);
File fout = new File(dir, suggestedName + GPX_FILE_EXT);
int ind = 0;
while (fout.exists()) {
displayedName = suggestedName + "_" + (++ind);
fout = new File(dir, displayedName + GPX_FILE_EXT);
}
}
String suggestedName = new SimpleDateFormat("EEE dd MMM yyyy", Locale.US).format(new Date());
displayedName = FileUtils.createUniqueFileName(requireMyApplication(), suggestedName, GPX_INDEX_DIR, GPX_FILE_EXT);
} else {
displayedName = AndroidUtils.trimExtension(new File(gpxData.getGpxFile().path).getName());
}

View file

@ -8,6 +8,8 @@ import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.TextView;
import androidx.annotation.NonNull;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
@ -23,7 +25,7 @@ public class ProfileCard extends BaseCard {
private ApplicationMode selectedMode;
private ProfileCardListener listener;
public ProfileCard(MapActivity mapActivity, ApplicationMode selectedMode) {
public ProfileCard(@NonNull MapActivity mapActivity, @NonNull ApplicationMode selectedMode) {
super(mapActivity);
this.selectedMode = selectedMode;
}
@ -75,7 +77,10 @@ public class ProfileCard extends BaseCard {
}
private void resetSelected(List<ApplicationMode> modes) {
((RadioButton) view.findViewWithTag(selectedMode.getStringKey()).findViewById(R.id.compound_button)).setChecked(true);
View profileView = view.findViewWithTag(selectedMode.getStringKey());
if (profileView != null) {
((RadioButton) profileView.findViewById(R.id.compound_button)).setChecked(true);
}
}
private void addProfileView(LinearLayout container, View.OnClickListener onClickListener, Object tag,

View file

@ -8,6 +8,7 @@ import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import androidx.annotation.NonNull;
@ -59,6 +60,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
private String folderName;
private boolean rightButtonEnabled = true;
private boolean showSimplifiedButton = true;
private TextInputLayout nameTextBox;
@Override
public void createMenuItems(Bundle savedInstanceState) {
@ -80,7 +82,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
View editNameView = View.inflate(UiUtilities.getThemedContext(app, nightMode),
R.layout.track_name_edit_text, null);
final TextInputLayout nameTextBox = editNameView.findViewById(R.id.name_text_box);
nameTextBox = editNameView.findViewById(R.id.name_text_box);
nameTextBox.setBoxBackgroundColorResource(R.color.material_text_input_layout_bg);
nameTextBox.setHint(app.getString(R.string.ltr_or_rtl_combine_via_colon,
app.getString(R.string.shared_string_file_name), "").trim());
@ -100,7 +102,7 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
@Override
public void afterTextChanged(Editable s) {
checkEmptyName(s, nameTextBox);
checkEmptyName(s.toString());
}
});
BaseBottomSheetItem editFileName = new BaseBottomSheetItem.Builder()
@ -206,6 +208,10 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
@Override
public void onItemSelected(String item) {
folderName = item;
EditText editText = nameTextBox.getEditText();
if (editText != null) {
checkEmptyName(editText.getText().toString());
}
}
};
}
@ -260,17 +266,8 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
private void renameFile() {
OsmandApplication app = getMyApplication();
if (app != null) {
File dir = getMyApplication().getAppPath(IndexConstants.GPX_INDEX_DIR);
File source = dir;
if (sourceFolderName != null) {
source = new File(dir, sourceFolderName);
}
source = new File(source, sourceFileName + IndexConstants.GPX_FILE_EXT);
File dest = dir;
if (folderName != null) {
dest = new File(dir, folderName);
}
dest = new File(dest, fileName + IndexConstants.GPX_FILE_EXT);
File source = getFile(app, sourceFolderName, sourceFileName);
File dest = getFile(app, folderName, fileName);
if (!source.equals(dest)) {
if (dest.exists()) {
Toast.makeText(app, R.string.file_with_name_already_exists, Toast.LENGTH_LONG).show();
@ -290,25 +287,46 @@ public class SaveAsNewTrackBottomSheetDialogFragment extends MenuBottomSheetDial
}
}
private File getFile(OsmandApplication app, String folderName, String fileName) {
File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
File source = dir;
if (folderName != null) {
source = new File(dir, folderName);
}
source = new File(source, fileName + IndexConstants.GPX_FILE_EXT);
return source;
}
@Override
protected boolean isRightBottomButtonEnabled() {
return rightButtonEnabled;
}
private void checkEmptyName(Editable name, TextInputLayout nameCaption) {
String text = name.toString().trim();
private void checkEmptyName(String name) {
rightButtonEnabled = false;
String text = name.trim();
if (text.isEmpty()) {
nameCaption.setError(getString(R.string.empty_filename));
rightButtonEnabled = false;
nameTextBox.setError(getString(R.string.empty_filename));
} else if (isFileExist(name)) {
nameTextBox.setError(getString(R.string.file_with_name_already_exist));
} else {
nameCaption.setError(null);
nameTextBox.setError(null);
fileName = text;
rightButtonEnabled = true;
}
updateBottomButtons();
}
interface SaveAsNewTrackFragmentListener {
private boolean isFileExist(String name) {
OsmandApplication app = getMyApplication();
if (app != null) {
File file = getFile(app, folderName, name);
return file.exists();
}
return false;
}
public interface SaveAsNewTrackFragmentListener {
void onSaveAsNewTrack(String folderName, String fileName, boolean showOnMap, boolean simplifiedTrack);

View file

@ -9,7 +9,9 @@ import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
@ -30,11 +32,12 @@ import net.osmand.plus.views.layers.MapInfoLayer;
import org.apache.commons.logging.Log;
import static android.view.Gravity.TOP;
import static android.view.ViewGroup.LayoutParams.*;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.BACK_TO_LOC_HUD_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.ZOOM_IN_HUD_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.ZOOM_OUT_HUD_ID;
import static net.osmand.plus.UiUtilities.DialogButtonType.*;
import static net.osmand.plus.UiUtilities.DialogButtonType.PRIMARY;
import static net.osmand.plus.UiUtilities.DialogButtonType.SECONDARY;
public class SnapTrackWarningFragment extends BaseOsmAndFragment {
@ -56,6 +59,16 @@ public class SnapTrackWarningFragment extends BaseOsmAndFragment {
private boolean nightMode;
private boolean portrait;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
dismissImmediate();
}
});
}
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
OsmandApplication app = getMyApplication();
if (app != null) {

View file

@ -18,6 +18,7 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.SwitchCompat;
@ -38,11 +39,12 @@ import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.views.layers.MapQuickActionLayer;
import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.OnItemMoveCallback;
import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback.UnmovableItem;
import net.osmand.plus.views.layers.MapQuickActionLayer;
import java.util.ArrayList;
import java.util.Collections;
@ -100,6 +102,26 @@ public class QuickActionListFragment extends BaseOsmAndFragment
}
screenType = savedInstanceState.getInt(SCREEN_TYPE_KEY, SCREEN_TYPE_REORDER);
}
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
if (isVisible()) {
if (fromDashboard()) {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.CONFIGURE_SCREEN, null);
} else {
mapActivity.getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed();
}
} else if (mapActivity.getMapView().getLayerByClass(MapQuickActionLayer.class).onBackPressed()) {
return;
}
FragmentManager fragmentManager = mapActivity.getSupportFragmentManager();
if (!fragmentManager.isStateSaved()) {
fragmentManager.popBackStackImmediate();
}
}
}
});
}
@Nullable

View file

@ -6,6 +6,7 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
@ -21,6 +22,7 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -33,7 +35,9 @@ import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import net.osmand.AndroidUtils;
import net.osmand.FileUtils;
import net.osmand.GPXUtilities;
import net.osmand.IndexConstants;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
@ -42,22 +46,23 @@ import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.MapActivityActions;
import net.osmand.plus.activities.PrintDialogActivity;
import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.base.ContextMenuFragment;
import net.osmand.plus.base.ContextMenuFragment.ContextMenuFragmentListener;
import net.osmand.plus.base.ContextMenuFragment.MenuState;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.measurementtool.SaveAsNewTrackBottomSheetDialogFragment;
import net.osmand.plus.routepreparationmenu.RouteDetailsFragment.CumulativeInfo;
import net.osmand.plus.routepreparationmenu.RouteDetailsFragment.RouteDetailsFragmentListener;
import net.osmand.plus.routepreparationmenu.cards.PublicTransportCard;
import net.osmand.plus.routing.RouteDirectionInfo;
import net.osmand.plus.routing.RouteProvider.GPXRouteParamsBuilder;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.TransportRoutingHelper;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.views.layers.MapControlsLayer;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.layers.MapControlsLayer;
import net.osmand.router.TransportRouteResult;
import net.osmand.util.Algorithms;
@ -73,12 +78,15 @@ import java.util.Date;
import java.util.List;
import java.util.Locale;
import static net.osmand.IndexConstants.GPX_FILE_EXT;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.BACK_TO_LOC_HUD_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.ZOOM_IN_HUD_ID;
import static net.osmand.aidlapi.OsmAndCustomizationConstants.ZOOM_OUT_HUD_ID;
import static net.osmand.plus.activities.MapActivityActions.SaveDirectionsAsyncTask;
import static net.osmand.plus.measurementtool.SaveAsNewTrackBottomSheetDialogFragment.SaveAsNewTrackFragmentListener;
public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMenuFragmentListener,
RouteDetailsFragmentListener {
RouteDetailsFragmentListener, SaveAsNewTrackFragmentListener {
public static final String TAG = "ChooseRouteFragment";
public static final String ROUTE_INDEX_KEY = "route_index_key";
@ -111,6 +119,16 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
private boolean publicTransportMode;
private boolean needAdjustMap;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
dismiss(true);
}
});
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -461,8 +479,19 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
RoutingHelper routingHelper = mapActivity.getMyApplication().getRoutingHelper();
MapActivityActions.createSaveDirections(mapActivity, routingHelper).show();
OsmandApplication app = mapActivity.getMyApplication();
GPXRouteParamsBuilder paramsBuilder = app.getRoutingHelper().getCurrentGPXRoute();
String fileName;
if (paramsBuilder == null || paramsBuilder.getFile() == null || paramsBuilder.getFile().path == null) {
String suggestedName = new SimpleDateFormat("EEE dd MMM yyyy", Locale.US).format(new Date());
fileName = FileUtils.createUniqueFileName(app, suggestedName, IndexConstants.GPX_INDEX_DIR, GPX_FILE_EXT);
} else {
fileName = new File(paramsBuilder.getFile().path).getName();
}
SaveAsNewTrackBottomSheetDialogFragment.showInstance(mapActivity.getSupportFragmentManager(),
ChooseRouteFragment.this, null, fileName,
false, true);
}
}
};
@ -861,6 +890,16 @@ public class ChooseRouteFragment extends BaseOsmAndFragment implements ContextMe
}
}
@Override
public void onSaveAsNewTrack(String folderName, String fileName, boolean showOnMap, boolean simplifiedTrack) {
OsmandApplication app = getMyApplication();
if (app != null) {
File fileDir = new File(app.getAppPath(IndexConstants.GPX_INDEX_DIR), folderName == null ? "" : folderName);
File toSave = new File(fileDir, fileName + GPX_FILE_EXT);
new SaveDirectionsAsyncTask(app, showOnMap).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, toSave);
}
}
public class RoutesPagerAdapter extends FragmentPagerAdapter {
private int routesCount;

View file

@ -34,6 +34,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@ -41,6 +42,7 @@ import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.fragment.app.FragmentTransaction;
@ -232,13 +234,24 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FragmentActivity activity = requireActivity();
app = getMyApplication();
nightMode = !app.getSettings().isLightContent();
navigationInfo = new NavigationInfo(app);
accessibilityAssistant = new AccessibilityAssistant(getActivity());
accessibilityAssistant = new AccessibilityAssistant(activity);
boolean isLightTheme = app.getSettings().isLightContent();
int themeId = isLightTheme ? R.style.OsmandLightTheme : R.style.OsmandDarkTheme;
setStyle(STYLE_NO_FRAME, themeId);
activity.getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
mapActivity.showQuickSearch(ShowQuickSearchMode.CURRENT, false);
}
}
});
}
@Override

View file

@ -1,8 +1,6 @@
package net.osmand.plus.search;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.widget.TextView;
@ -50,11 +48,7 @@ public class SendSearchQueryBottomSheet extends MenuBottomSheetDialogFragment {
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
final TextView textView = (TextView) View.inflate(new ContextThemeWrapper(getContext(), themeRes),
R.layout.send_missing_search_query_tv, null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
textView.setText(getString(R.string.send_search_query_description, searchQuery));
} else {
textView.setText(getString(R.string.send_search_query_description, searchQuery));
}
textView.setText(getString(R.string.send_search_query_description, searchQuery));
BaseBottomSheetItem sendSearchQueryDescription = new SimpleBottomSheetItem.Builder().setCustomView(textView)
.create();
items.add(sendSearchQueryDescription);

View file

@ -1,6 +1,5 @@
package net.osmand.plus.settings.fragments;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
@ -11,6 +10,7 @@ import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@ -24,11 +24,9 @@ import com.google.android.material.appbar.AppBarLayout;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuItem;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
@ -36,11 +34,13 @@ import net.osmand.plus.base.BaseOsmAndFragment;
import net.osmand.plus.dialogs.ConfigureMapMenu;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.profiles.SelectCopyAppModeBottomSheet;
import net.osmand.plus.settings.fragments.ConfigureMenuRootFragment.ScreenType;
import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.bottomsheets.ChangeGeneralProfilesPrefBottomSheet;
import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import net.osmand.plus.settings.fragments.RearrangeMenuItemsAdapter.RearrangeMenuAdapterItem;
import net.osmand.plus.settings.fragments.ConfigureMenuRootFragment.ScreenType;
import net.osmand.plus.settings.fragments.RearrangeMenuItemsAdapter.MenuItemsAdapterListener;
import net.osmand.plus.settings.fragments.RearrangeMenuItemsAdapter.RearrangeMenuAdapterItem;
import net.osmand.plus.views.controls.ReorderItemTouchHelperCallback;
import org.apache.commons.logging.Log;
@ -83,7 +83,7 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment
private boolean nightMode;
private boolean wasReset = false;
private boolean isChanged = false;
private Activity activity;
private FragmentActivity activity;
private RecyclerView recyclerView;
@Override
@ -149,7 +149,13 @@ public class ConfigureMenuItemsFragment extends BaseOsmAndFragment
nightMode = !app.getSettings().isLightContentForMode(appMode);
mInflater = UiUtilities.getInflater(app, nightMode);
mainActionItems = new ArrayList<>();
activity = getActivity();
activity = requireActivity();
activity.getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
exitFragment();
}
});
}
private void initSavedIds(ApplicationMode appMode) {

View file

@ -12,6 +12,7 @@ import android.view.ViewTreeObserver;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
@ -62,6 +63,12 @@ public class ImportCompleteFragment extends BaseOsmAndFragment {
super.onCreate(savedInstanceState);
app = requireMyApplication();
nightMode = !app.getSettings().isLightContent();
requireActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
dismissFragment();
}
});
}
@Nullable

View file

@ -16,6 +16,7 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@ -106,6 +107,12 @@ public class ImportSettingsFragment extends BaseOsmAndFragment
app = requireMyApplication();
settingsHelper = app.getSettingsHelper();
nightMode = !app.getSettings().isLightContent();
requireActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
showExitDialog();
}
});
}
@Nullable

View file

@ -23,6 +23,7 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
@ -151,6 +152,11 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
changedProfile.navigationIcon = profile.navigationIcon;
isNewProfile = ApplicationMode.valueOfStringKey(changedProfile.stringKey, null) == null;
}
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
showExitDialog();
}
});
}
public void setupAppProfileObjectFromAppMode(ApplicationMode baseModeForNewProfile) {
@ -893,7 +899,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
profileNameOtfb.setError(errorMessage, true);
}
public boolean isProfileAppearanceChanged() {
public void showExitDialog() {
hideKeyboard();
if (isChanged()) {
AlertDialog.Builder dismissDialog = createWarningDialog(getActivity(),
@ -906,9 +912,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
}
});
dismissDialog.show();
return true;
} else {
return false;
dismiss();
}
}

View file

@ -14,6 +14,7 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.activity.OnBackPressedCallback;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -147,6 +148,15 @@ public class TrackAppearanceFragment extends ContextMenuScrollFragment implement
}
updateTrackColor();
}
requireMyActivity().getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
public void handleOnBackPressed() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
dismissImmediate();
mapActivity.launchPrevActivityIntent();
}
}
});
}
private void updateTrackColor() {

View file

@ -17,7 +17,6 @@ import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.internal.FlowLayout;
@ -81,10 +80,10 @@ public class TrackColoringCard extends BaseCard implements ColorPickerListener {
createColorSelector();
updateColorSelector();
coloringAdapter = new TrackColoringAdapter(appearanceItems);
RecyclerView groupRecyclerView = view.findViewById(R.id.recycler_view);
groupRecyclerView.setAdapter(coloringAdapter);
groupRecyclerView.setLayoutManager(new LinearLayoutManager(app, RecyclerView.HORIZONTAL, false));
// coloringAdapter = new TrackColoringAdapter(appearanceItems);
// RecyclerView groupRecyclerView = view.findViewById(R.id.recycler_view);
// groupRecyclerView.setAdapter(coloringAdapter);
// groupRecyclerView.setLayoutManager(new LinearLayoutManager(app, RecyclerView.HORIZONTAL, false));
AndroidUiHelper.updateVisibility(view.findViewById(R.id.top_divider), isShowDivider());
}
@ -156,7 +155,7 @@ public class TrackColoringCard extends BaseCard implements ColorPickerListener {
@Override
public void onClick(View v) {
updateColorSelector(color, rootView);
coloringAdapter.notifyDataSetChanged();
// coloringAdapter.notifyDataSetChanged();
trackDrawInfo.setColor(color);
CardListener listener = getListener();

View file

@ -8,6 +8,7 @@ import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -71,13 +72,14 @@ public class TrackWidthCard extends BaseCard {
}
}
@Nullable
private AppearanceListItem getSelectedItem() {
if (selectedItem == null) {
String selectedWidth = trackDrawInfo.getWidth();
for (AppearanceListItem item : appearanceItems) {
if (Algorithms.objectEquals(item.getValue(), selectedWidth)
if (selectedWidth != null && (Algorithms.objectEquals(item.getValue(), selectedWidth)
|| Algorithms.isEmpty(selectedWidth) && Algorithms.isEmpty(item.getValue())
|| Algorithms.isInt(selectedWidth) && CUSTOM_WIDTH.equals(item.getAttrName())) {
|| Algorithms.isInt(selectedWidth) && CUSTOM_WIDTH.equals(item.getAttrName()))) {
selectedItem = item;
break;
}
@ -106,11 +108,15 @@ public class TrackWidthCard extends BaseCard {
titleView.setText(R.string.select_track_width);
TextView descriptionView = view.findViewById(R.id.description);
descriptionView.setText(getSelectedItem().getLocalizedValue());
AppearanceListItem item = getSelectedItem();
if (item != null) {
descriptionView.setText(item.getLocalizedValue());
}
}
private void updateCustomWidthSlider() {
if (CUSTOM_WIDTH.equals(getSelectedItem().getAttrName())) {
AppearanceListItem item = getSelectedItem();
if (item != null && CUSTOM_WIDTH.equals(item.getAttrName())) {
Slider widthSlider = view.findViewById(R.id.width_slider);
widthSlider.setValueTo(CUSTOM_WIDTH_MAX);