Merge branch 'master' of github.com:osmandapp/Osmand

This commit is contained in:
max-klaus 2020-12-05 19:54:05 +03:00
commit cbcf33146d
42 changed files with 677 additions and 533 deletions

View file

@ -155,7 +155,7 @@
<string name="shared_string_later">Síðar</string> <string name="shared_string_later">Síðar</string>
<string name="bearing">Stefna</string> <string name="bearing">Stefna</string>
<string name="unit_of_speed_system">Hraðaeining</string> <string name="unit_of_speed_system">Hraðaeining</string>
<string name="shared_string_map">Landakort</string> <string name="shared_string_map">Kort</string>
<string name="min_logging_speed_descr">Sía: Engin skráning punkta fyrir neðan valinn hraða</string> <string name="min_logging_speed_descr">Sía: Engin skráning punkta fyrir neðan valinn hraða</string>
<string name="in_time">í %1$s</string> <string name="in_time">í %1$s</string>
<string name="my_location_search_hint">Leit: Hópur eða tengiliður</string> <string name="my_location_search_hint">Leit: Hópur eða tengiliður</string>

View file

@ -6,56 +6,50 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="@dimen/bottom_sheet_title_height" android:minHeight="@dimen/bottom_sheet_title_height"
android:paddingStart="@dimen/content_padding"
android:paddingLeft="@dimen/content_padding" android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/content_padding" android:paddingTop="@dimen/content_padding"
android:paddingEnd="@dimen/wikilink_bottom_sheet_padding"
android:paddingRight="@dimen/wikilink_bottom_sheet_padding" android:paddingRight="@dimen/wikilink_bottom_sheet_padding"
android:paddingBottom="@dimen/wikilink_bottom_sheet_padding"> android:paddingBottom="@dimen/wikilink_bottom_sheet_padding">
<LinearLayout <net.osmand.plus.widgets.TextViewEx
android:layout_width="0dp" android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:ellipsize="end"
android:layout_marginEnd="@dimen/content_padding" android:letterSpacing="@dimen/text_button_letter_spacing"
android:layout_marginRight="@dimen/content_padding" android:minHeight="@dimen/default_title_line_height"
android:layout_weight="1" android:textColor="?android:textColorPrimary"
android:orientation="vertical"> android:textSize="@dimen/default_list_text_size"
app:lineHeight="@dimen/default_title_line_height"
app:typeface="@string/font_roboto_medium"
tools:text="Some title" />
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/title" android:id="@+id/description"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:layout_below="@+id/title"
android:letterSpacing="@dimen/text_button_letter_spacing" android:ellipsize="end"
android:minHeight="@dimen/default_title_line_height" android:letterSpacing="@dimen/description_letter_spacing"
android:textColor="?android:textColorPrimary" android:minHeight="@dimen/default_desc_line_height"
android:textSize="@dimen/default_list_text_size" android:textColor="?android:textColorSecondary"
app:lineHeight="@dimen/default_title_line_height" android:textSize="@dimen/default_desc_text_size"
app:typeface="@string/font_roboto_medium" app:lineHeight="@dimen/default_desc_line_height"
tools:text="Some title" /> app:typeface="@string/font_roboto_regular"
tools:text="Some description" />
<net.osmand.plus.widgets.TextViewEx
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:letterSpacing="@dimen/description_letter_spacing"
android:minHeight="@dimen/default_desc_line_height"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"
app:lineHeight="@dimen/default_desc_line_height"
app:typeface="@string/font_roboto_regular"
tools:text="Some description" />
</LinearLayout>
<net.osmand.plus.widgets.TextViewEx <net.osmand.plus.widgets.TextViewEx
android:id="@+id/selected_size" android:id="@+id/selected_size"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:letterSpacing="@dimen/text_button_letter_spacing" android:letterSpacing="@dimen/text_button_letter_spacing"
android:minHeight="@dimen/default_title_line_height" android:minHeight="@dimen/default_title_line_height"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
@ -64,7 +58,7 @@
app:typeface="@string/font_roboto_regular" app:typeface="@string/font_roboto_regular"
tools:text="5/6" /> tools:text="5/6" />
</LinearLayout> </RelativeLayout>
<LinearLayout <LinearLayout
android:id="@+id/select_all_button" android:id="@+id/select_all_button"

View file

@ -3883,4 +3883,6 @@
<string name="poi_parking_layby">Langs gaden</string> <string name="poi_parking_layby">Langs gaden</string>
<string name="poi_parking_sheds">Overdækket parkering</string> <string name="poi_parking_sheds">Overdækket parkering</string>
<string name="poi_fuel_lng">LNG</string> <string name="poi_fuel_lng">LNG</string>
<string name="poi_siren">Sirene</string>
<string name="poi_nurse">Sygeplejerske</string>
</resources> </resources>

View file

@ -3883,4 +3883,7 @@
<string name="poi_liaison_filter">Verbindungsbüro</string> <string name="poi_liaison_filter">Verbindungsbüro</string>
<string name="poi_consulate_filter">Konsulat</string> <string name="poi_consulate_filter">Konsulat</string>
<string name="poi_embassy_filter">Botschaft</string> <string name="poi_embassy_filter">Botschaft</string>
<string name="poi_siren">Sirene</string>
<string name="poi_nurse">Krankenpfleger/in</string>
<string name="poi_mobile_money_agent">Mobiler Geldvermittler</string>
</resources> </resources>

View file

@ -3887,4 +3887,7 @@
<string name="poi_liaison_filter">Enlace</string> <string name="poi_liaison_filter">Enlace</string>
<string name="poi_consulate_filter">Consulado</string> <string name="poi_consulate_filter">Consulado</string>
<string name="poi_embassy_filter">Embajada</string> <string name="poi_embassy_filter">Embajada</string>
<string name="poi_siren">Sirena</string>
<string name="poi_nurse">Enfermera</string>
<string name="poi_mobile_money_agent">Agente de dinero móvil</string>
</resources> </resources>

View file

@ -3872,4 +3872,7 @@
<string name="poi_liaison_filter">Összekötő iroda</string> <string name="poi_liaison_filter">Összekötő iroda</string>
<string name="poi_embassy_filter">Külképviselet</string> <string name="poi_embassy_filter">Külképviselet</string>
<string name="poi_consulate_filter">Konzulátus</string> <string name="poi_consulate_filter">Konzulátus</string>
<string name="poi_nurse">Ápoló</string>
<string name="poi_siren">Sziréna</string>
<string name="poi_mobile_money_agent">Mobilpénzfizetési iroda</string>
</resources> </resources>

View file

@ -3835,4 +3835,37 @@
<string name="poi_parking_rooftop">Á þaki</string> <string name="poi_parking_rooftop">Á þaki</string>
<string name="poi_gpx_point">GPX-punktur</string> <string name="poi_gpx_point">GPX-punktur</string>
<string name="poi_radar_tower">Radarturn</string> <string name="poi_radar_tower">Radarturn</string>
<string name="poi_mobile_money_agent">Farsímagreiðsluþjónusta</string>
<string name="poi_diplomatic_embassy">Sendiráð</string>
<string name="poi_diplomatic_services_citizen_services_no">Nei</string>
<string name="poi_nurse">Hjúkrunarfræðingur</string>
<string name="poi_diplomatic_services_immigrant_visas_filter">Vegabréfsáritun fyrir innflytjendur</string>
<string name="poi_embassy_residence">Aðsetur</string>
<string name="poi_liaison_subnational">Undirþjóðlegt</string>
<string name="poi_siren">Sírena</string>
<string name="poi_embassy_mission">Sendinefnd</string>
<string name="poi_diplomatic_liaison">Tengifulltrúi</string>
<string name="poi_liaison_filter">Tenging</string>
<string name="poi_diplomatic_services_citizen_services_yes"></string>
<string name="poi_liaison_liaison_office">Skrifstofa</string>
<string name="poi_consulate_filter">Ræðismaður</string>
<string name="poi_consulate_consulate_general">Ræðismannsskrifstofa</string>
<string name="poi_embassy_nunciature">Sendinefnd Vatíkansins (nunciature)</string>
<string name="poi_consulate_honorary_consul">Heiðursræðismaður</string>
<string name="poi_diplomatic_services_citizen_services_filter">Borgaraþjónustur</string>
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Vegabréfsáritun fyrir ekki-innflytjendur</string>
<string name="poi_diplomatic_services_non_immigrant_visas_no">Nei</string>
<string name="poi_liaison_representative_office">Umboðsskrifstofa</string>
<string name="poi_embassy_yes">Sendiherra í forsvari</string>
<string name="poi_diplomatic_services_non_immigrant_visas_yes"></string>
<string name="poi_embassy_interests_section">Hagsmunadeild</string>
<string name="poi_diplomatic_services_immigrant_visas_yes"></string>
<string name="poi_embassy_high_commission">Sendifulltrúi</string>
<string name="poi_embassy_filter">Sendiráð</string>
<string name="poi_embassy_delegation">Sendinefnd</string>
<string name="poi_diplomatic_services_immigrant_visas_no">Nei</string>
<string name="poi_consulate_yes">Ræðismaður í forsvari</string>
<string name="poi_consulate_consular_agency">Ræðismannastofnun</string>
<string name="poi_embassy_branch_embassy">Útibú</string>
<string name="poi_consulate_consular_office">Ræðisskrifstofa</string>
</resources> </resources>

View file

@ -52,7 +52,7 @@
<string name="shared_string_move_down">Færa ↓</string> <string name="shared_string_move_down">Færa ↓</string>
<string name="storage_directory_shared">Samnýtt minni</string> <string name="storage_directory_shared">Samnýtt minni</string>
<string name="recalculate_route">Endurreikna leið</string> <string name="recalculate_route">Endurreikna leið</string>
<string name="donations">Gjafir</string> <string name="donations">Styrkir</string>
<string name="osm_live_subscribe_btn">Gerast áskrifandi</string> <string name="osm_live_subscribe_btn">Gerast áskrifandi</string>
<string name="osm_live_active">Virkt</string> <string name="osm_live_active">Virkt</string>
<string name="osm_live_not_active">Óvirkt</string> <string name="osm_live_not_active">Óvirkt</string>
@ -131,7 +131,7 @@
<string name="rendering_value_green_name">Grænt</string> <string name="rendering_value_green_name">Grænt</string>
<string name="rendering_value_lightblue_name">Ljósblátt</string> <string name="rendering_value_lightblue_name">Ljósblátt</string>
<string name="rendering_value_blue_name">Blátt</string> <string name="rendering_value_blue_name">Blátt</string>
<string name="rendering_value_purple_name">Fjólublátt</string> <string name="rendering_value_purple_name">Purpurablátt</string>
<string name="rendering_value_pink_name">Bleikt</string> <string name="rendering_value_pink_name">Bleikt</string>
<string name="rendering_value_brown_name">Brúnt</string> <string name="rendering_value_brown_name">Brúnt</string>
<string name="light_theme">Ljóst</string> <string name="light_theme">Ljóst</string>
@ -229,7 +229,7 @@
<string name="shared_string_do_not_show_again">Ekki sýna aftur</string> <string name="shared_string_do_not_show_again">Ekki sýna aftur</string>
<string name="shared_string_remember_my_choice">Muna valið</string> <string name="shared_string_remember_my_choice">Muna valið</string>
<string name="shared_string_refresh">Endurnýja</string> <string name="shared_string_refresh">Endurnýja</string>
<string name="shared_string_download">Hlaða niður</string> <string name="shared_string_download">Sækja</string>
<string name="shared_string_downloading">Sæki…</string> <string name="shared_string_downloading">Sæki…</string>
<string name="shared_string_action_template">Aðgerð {0}</string> <string name="shared_string_action_template">Aðgerð {0}</string>
<string name="shared_string_close">Loka</string> <string name="shared_string_close">Loka</string>
@ -238,7 +238,7 @@
<string name="shared_string_show_all">Sýna allt</string> <string name="shared_string_show_all">Sýna allt</string>
<string name="shared_string_collapse">Fella saman</string> <string name="shared_string_collapse">Fella saman</string>
<string name="shared_string_show_on_map">Birta á korti</string> <string name="shared_string_show_on_map">Birta á korti</string>
<string name="shared_string_map">Landakort</string> <string name="shared_string_map">Kort</string>
<string name="shared_string_favorite">Eftirlæti</string> <string name="shared_string_favorite">Eftirlæti</string>
<string name="shared_string_favorites">Eftirlæti</string> <string name="shared_string_favorites">Eftirlæti</string>
<string name="shared_string_address">Heimilisfang</string> <string name="shared_string_address">Heimilisfang</string>
@ -293,8 +293,8 @@
<string name="shared_string_all">Allt</string> <string name="shared_string_all">Allt</string>
<string name="shared_string_waypoints">Ferilpunktar</string> <string name="shared_string_waypoints">Ferilpunktar</string>
<string name="rendering_value_browse_map_name">Fletta korti</string> <string name="rendering_value_browse_map_name">Fletta korti</string>
<string name="rendering_value_car_name">Bíll</string> <string name="rendering_value_car_name">Akandi</string>
<string name="rendering_value_bicycle_name">Reiðhjól</string> <string name="rendering_value_bicycle_name">Hjólandi</string>
<string name="rendering_value_pedestrian_name">Fótgangandi</string> <string name="rendering_value_pedestrian_name">Fótgangandi</string>
<string name="keep_navigation_service">Halda</string> <string name="keep_navigation_service">Halda</string>
<string name="lang_sw">Svahílí</string> <string name="lang_sw">Svahílí</string>
@ -519,7 +519,7 @@
<string name="arrival_distance_factor_at_last">Á síðustu metrunum</string> <string name="arrival_distance_factor_at_last">Á síðustu metrunum</string>
<string name="local_openstreetmap_uploading">Sendi inn…</string> <string name="local_openstreetmap_uploading">Sendi inn…</string>
<string name="index_name_north_america">Norður-Ameríka</string> <string name="index_name_north_america">Norður-Ameríka</string>
<string name="index_name_central_america">Mið-Ameríka</string> <string name="index_name_central_america">MIð-Ameríka</string>
<string name="index_name_south_america">Suður-Ameríka</string> <string name="index_name_south_america">Suður-Ameríka</string>
<string name="index_name_europe">Evrópa</string> <string name="index_name_europe">Evrópa</string>
<string name="index_name_russia">Rússland</string> <string name="index_name_russia">Rússland</string>
@ -553,7 +553,7 @@
<string name="shared_string_release">Útgefið</string> <string name="shared_string_release">Útgefið</string>
<string name="local_index_mi_restore">Virkja</string> <string name="local_index_mi_restore">Virkja</string>
<string name="local_index_mi_backup">Gera óvirkt</string> <string name="local_index_mi_backup">Gera óvirkt</string>
<string name="local_indexes_cat_backup">Aftengt</string> <string name="local_indexes_cat_backup">Afvirkjað</string>
<string name="search_offline_clear_search">Ný leit</string> <string name="search_offline_clear_search">Ný leit</string>
<string name="tts_language_not_supported_title">Tungumálið er ekki stutt</string> <string name="tts_language_not_supported_title">Tungumálið er ekki stutt</string>
<string name="system_locale">Kerfi</string> <string name="system_locale">Kerfi</string>
@ -649,7 +649,7 @@
<string name="poi_action_add">bæta við</string> <string name="poi_action_add">bæta við</string>
<string name="poi_action_change">breyta</string> <string name="poi_action_change">breyta</string>
<string name="poi_action_delete">eyða</string> <string name="poi_action_delete">eyða</string>
<string name="poi_dialog_opening_hours">Opna</string> <string name="poi_dialog_opening_hours">Op</string>
<string name="poi_dialog_comment">Athugasemd</string> <string name="poi_dialog_comment">Athugasemd</string>
<string name="poi_dialog_reopen">Enduropna</string> <string name="poi_dialog_reopen">Enduropna</string>
<string name="default_buttons_commit">Senda</string> <string name="default_buttons_commit">Senda</string>
@ -858,7 +858,7 @@
<string name="base_world_map">Grunnkort af heiminum</string> <string name="base_world_map">Grunnkort af heiminum</string>
<string name="local_index_tile_data_expire">Rennur út (mínútur): %1$s</string> <string name="local_index_tile_data_expire">Rennur út (mínútur): %1$s</string>
<string name="edit_tilesource_expiration_time">Rennur út (mínútur)</string> <string name="edit_tilesource_expiration_time">Rennur út (mínútur)</string>
<string name="edit_tilesource_url_to_load">Slóð (URL)</string> <string name="edit_tilesource_url_to_load">Slóð</string>
<string name="distance_measurement_finish_subtrack">Byrja nýjan undirferil</string> <string name="distance_measurement_finish_subtrack">Byrja nýjan undirferil</string>
<string name="shared_location">Deild staðsetning</string> <string name="shared_location">Deild staðsetning</string>
<string name="rendering_attr_noPolygons_name">Flákar</string> <string name="rendering_attr_noPolygons_name">Flákar</string>
@ -968,7 +968,7 @@
<string name="only_show">Birta leið</string> <string name="only_show">Birta leið</string>
<string name="follow">Hefja leiðsögn</string> <string name="follow">Hefja leiðsögn</string>
<string name="mark_final_location_first">Stilltu fyrst áfangastað</string> <string name="mark_final_location_first">Stilltu fyrst áfangastað</string>
<string name="get_directions">Leiðir</string> <string name="get_directions">Leiðarlýsingar</string>
<string name="opening_hours">Opnunartímar</string> <string name="opening_hours">Opnunartímar</string>
<string name="loading_streets_buildings">Hleð inn götum/byggingum…</string> <string name="loading_streets_buildings">Hleð inn götum/byggingum…</string>
<string name="loading_postcodes">Hleð inn póstnúmerum…</string> <string name="loading_postcodes">Hleð inn póstnúmerum…</string>
@ -1023,7 +1023,7 @@
<string name="enter_country_name">Settu heiti lands</string> <string name="enter_country_name">Settu heiti lands</string>
<string name="map_viewing_item">Skoðun korts</string> <string name="map_viewing_item">Skoðun korts</string>
<string name="techical_articles_item">Tæknilegar greinar</string> <string name="techical_articles_item">Tæknilegar greinar</string>
<string name="map_legend">Kortaskýring</string> <string name="map_legend">Skýringar á korti</string>
<string name="dashboard_or_drawer_title">Stjórnborð eða valmyndastýring</string> <string name="dashboard_or_drawer_title">Stjórnborð eða valmyndastýring</string>
<string name="only_download_over_wifi">Einungis hlaða niður yfir WiFi-net</string> <string name="only_download_over_wifi">Einungis hlaða niður yfir WiFi-net</string>
<string name="missing_write_external_storage_permission">OsmAnd hefur ekki heimildir til að nota SD-kortið</string> <string name="missing_write_external_storage_permission">OsmAnd hefur ekki heimildir til að nota SD-kortið</string>
@ -1165,7 +1165,7 @@
<string name="open_street_map_login_and_pass">Notandanafn og lykilorð á OSM</string> <string name="open_street_map_login_and_pass">Notandanafn og lykilorð á OSM</string>
<string name="map_markers">Kortamerki</string> <string name="map_markers">Kortamerki</string>
<string name="map_marker">Kortamerki</string> <string name="map_marker">Kortamerki</string>
<string name="map_downloaded">Náð í kort</string> <string name="map_downloaded">Búið að ná í kort</string>
<string name="share_geo">geo:</string> <string name="share_geo">geo:</string>
<string name="record_plugin_name">Skráning ferðar</string> <string name="record_plugin_name">Skráning ferðar</string>
<string name="srtm_plugin_name">Hæðarlínur</string> <string name="srtm_plugin_name">Hæðarlínur</string>
@ -1622,7 +1622,7 @@
<string name="rotate_map_to_bearing_descr">Stefna korts miðað við skjá:</string> <string name="rotate_map_to_bearing_descr">Stefna korts miðað við skjá:</string>
<string name="fav_imported_sucessfully">Innflutningur eftirlæta tókst</string> <string name="fav_imported_sucessfully">Innflutningur eftirlæta tókst</string>
<string name="import_file_favourites">Vista gögn sem GPX-skrá eða flytja ferilpunkta inn í eftirlæti?</string> <string name="import_file_favourites">Vista gögn sem GPX-skrá eða flytja ferilpunkta inn í eftirlæti?</string>
<string name="transport_stops">biðstöðvar</string> <string name="transport_stops">stoppmerki</string>
<string name="transport_search_after">Næsta ferðaáætlun</string> <string name="transport_search_after">Næsta ferðaáætlun</string>
<string name="transport_search_before">Fyrri ferðaáætlun</string> <string name="transport_search_before">Fyrri ferðaáætlun</string>
<string name="transport_stop_to_go_out">Veldu biðstöð þar sem farið er út</string> <string name="transport_stop_to_go_out">Veldu biðstöð þar sem farið er út</string>
@ -1856,13 +1856,13 @@
<string name="routing_attr_driving_style_balance_name">Jafnvægi</string> <string name="routing_attr_driving_style_balance_name">Jafnvægi</string>
<string name="routing_attr_driving_style_safety_name">Velja frekar hjáleiðir</string> <string name="routing_attr_driving_style_safety_name">Velja frekar hjáleiðir</string>
<string name="relief_smoothness_factor_descr">Kjörið landslag: slétt eða hæðótt.</string> <string name="relief_smoothness_factor_descr">Kjörið landslag: slétt eða hæðótt.</string>
<string name="shared_string_slope">Brekka</string> <string name="shared_string_slope">Halli</string>
<string name="add_new_folder">Bæta við nýrri möppu</string> <string name="add_new_folder">Bæta við nýrri möppu</string>
<string name="points_delete_multiple_succesful">Punkti/punktum eytt.</string> <string name="points_delete_multiple_succesful">Punkti/punktum eytt.</string>
<string name="points_delete_multiple">Ertu viss um að þú viljir eyða %1$d punkt(i/um) \?</string> <string name="points_delete_multiple">Ertu viss um að þú viljir eyða %1$d punkt(i/um) \?</string>
<string name="track_points_category_name">Vegpunktar, merkisstaðir, nefnd fyrirbæri</string> <string name="track_points_category_name">Vegpunktar, merkisstaðir, nefnd fyrirbæri</string>
<string name="shared_string_gpx_track">Ferill</string> <string name="shared_string_gpx_track">Ferill</string>
<string name="max_speed">Mesti hraði</string> <string name="max_speed">Hámarkshraði</string>
<string name="average_speed">Meðalhraði</string> <string name="average_speed">Meðalhraði</string>
<string name="shared_string_time_moving">Tími á ferð</string> <string name="shared_string_time_moving">Tími á ferð</string>
<string name="shared_string_time_span">Tímarammi</string> <string name="shared_string_time_span">Tímarammi</string>
@ -2055,7 +2055,7 @@
<string name="safe_mode_description">Keyra forritið í öryggisham (notar hægvirkari Android-kóða í stað þess innbyggða).</string> <string name="safe_mode_description">Keyra forritið í öryggisham (notar hægvirkari Android-kóða í stað þess innbyggða).</string>
<string name="shared_string_add_photos">Bæta við ljósmyndum</string> <string name="shared_string_add_photos">Bæta við ljósmyndum</string>
<string name="restart_search">Byrja leit aftur</string> <string name="restart_search">Byrja leit aftur</string>
<string name="increase_search_radius">Auka radíus leitar</string> <string name="increase_search_radius">Stækka radíus leitar</string>
<string name="nothing_found">Ekkert fannst</string> <string name="nothing_found">Ekkert fannst</string>
<string name="quick_action_showhide_osmbugs_title">Birta/fela OSM-minnispunkta</string> <string name="quick_action_showhide_osmbugs_title">Birta/fela OSM-minnispunkta</string>
<string name="quick_action_osmbugs_show">Birta OSM-minnispunkta</string> <string name="quick_action_osmbugs_show">Birta OSM-minnispunkta</string>
@ -2116,7 +2116,7 @@
<string name="import_gpx_failed_descr">Gat ekki flutt skrána inn. Vinsamlegast athugið hvort OsmAnd hafi réttindi til að lesa skrána þar sem hún er.</string> <string name="import_gpx_failed_descr">Gat ekki flutt skrána inn. Vinsamlegast athugið hvort OsmAnd hafi réttindi til að lesa skrána þar sem hún er.</string>
<string name="open_mapillary">Opna Mapillary</string> <string name="open_mapillary">Opna Mapillary</string>
<string name="mapillary_widget">Mapillary græja</string> <string name="mapillary_widget">Mapillary græja</string>
<string name="mapillary">Mapillary götumyndir</string> <string name="mapillary">Mapillary</string>
<string name="mapillary_image">Mapillary-mynd</string> <string name="mapillary_image">Mapillary-mynd</string>
<string name="map_widget_ruler_control">Mælistika út frá miðju hrings</string> <string name="map_widget_ruler_control">Mælistika út frá miðju hrings</string>
<string name="shared_string_permissions">Heimildir</string> <string name="shared_string_permissions">Heimildir</string>
@ -2125,7 +2125,7 @@
<string name="hide_from_zoom_level">Fela frá og með aðdráttarstigi</string> <string name="hide_from_zoom_level">Fela frá og með aðdráttarstigi</string>
<string name="shared_string_reload">Endurnýja</string> <string name="shared_string_reload">Endurnýja</string>
<string name="mapillary_menu_descr_tile_cache">Endurlesa kortaflísar til að sjá uppfærð gögn.</string> <string name="mapillary_menu_descr_tile_cache">Endurlesa kortaflísar til að sjá uppfærð gögn.</string>
<string name="mapillary_menu_title_tile_cache">Tiglaskyndiminni</string> <string name="mapillary_menu_title_tile_cache">Kortaflísaskyndiminni</string>
<string name="wrong_user_name">Rangt notandanafn</string> <string name="wrong_user_name">Rangt notandanafn</string>
<string name="shared_string_to">Til</string> <string name="shared_string_to">Til</string>
<string name="mapillary_menu_date_from">Frá</string> <string name="mapillary_menu_date_from">Frá</string>
@ -2180,7 +2180,7 @@
<string name="by_type">Eftir gerð</string> <string name="by_type">Eftir gerð</string>
<string name="looking_for_tracks_with_waypoints">Leita að ferlum með ferilpunktum</string> <string name="looking_for_tracks_with_waypoints">Leita að ferlum með ferilpunktum</string>
<string name="shared_string_more_without_dots">Meira</string> <string name="shared_string_more_without_dots">Meira</string>
<string name="appearance_on_the_map">Framsetning á korti</string> <string name="appearance_on_the_map">Framsetning á kortinu</string>
<string name="shared_string_gpx_waypoints">Ferilpunktar í ferli</string> <string name="shared_string_gpx_waypoints">Ferilpunktar í ferli</string>
<string name="favourites_group">Flokkur eftirlæta</string> <string name="favourites_group">Flokkur eftirlæta</string>
<string name="add_group">Bæta við hópi</string> <string name="add_group">Bæta við hópi</string>
@ -2685,7 +2685,7 @@
<string name="rendering_attr_whiteWaterSports_name">Fljótasiglingar</string> <string name="rendering_attr_whiteWaterSports_name">Fljótasiglingar</string>
<string name="clear_all_intermediates">Hreinsa út alla milliáfanga</string> <string name="clear_all_intermediates">Hreinsa út alla milliáfanga</string>
<string name="select_waypoints_category_description">Þú getur bætt við öllum punktum ferilsins, eða valið aðskilda flokka.</string> <string name="select_waypoints_category_description">Þú getur bætt við öllum punktum ferilsins, eða valið aðskilda flokka.</string>
<string name="shared_string_total">Alls</string> <string name="shared_string_total">Samtals</string>
<string name="nothing_found_in_radius">Ekkert fannst:</string> <string name="nothing_found_in_radius">Ekkert fannst:</string>
<string name="waypoints_removed_from_map_markers">Punktar fjarlægðir úr kortamerkjum</string> <string name="waypoints_removed_from_map_markers">Punktar fjarlægðir úr kortamerkjum</string>
<string name="shared_string_travel_guides">Ferðalög</string> <string name="shared_string_travel_guides">Ferðalög</string>
@ -2784,7 +2784,7 @@
<string name="coord_input_add_point">Bæta við punkti</string> <string name="coord_input_add_point">Bæta við punkti</string>
<string name="coord_input_save_as_track">Vista sem feril</string> <string name="coord_input_save_as_track">Vista sem feril</string>
<string name="coord_input_save_as_track_descr">Þú bættir við %1$s punktum. Settu inn heitið á skránni og vistaðu.</string> <string name="coord_input_save_as_track_descr">Þú bættir við %1$s punktum. Settu inn heitið á skránni og vistaðu.</string>
<string name="shared_string_world">Veröld</string> <string name="shared_string_world">Heimurinn</string>
<string name="point_deleted">Punkti %1$s eytt</string> <string name="point_deleted">Punkti %1$s eytt</string>
<string name="release_3_1">"• Leiðsögn: Framvindustika lagfærð, hraðari víxl á upphafi og enda leiða <string name="release_3_1">"• Leiðsögn: Framvindustika lagfærð, hraðari víxl á upphafi og enda leiða
\n \n
@ -3438,7 +3438,7 @@
<string name="multimedia_notes_view_descr">OSM-minnispunktarnir þínir eru í %1$s.</string> <string name="multimedia_notes_view_descr">OSM-minnispunktarnir þínir eru í %1$s.</string>
<string name="video_notes">Minnispunktar myndskeiða</string> <string name="video_notes">Minnispunktar myndskeiða</string>
<string name="photo_notes">Minnispunktar ljósmynda</string> <string name="photo_notes">Minnispunktar ljósmynda</string>
<string name="accessibility_announce">Auglýsing</string> <string name="accessibility_announce">Tilkynna</string>
<string name="login_and_pass">Notandanafn og lykilorð</string> <string name="login_and_pass">Notandanafn og lykilorð</string>
<string name="select_map_icon_descr">Táknmynd birtist við hvíld.</string> <string name="select_map_icon_descr">Táknmynd birtist við hvíld.</string>
<string name="logcat_buffer_descr">Athugaðu og deildu nákvæmum atvikaskrám úr forritinu</string> <string name="logcat_buffer_descr">Athugaðu og deildu nákvæmum atvikaskrám úr forritinu</string>
@ -3452,7 +3452,7 @@
<string name="monitoring_notification">Tilkynning</string> <string name="monitoring_notification">Tilkynning</string>
<string name="monitoring_min_speed">Lágmarkshraði</string> <string name="monitoring_min_speed">Lágmarkshraði</string>
<string name="monitoring_min_accuracy">Lágmarksnákvæmni</string> <string name="monitoring_min_accuracy">Lágmarksnákvæmni</string>
<string name="monitoring_min_distance">Minnsta hreyfing</string> <string name="monitoring_min_distance">Lágmarkshreyfing</string>
<string name="reset_plugin_to_default">Frumstilla stillingar viðbótar á sjálfgefin gildi</string> <string name="reset_plugin_to_default">Frumstilla stillingar viðbótar á sjálfgefin gildi</string>
<string name="multimedia_rec_split_title">Uppskipting upptöku</string> <string name="multimedia_rec_split_title">Uppskipting upptöku</string>
<string name="multimedia_use_system_camera">Nota kerfisforrit</string> <string name="multimedia_use_system_camera">Nota kerfisforrit</string>
@ -3877,7 +3877,7 @@
<string name="shared_string_gpx_route">Skrá leið í feril</string> <string name="shared_string_gpx_route">Skrá leið í feril</string>
<string name="select_another_track">Velja annan feril</string> <string name="select_another_track">Velja annan feril</string>
<string name="save_track_to_gpx">Skrifa feril sjálfkrafa í GPX-skrá á meðan leiðsögn stendur</string> <string name="save_track_to_gpx">Skrifa feril sjálfkrafa í GPX-skrá á meðan leiðsögn stendur</string>
<string name="what_is_new">Nýjungar</string> <string name="what_is_new">Hvað er nýtt</string>
<string name="simplified_track">Einfaldaður ferill</string> <string name="simplified_track">Einfaldaður ferill</string>
<string name="simplified_track_description">Aðeins leiðarlínan verður vistuð, ferilpunktunum verður eytt.</string> <string name="simplified_track_description">Aðeins leiðarlínan verður vistuð, ferilpunktunum verður eytt.</string>
<string name="shared_string_file_name">Skráarheiti</string> <string name="shared_string_file_name">Skráarheiti</string>
@ -3905,10 +3905,10 @@
<string name="complex_routing_descr">Tveggja-þátta leiðagerð fyrir bílaleiðsögn.</string> <string name="complex_routing_descr">Tveggja-þátta leiðagerð fyrir bílaleiðsögn.</string>
<string name="use_native_pt">Innbyggð þróun almenningssamgangna</string> <string name="use_native_pt">Innbyggð þróun almenningssamgangna</string>
<string name="use_native_pt_desc">Skipta yfir í Java (öruggt) útreikning fyrir almenningssamgöngur</string> <string name="use_native_pt_desc">Skipta yfir í Java (öruggt) útreikning fyrir almenningssamgöngur</string>
<string name="perform_oauth_authorization_description">Framkvæma OAuth-innskráningu til að nota osmedit-eiginleika</string> <string name="perform_oauth_authorization_description">Skrá inn með OAuth til að nota osmedit-eiginleika</string>
<string name="perform_oauth_authorization">Skrá inn í gegnum OAuth</string> <string name="perform_oauth_authorization">Skrá inn í gegnum OAuth</string>
<string name="clear_osm_token">Hreinsa OAuth-teikn OpenStreetMap</string> <string name="clear_osm_token">Hreinsa OAuth-teikn OpenStreetMap</string>
<string name="osm_edit_logout_success">Útskráning tókst</string> <string name="osm_edit_logout_success">Skráð út</string>
<string name="number_of_gpx_files_selected_pattern">%s GPX-skrár valdar</string> <string name="number_of_gpx_files_selected_pattern">%s GPX-skrár valdar</string>
<string name="disable_recording_once_app_killed_descrp">Mun setja GPX-skráningu í bið þegar forritið er drepið (slökkt á því í gegnum skjáinn fyrir nýleg forrit - bakgrunnsvísir OsmAnd hverfur þar með úr tilkynningastiku Android-kerfisins.)</string> <string name="disable_recording_once_app_killed_descrp">Mun setja GPX-skráningu í bið þegar forritið er drepið (slökkt á því í gegnum skjáinn fyrir nýleg forrit - bakgrunnsvísir OsmAnd hverfur þar með úr tilkynningastiku Android-kerfisins.)</string>
<string name="save_global_track_interval_descr">Veldu millibil skráninga í almenna leiðarskráningu (virkjað með viðmótshlutanum \'Skráning ferðar\' á kortinu).</string> <string name="save_global_track_interval_descr">Veldu millibil skráninga í almenna leiðarskráningu (virkjað með viðmótshlutanum \'Skráning ferðar\' á kortinu).</string>
@ -3960,7 +3960,7 @@
<string name="subscription_payment_issue_title">Það er vandamál með áskriftina þína. Smelltu á hnappinn til að fara í stillingar Google Play áskriftarinnar og laga þar greiðslumátann.</string> <string name="subscription_payment_issue_title">Það er vandamál með áskriftina þína. Smelltu á hnappinn til að fara í stillingar Google Play áskriftarinnar og laga þar greiðslumátann.</string>
<string name="use_login_password">Nota notandanafn og lykilorð</string> <string name="use_login_password">Nota notandanafn og lykilorð</string>
<string name="login_open_street_map">Skrá inn á OpenStreetMap</string> <string name="login_open_street_map">Skrá inn á OpenStreetMap</string>
<string name="user_login">Innskrá</string> <string name="user_login">Skrá inn</string>
<string name="enter_text_separated">Settu inn merki aðskilin með kommu.</string> <string name="enter_text_separated">Settu inn merki aðskilin með kommu.</string>
<string name="send_files_to_openstreetmap">Senda GPX-skrá til OpenStreetMap</string> <string name="send_files_to_openstreetmap">Senda GPX-skrá til OpenStreetMap</string>
<string name="subscription_expired_title">Áskrift að OsmAnd Live er útrunnin</string> <string name="subscription_expired_title">Áskrift að OsmAnd Live er útrunnin</string>
@ -3991,4 +3991,26 @@
<string name="register_on_openplacereviews_desc">Ljósmyndir eru í boði frá opna gagnaverkefninu OpenPlaceReviews.org. Til að geta sent inn myndir þarftu að skrá þig á vefsvæðinu.</string> <string name="register_on_openplacereviews_desc">Ljósmyndir eru í boði frá opna gagnaverkefninu OpenPlaceReviews.org. Til að geta sent inn myndir þarftu að skrá þig á vefsvæðinu.</string>
<string name="osm_edit_comment_note">Gera athugasemd við OSM-minnispunkt</string> <string name="osm_edit_comment_note">Gera athugasemd við OSM-minnispunkt</string>
<string name="gpx_upload_trackable_visibility_descr">\"Rekjanlegt\" þýðir að ferillinn birtist ekki á neinum opinberum listum, en meðhöndlaðir ferilpunktar með tímamerkjum úr ferlinum (sem ekki er hægt að tengja beint við þig) munu birtast í gögnum sem eru sótt í gegnum opinbert GPS API-forritsviðmót.</string> <string name="gpx_upload_trackable_visibility_descr">\"Rekjanlegt\" þýðir að ferillinn birtist ekki á neinum opinberum listum, en meðhöndlaðir ferilpunktar með tímamerkjum úr ferlinum (sem ekki er hægt að tengja beint við þig) munu birtast í gögnum sem eru sótt í gegnum opinbert GPS API-forritsviðmót.</string>
<string name="elevation_data">Þú getur notað hæðargögn til útreikninga á hækkun/lækkun í ferðunum þínum</string>
<string name="add_photos_descr">OsmAnd birtir ljósmyndir frá ýmsum þjónustum:
\nOpenPlaceReviews - ljósmyndir POI-merkisstaða;
\nMapillary - myndefni í götuhæð;
\nWeb / Wikimedia - ljósmyndir POI-merkisstaða sem eru í gögnum OpenStreetMap.</string>
<string name="use_dev_url_descr">Skiptu yfir í að nota dev.openstreetmap.org í staðinn fyrir openstreetmap.org til að prófa innsendingu OSM-minnispunkta / POI-merkisstaða / GPX-ferla.</string>
<string name="lang_de_casual">Þýska (dagleg)</string>
<string name="use_dev_url">Nota dev.openstreetmap.org</string>
<string name="app_mode_light_aircraft">Létt flugfar</string>
<string name="add_to_mapillary">Bæta í Mapillary</string>
<string name="export_not_enough_space">Ekki er nægilegt pláss</string>
<string name="export_not_enough_space_descr">Tækið þitt er aðeins með %1$s laust. Losaðu um eitthvað minni eða afveldu atriði sem á að flytja út.</string>
<string name="add_to_opr">Bæta í OpenPlaceReviews</string>
<string name="file_size_needed_for_import">Nauðsynlegt fyrir innflutning</string>
<string name="select_items_for_import">Veldu atriði sem á að flytja inn.</string>
<string name="select_groups_for_import">Veldu hópa sem á að flytja inn.</string>
<string name="approximate_file_size">Áætluð skráarstærð</string>
<string name="shared_string_resources">Tilföng</string>
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
<string name="select_data_to_export">Veldu þau gögn sem á að flytja út í skrána.</string>
<string name="select_picture">Veldu mynd</string>
<string name="cannot_upload_image">Mistókst að senda inn mynd, reyndu aftur síðar</string>
</resources> </resources>

View file

@ -2311,7 +2311,7 @@
<string name="poi_surface_tartan">Tartan</string> <string name="poi_surface_tartan">Tartan</string>
<string name="poi_checkpoint_type">Tipo Checkpoint</string> <string name="poi_checkpoint_type">Tipo Checkpoint</string>
<string name="poi_bowls">Ciotole</string> <string name="poi_bowls">Ciotole</string>
<string name="poi_water_place_access">Accesso all\'acqua</string> <string name="poi_water_place_access">Accesso al luogo dell\'acqua</string>
<string name="poi_resort">Villaggio turistico</string> <string name="poi_resort">Villaggio turistico</string>
<string name="poi_recreation_ground">Terreno ricreativo</string> <string name="poi_recreation_ground">Terreno ricreativo</string>
<string name="poi_cuisine_donut">Ciambella</string> <string name="poi_cuisine_donut">Ciambella</string>
@ -2820,4 +2820,176 @@
<string name="poi_resource_beryl">Berillio</string> <string name="poi_resource_beryl">Berillio</string>
<string name="poi_shop_wholesale">Negozio all\'ingrosso</string> <string name="poi_shop_wholesale">Negozio all\'ingrosso</string>
<string name="poi_psv_designated">Accesso PSV: riservato</string> <string name="poi_psv_designated">Accesso PSV: riservato</string>
<string name="poi_historic_civilization_etruscan">Civiltà: etrusca (XII - VI sec. a.C.)</string>
<string name="poi_historic_civilization_nuragic">Civiltà: nuragica (XVIII sec. a.C. - II sec. d.C.)</string>
<string name="poi_historic_civilization_ancient_roman">Civiltà: antica romana (753 a.C. - 284 d.C.)</string>
<string name="poi_tomb_columbarium">Tipo: colombario</string>
<string name="poi_tomb_vault">Tipo: caveau</string>
<string name="poi_deaf_description">Descrizione per non udenti</string>
<string name="poi_product_charcoal">Prodotto: carbone</string>
<string name="poi_product_leather">Prodotto: pelle</string>
<string name="poi_product_quicklime">Prodotto: calce viva</string>
<string name="poi_kiln">Forno</string>
<string name="poi_theatre_genre_chamber_music">Musica da camera</string>
<string name="poi_theatre_genre_puppet">Burattino</string>
<string name="poi_theatre_genre_musical">Musical</string>
<string name="poi_social_facility_for_diseased">Malati</string>
<string name="poi_social_facility_for_underprivileged">Svantaggiati</string>
<string name="poi_social_facility_for_juvenile">Giovanile</string>
<string name="poi_social_facility_day_care">Assistenza diurna</string>
<string name="poi_social_facility_workshop">Officina</string>
<string name="poi_social_facility_ambulatory_care">Assistenza ambulatoriale</string>
<string name="poi_refugee_no">Rifugiati: no</string>
<string name="poi_refugee_yes">Servizi per i rifugiati</string>
<string name="poi_capacity_tents">Tende massime</string>
<string name="poi_impromptu_no">Improvviso: no</string>
<string name="poi_impromptu_yes">Improvviso: sì</string>
<string name="poi_castle_type_castrum">Tipo di castello: castrum</string>
<string name="poi_castle_type_defensive_stately">Tipo di castello: difensivo, maestoso</string>
<string name="poi_castle_type_kremlin">Tipo di castello: cremlino</string>
<string name="poi_castle_type_stately">Tipo di castello: signorile</string>
<string name="poi_clothes_fur">Pelliccia</string>
<string name="poi_surveillance_indoor">Sorveglianza: interna</string>
<string name="poi_crop_poultry">Allevamento: pollame</string>
<string name="poi_crop_hop">Coltivazione: luppolo</string>
<string name="poi_crop_barley">Coltivazione: orzo</string>
<string name="poi_crop_cereal">Coltivazione: cereali</string>
<string name="poi_crop_corn">Coltivazione: mais</string>
<string name="poi_publisher">Ufficio editoriale</string>
<string name="poi_cooperative">Ufficio cooperativo</string>
<string name="poi_consulting">Ufficio di consulenza</string>
<string name="poi_guide">Ufficio della guida</string>
<string name="poi_office_camping">Ufficio del campeggio</string>
<string name="poi_technical_monument">Monumento tecnico</string>
<string name="poi_industrial_port">Tipo: porto</string>
<string name="poi_training_language">Formazione: lingua</string>
<string name="poi_route_light_rail_ref">Binario leggero</string>
<string name="poi_route_share_taxi_ref">Condividi il taxi</string>
<string name="poi_bridge_movable_retractable">Tipo di ponte mobile: retrattile</string>
<string name="poi_bridge_movable_transporter">Tipo di ponte mobile: trasportatore</string>
<string name="poi_bridge_movable_submersible">Tipo di ponte mobile: sommergibile</string>
<string name="poi_bridge_movable_drawbridge">Tipo di ponte mobile: ponte levatoio</string>
<string name="poi_bridge_movable_bascule">Tipo di ponte mobile: basculante</string>
<string name="poi_bridge_type_movable">Tipo di ponte: mobile</string>
<string name="poi_bridge_structure_log">Struttura del ponte: trave</string>
<string name="poi_bridge_waterway">Ponte fluviale</string>
<string name="poi_tunnel_railway">Galleria ferroviaria</string>
<string name="poi_tunnel_car">Galleria stradale</string>
<string name="poi_architecture_postconstructivism">Architettura: postcostruttivismo</string>
<string name="poi_architecture_oldrussian">Architettura: oldrussian</string>
<string name="poi_architecture_art_nouveau">Architettura: art nouveau</string>
<string name="poi_architecture_umgebinde">Architettura: umgebinde</string>
<string name="poi_internet_access_type_service">Tipo di accesso a Internet: servizio</string>
<string name="poi_internet_access_type_wired">Cablata</string>
<string name="poi_shelter_type_abandoned">Tipo di riparo: abbandonato</string>
<string name="poi_shelter_type_tent">Tipo di riparo: tenda</string>
<string name="poi_shelter_type_field_shelter">Rifugio da campo</string>
<string name="poi_shelter_type_sun_shelter">Riparo dal sole</string>
<string name="poi_shelter_type_rock_shelter">Riparo in roccia</string>
<string name="poi_shelter_type_basic_hut">Capanna di base</string>
<string name="poi_shelter_type_lean_to">Capannone</string>
<string name="poi_palm">Palma</string>
<string name="poi_beach_shingle">Ghiaia</string>
<string name="poi_wetland_mud">Fango</string>
<string name="poi_wetland_tidalflat">Marea piatta</string>
<string name="poi_wetland_saltern">Salina</string>
<string name="poi_wetland_marsh">Palude</string>
<string name="poi_wetland_bog">Palude</string>
<string name="poi_resource_tuff">Tufo</string>
<string name="poi_resource_slate">Ardesia</string>
<string name="poi_resource_slate_iron_ore_copper">Ardesia;minerale di ferro;rame</string>
<string name="poi_resource_sandstone">Arenaria</string>
<string name="poi_resource_rutile">Rutilo</string>
<string name="poi_resource_ruby">Rubino</string>
<string name="poi_resource_iron_ore">Minerale di ferro</string>
<string name="poi_resource_clay">Argilla</string>
<string name="poi_resource_chromite">Cromite</string>
<string name="poi_resource_bismuth">Bismuto</string>
<string name="poi_resource_bauxite">Bauxite</string>
<string name="poi_resource_barite">Barite</string>
<string name="poi_resource_antimony">Antimonio</string>
<string name="poi_memorial_fassade_decoration">Decorazione della facciata</string>
<string name="poi_memorial_cross">A forma di croce</string>
<string name="poi_memorial_blue_plaque">Targa blu</string>
<string name="poi_memorial_bust">Busto</string>
<string name="poi_vending_toll">Pedaggio automatico</string>
<string name="poi_vending_parcel_mail_in">Invio di pacchi</string>
<string name="poi_vending_parcel_pickup_mail_in">Ritiro dei pacchi e consegna della posta</string>
<string name="poi_diet_pescetarian_yes">Pescetariano</string>
<string name="poi_diet_halal_no">Dieta halal: no</string>
<string name="poi_diet_halal_yes">Halal</string>
<string name="poi_diet_halal_only">Solo halal</string>
<string name="poi_diet_halal_filter_yes">Halal</string>
<string name="poi_events_venue">Sede degli eventi</string>
<string name="poi_payment_ep_cash_no">Bancomat (Geldkarte) non accettata</string>
<string name="poi_payment_ep_cash_yes">Bancomat (Geldkarte)</string>
<string name="poi_payment_account_cards_no">Non si accettano carte di credito</string>
<string name="poi_aerialway_bubble_no">Nessuna bolla</string>
<string name="poi_aerialway_bubble_yes">Bolla</string>
<string name="poi_piste_grooming_scooter">Scooter</string>
<string name="poi_logging">Registrazione</string>
<string name="poi_horse_riding">Equitazione</string>
<string name="poi_water_characteristic_mud">Fango</string>
<string name="poi_source_biomass">Fonte di energia: biomassa</string>
<string name="poi_deadlock">Deadlock</string>
<string name="poi_animal_shelter_wildlife">Fauna selvatica</string>
<string name="poi_trees_rubber">Gomma</string>
<string name="poi_trees_meadow_orchard">Frutteto di prato</string>
<string name="poi_leaf_type_broadleaved">Latifoglie</string>
<string name="poi_bicycle_parking_shed">Capannone</string>
<string name="poi_bicycle_parking_rack">Rack</string>
<string name="poi_bicycle_parking_wall_loops">Passanti a parete</string>
<string name="poi_bicycle_parking_stands">Stand</string>
<string name="poi_content_fodder">Contenuto: foraggio</string>
<string name="poi_content_crop">Contenuto: raccolto</string>
<string name="poi_content_wastewater">Contenuto: acque reflue</string>
<string name="poi_content_sewage">Contenuto: liquame</string>
<string name="poi_content_manure">Contenuto: letame</string>
<string name="poi_content_slurry">Contenuto: liquame</string>
<string name="poi_wiki_lang_mn">Wiki mongolo</string>
<string name="poi_wiki_lang_an">Wiki aragonese</string>
<string name="poi_wiki_lang_my">Wiki birmano</string>
<string name="poi_wiki_lang_lmo">Wiki lombardo</string>
<string name="poi_wiki_lang_pnb">Wiki punjabi</string>
<string name="poi_wiki_lang_sco">Wiki scozzese</string>
<string name="poi_wiki_lang_jv">Wiki giavanese</string>
<string name="poi_wiki_lang_tt">Wiki tartaro</string>
<string name="poi_wiki_lang_mg">Wiki malgascio</string>
<string name="poi_wiki_lang_oc">Wiki occitano</string>
<string name="poi_wiki_lang_ur">Wiki urdu</string>
<string name="poi_wiki_lang_ce">Wiki ceceno</string>
<string name="poi_wiki_lang_uz">Wiki uzbeko</string>
<string name="poi_wiki_lang_kk">Wiki kazako</string>
<string name="poi_wiki_lang_ta">Wiki tamil</string>
<string name="poi_wiki_lang_sh">Wiki serbo-croato</string>
<string name="poi_wiki_lang_os">Wiki osseto</string>
<string name="poi_wiki_lang_nv">Wiki navajo</string>
<string name="poi_wiki_lang_nds">Wiki basso sassone</string>
<string name="poi_wiki_lang_ku">Wiki curdo</string>
<string name="poi_wiki_lang_fa">Wiki farsi</string>
<string name="poi_wiki_lang_eu">Wiki basco</string>
<string name="poi_wiki_lang_eo">Wiki esperanto</string>
<string name="poi_wiki_lang_cy">Wiki gallese</string>
<string name="poi_wiki_lang_bs">Wiki bosniaco</string>
<string name="poi_wiki_lang_bpy">Wiki bishnupriya</string>
<string name="poi_wiki_lang_az">Wiki azero</string>
<string name="poi_wiki_lang_als">Wiki alsaziano</string>
<string name="poi_signal_station_warning">Stazione di segnale, avvertimento</string>
<string name="poi_signal_station_traffic">Stazione di segnale, traffico</string>
<string name="poi_radio_station">Stazione radio, seamark</string>
<string name="poi_pile">Mucchio</string>
<string name="poi_seamark_dyke">Diga di Seamark</string>
<string name="poi_buoy_installation">Boa di installazione</string>
<string name="poi_recycling_small_electrical_appliances">Piccoli elettrodomestici</string>
<string name="poi_diplomatic_services_citizen_services_filter">Servizi per il cittadino</string>
<string name="poi_diplomatic_services_immigrant_visas_filter">Visti per immigrati</string>
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Visti per non immigrati</string>
<string name="poi_liaison_filter">Collegamento</string>
<string name="poi_consulate_filter">Consolato</string>
<string name="poi_embassy_filter">Ambasciata</string>
<string name="poi_departures_board">Tabellone delle partenze</string>
<string name="poi_drinking_water_refill">Ricarica di acqua potabile</string>
<string name="poi_traffic_signals_arrow">Freccia</string>
<string name="poi_traffic_signals_vibration">Vibrazione</string>
<string name="poi_fire_hydrant_pressure_filter">Pressione</string>
</resources> </resources>

View file

@ -3928,7 +3928,7 @@ POIの更新は利用できません</string>
<string name="message_you_need_add_two_points_to_show_graphs">少なくとも2つの地点を追加する必要があります</string> <string name="message_you_need_add_two_points_to_show_graphs">少なくとも2つの地点を追加する必要があります</string>
<string name="login_open_street_map">OpenStreetMapにログイン</string> <string name="login_open_street_map">OpenStreetMapにログイン</string>
<string name="login_open_street_map_org">OpenStreetMap.orgにログイン</string> <string name="login_open_street_map_org">OpenStreetMap.orgにログイン</string>
<string name="sign_in_with_open_street_map">OpenStreetMapに登録</string> <string name="sign_in_with_open_street_map">OpenStreetMapにOAuthログイン</string>
<string name="open_street_map_login_mode">変更をアップロードするには、ログインする必要があります。 <string name="open_street_map_login_mode">変更をアップロードするには、ログインする必要があります。
\n \n
\n安全なOAuth方式を使用してログイン、または通常のユーザー名とパスワード方式が選択できます。</string> \n安全なOAuth方式を使用してログイン、または通常のユーザー名とパスワード方式が選択できます。</string>
@ -3949,4 +3949,6 @@ POIの更新は利用できません</string>
<string name="login_account">アカウント</string> <string name="login_account">アカウント</string>
<string name="message_graph_will_be_available_after_recalculation">ルートが再計算されるのを待ちます。 <string name="message_graph_will_be_available_after_recalculation">ルートが再計算されるのを待ちます。
\nグラフは再計算後に利用できるようになります。</string> \nグラフは再計算後に利用できるようになります。</string>
<string name="use_dev_url_descr">OSM通知/ POI / GPXのアップロードをテストする場合、openstreetmap.orgではなくdev.openstreetmap.orgを使用するよう切り替えます。</string>
<string name="use_dev_url">dev.openstreetmap.orgを使用</string>
</resources> </resources>

View file

@ -3880,4 +3880,7 @@
<string name="poi_liaison_filter">Ligação</string> <string name="poi_liaison_filter">Ligação</string>
<string name="poi_consulate_filter">Consulado</string> <string name="poi_consulate_filter">Consulado</string>
<string name="poi_embassy_filter">Embaixada</string> <string name="poi_embassy_filter">Embaixada</string>
<string name="poi_siren">Sereia</string>
<string name="poi_nurse">Enfermaria</string>
<string name="poi_mobile_money_agent">Agente de dinheiro móvel</string>
</resources> </resources>

View file

@ -3954,7 +3954,7 @@
<string name="login_open_street_map_org">Вход в OpenStreetMap.org</string> <string name="login_open_street_map_org">Вход в OpenStreetMap.org</string>
<string name="sign_in_with_open_street_map">Войти через OpenStreetMap</string> <string name="sign_in_with_open_street_map">Войти через OpenStreetMap</string>
<string name="login_account">Аккаунт</string> <string name="login_account">Аккаунт</string>
<string name="user_login">Пользователь</string> <string name="user_login">Авторизоваться</string>
<string name="manage_subscription">Управление подпиской</string> <string name="manage_subscription">Управление подпиской</string>
<string name="subscription_expired_title">Срок действия подписки OsmAnd Live истёк</string> <string name="subscription_expired_title">Срок действия подписки OsmAnd Live истёк</string>
<string name="subscription_paused_title">Подписка OsmAnd Live была приостановлена</string> <string name="subscription_paused_title">Подписка OsmAnd Live была приостановлена</string>
@ -3993,4 +3993,5 @@
<string name="select_picture">Выбор изображения</string> <string name="select_picture">Выбор изображения</string>
<string name="app_mode_kayak">Каяк</string> <string name="app_mode_kayak">Каяк</string>
<string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string> <string name="ltr_or_rtl_combine_via_star">%1$s * %2$s</string>
<string name="lang_de_casual">Немецкий (повседневный)</string>
</resources> </resources>

View file

@ -3876,4 +3876,7 @@
<string name="poi_diplomatic_services_immigrant_visas_filter">Vistos pro immigrantes</string> <string name="poi_diplomatic_services_immigrant_visas_filter">Vistos pro immigrantes</string>
<string name="poi_diplomatic_services_non_immigrant_visas_filter">Vistos pro no immigrantes</string> <string name="poi_diplomatic_services_non_immigrant_visas_filter">Vistos pro no immigrantes</string>
<string name="poi_liaison_filter">Ufìtziu de collegamentu</string> <string name="poi_liaison_filter">Ufìtziu de collegamentu</string>
<string name="poi_siren">Sirena</string>
<string name="poi_nurse">Infermieri</string>
<string name="poi_mobile_money_agent">Agente de denaru mòbile</string>
</resources> </resources>

View file

@ -3868,4 +3868,7 @@
<string name="poi_diplomatic_embassy">Посольство</string> <string name="poi_diplomatic_embassy">Посольство</string>
<string name="poi_consulate_filter">Консульство</string> <string name="poi_consulate_filter">Консульство</string>
<string name="poi_embassy_filter">Посольство</string> <string name="poi_embassy_filter">Посольство</string>
<string name="poi_siren">Сирена</string>
<string name="poi_nurse">Медсестра</string>
<string name="poi_mobile_money_agent">Мобільний грошовий агент</string>
</resources> </resources>

View file

@ -3879,4 +3879,7 @@
<string name="poi_liaison_filter">聯絡處</string> <string name="poi_liaison_filter">聯絡處</string>
<string name="poi_consulate_filter">領事館</string> <string name="poi_consulate_filter">領事館</string>
<string name="poi_embassy_filter">大使館</string> <string name="poi_embassy_filter">大使館</string>
<string name="poi_siren">警報器</string>
<string name="poi_nurse">護理師</string>
<string name="poi_mobile_money_agent">行動貨幣代理商</string>
</resources> </resources>

View file

@ -477,7 +477,8 @@
<color name="switch_button_active_stroke_dark">#80D28521</color> <color name="switch_button_active_stroke_dark">#80D28521</color>
<color name="empty_hint_bg">#80000000</color> <color name="empty_hint_bg">#80000000</color>
<color name="input_layout_bg_color">#4DCCCCCC</color> <color name="input_layout_bg_color">#4DCCCCCC</color>
<color name="text_input_background_light">#14000000</color> <color name="text_input_background_light">#4DCCCCCC</color>
<color name="text_input_background_dark">#0DFFFFFF</color> <color name="text_input_background_dark">#1AFFFFFF</color>
<color name="mtrl_textinput_default_box_stroke_color">#67727272</color>
</resources> </resources>

View file

@ -2659,7 +2659,7 @@
<string name="files_limit">%1$d files left</string> <string name="files_limit">%1$d files left</string>
<string name="available_downloads_left">%1$d files left to download</string> <string name="available_downloads_left">%1$d files left to download</string>
<string name="install_paid">Full version</string> <string name="install_paid">Full version</string>
<string name="cancel_route">Dismiss route</string> <string name="cancel_route">Dismiss route?</string>
<string name="cancel_navigation">Stop navigation</string> <string name="cancel_navigation">Stop navigation</string>
<string name="clear_destination">Clear destination</string> <string name="clear_destination">Clear destination</string>
<string name="download_using_mobile_internet">Not connected to Wi-Fi. Use current connection to the Internet to download?</string> <string name="download_using_mobile_internet">Not connected to Wi-Fi. Use current connection to the Internet to download?</string>

View file

@ -19,7 +19,6 @@ import android.view.KeyEvent;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@ -55,8 +54,6 @@ import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.GPXDatabase.GpxDataItem; import net.osmand.plus.GPXDatabase.GpxDataItem;
import net.osmand.plus.GpxSelectionHelper; import net.osmand.plus.GpxSelectionHelper;
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile; import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
import net.osmand.plus.mapmarkers.MapMarkersHelper;
import net.osmand.plus.mapmarkers.MapMarker;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.SQLiteTileSource; import net.osmand.plus.SQLiteTileSource;
@ -68,6 +65,8 @@ import net.osmand.plus.helpers.ExternalApiHelper;
import net.osmand.plus.helpers.LockHelper; import net.osmand.plus.helpers.LockHelper;
import net.osmand.plus.mapcontextmenu.MapContextMenu; import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.other.IContextMenuButtonListener; import net.osmand.plus.mapcontextmenu.other.IContextMenuButtonListener;
import net.osmand.plus.mapmarkers.MapMarker;
import net.osmand.plus.mapmarkers.MapMarkersHelper;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.myplaces.TrackBitmapDrawer; import net.osmand.plus.myplaces.TrackBitmapDrawer;
import net.osmand.plus.quickaction.QuickAction; import net.osmand.plus.quickaction.QuickAction;
@ -79,11 +78,11 @@ import net.osmand.plus.routing.RouteDirectionInfo;
import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.routing.VoiceRouter; import net.osmand.plus.routing.VoiceRouter;
import net.osmand.plus.settings.backend.ApplicationMode; import net.osmand.plus.settings.backend.ApplicationMode;
import net.osmand.plus.settings.backend.ExportSettingsType;
import net.osmand.plus.settings.backend.OsmAndAppCustomization; import net.osmand.plus.settings.backend.OsmAndAppCustomization;
import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.settings.backend.backup.ProfileSettingsItem; import net.osmand.plus.settings.backend.backup.ProfileSettingsItem;
import net.osmand.plus.settings.backend.backup.SettingsHelper; import net.osmand.plus.settings.backend.backup.SettingsHelper;
import net.osmand.plus.settings.backend.ExportSettingsType;
import net.osmand.plus.settings.backend.backup.SettingsItem; import net.osmand.plus.settings.backend.backup.SettingsItem;
import net.osmand.plus.views.OsmandMapLayer; import net.osmand.plus.views.OsmandMapLayer;
import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.OsmandMapTileView;
@ -598,8 +597,7 @@ public class OsmandAidlApi {
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
boolean force = intent.getBooleanExtra(AIDL_FORCE, true); boolean force = intent.getBooleanExtra(AIDL_FORCE, true);
if (routingHelper.isFollowingMode() && !force) { if (routingHelper.isFollowingMode() && !force) {
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {
@ -665,8 +663,7 @@ public class OsmandAidlApi {
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
boolean force = intent.getBooleanExtra(AIDL_FORCE, true); boolean force = intent.getBooleanExtra(AIDL_FORCE, true);
if (routingHelper.isFollowingMode() && !force) { if (routingHelper.isFollowingMode() && !force) {
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {

View file

@ -3,6 +3,7 @@ package net.osmand.plus.activities;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.net.Uri; import android.net.Uri;
@ -39,8 +40,6 @@ import net.osmand.plus.ContextMenuAdapter;
import net.osmand.plus.ContextMenuAdapter.ItemClickListener; import net.osmand.plus.ContextMenuAdapter.ItemClickListener;
import net.osmand.plus.ContextMenuItem; import net.osmand.plus.ContextMenuItem;
import net.osmand.plus.ContextMenuItem.ItemBuilder; import net.osmand.plus.ContextMenuItem.ItemBuilder;
import net.osmand.plus.mapmarkers.MapMarkersHelper;
import net.osmand.plus.mapmarkers.MapMarker;
import net.osmand.plus.OsmAndLocationProvider; import net.osmand.plus.OsmAndLocationProvider;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
@ -56,11 +55,14 @@ import net.osmand.plus.download.IndexItem;
import net.osmand.plus.liveupdates.OsmLiveActivity; import net.osmand.plus.liveupdates.OsmLiveActivity;
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment; import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment;
import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener; import net.osmand.plus.mapcontextmenu.AdditionalActionsBottomSheetDialogFragment.ContextMenuItemClickListener;
import net.osmand.plus.mapmarkers.MapMarker;
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment; import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
import net.osmand.plus.mapmarkers.MapMarkersHelper;
import net.osmand.plus.mapmarkers.MarkersPlanRouteContext; import net.osmand.plus.mapmarkers.MarkersPlanRouteContext;
import net.osmand.plus.measurementtool.MeasurementToolFragment; import net.osmand.plus.measurementtool.MeasurementToolFragment;
import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet; import net.osmand.plus.measurementtool.StartPlanRouteBottomSheet;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin; import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.osmedit.dialogs.DismissRouteBottomSheetFragment;
import net.osmand.plus.profiles.RoutingProfileDataObject; import net.osmand.plus.profiles.RoutingProfileDataObject;
import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu; import net.osmand.plus.routepreparationmenu.MapRouteInfoMenu;
import net.osmand.plus.routepreparationmenu.WaypointsFragment; import net.osmand.plus.routepreparationmenu.WaypointsFragment;
@ -75,7 +77,6 @@ import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.layers.MapControlsLayer; import net.osmand.plus.views.layers.MapControlsLayer;
import net.osmand.plus.wikipedia.WikipediaDialogFragment; import net.osmand.plus.wikipedia.WikipediaDialogFragment;
import net.osmand.plus.wikivoyage.WikivoyageWelcomeDialogFragment; import net.osmand.plus.wikivoyage.WikivoyageWelcomeDialogFragment;
import net.osmand.plus.wikivoyage.data.TravelDbHelper;
import net.osmand.plus.wikivoyage.data.TravelHelper; import net.osmand.plus.wikivoyage.data.TravelHelper;
import net.osmand.plus.wikivoyage.explore.WikivoyageExploreActivity; import net.osmand.plus.wikivoyage.explore.WikivoyageExploreActivity;
import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter;
@ -1122,26 +1123,12 @@ public class MapActivityActions implements DialogProvider {
} }
} }
public AlertDialog stopNavigationActionConfirm() { public void stopNavigationActionConfirm(@Nullable OnDismissListener listener) {
return stopNavigationActionConfirm(null); stopNavigationActionConfirm(listener, null);
} }
public AlertDialog stopNavigationActionConfirm(final Runnable onStopAction) { public void stopNavigationActionConfirm(@Nullable OnDismissListener listener, @Nullable Runnable onStopAction) {
AlertDialog.Builder builder = new AlertDialog.Builder(mapActivity); DismissRouteBottomSheetFragment.showInstance(mapActivity.getSupportFragmentManager(), listener, onStopAction);
// Stop the navigation
builder.setTitle(getString(R.string.cancel_route));
builder.setMessage(getString(R.string.stop_routing_confirm));
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
stopNavigationWithoutConfirm();
if (onStopAction != null) {
onStopAction.run();
}
}
});
builder.setNegativeButton(R.string.shared_string_no, null);
return builder.show();
} }
public void whereAmIDialog() { public void whereAmIDialog() {

View file

@ -315,7 +315,7 @@ public abstract class MenuBottomSheetDialogFragment extends BottomSheetDialogFra
} }
} }
boolean useVerticalButtons() { protected boolean useVerticalButtons() {
Activity activity = requireActivity(); Activity activity = requireActivity();
int rightBottomButtonTextId = getRightBottomButtonTextId(); int rightBottomButtonTextId = getRightBottomButtonTextId();
if (getDismissButtonTextId() != DEFAULT_VALUE && rightBottomButtonTextId != DEFAULT_VALUE) { if (getDismissButtonTextId() != DEFAULT_VALUE && rightBottomButtonTextId != DEFAULT_VALUE) {

View file

@ -11,7 +11,6 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import net.osmand.plus.R; import net.osmand.plus.R;
@ -85,14 +84,13 @@ public class DashNavigationFragment extends DashBaseFragment {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
AlertDialog dlg = map.getMapActions().stopNavigationActionConfirm(); map.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {
setupNavigation(); setupNavigation();
DashWaypointsFragment f = dashboard.getFragmentByClass(DashWaypointsFragment.class); DashWaypointsFragment f = dashboard.getFragmentByClass(DashWaypointsFragment.class);
if(f != null) { if (f != null) {
f.onOpenDash(); f.onOpenDash();
} }
} }

View file

@ -11,7 +11,6 @@ import android.os.ParcelFileDescriptor;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@ -293,8 +292,7 @@ public class ExternalApiHelper {
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
if (routingHelper.isFollowingMode() && !force) { if (routingHelper.isFollowingMode() && !force) {
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {
@ -353,8 +351,7 @@ public class ExternalApiHelper {
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
if (routingHelper.isFollowingMode() && !force) { if (routingHelper.isFollowingMode() && !force) {
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {
@ -667,8 +664,7 @@ public class ExternalApiHelper {
} }
final RoutingHelper routingHelper = app.getRoutingHelper(); final RoutingHelper routingHelper = app.getRoutingHelper();
if (routingHelper.isFollowingMode() && !force) { if (routingHelper.isFollowingMode() && !force) {
AlertDialog dlg = mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(new DialogInterface.OnDismissListener() {
dlg.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onDismiss(DialogInterface dialog) { public void onDismiss(DialogInterface dialog) {

View file

@ -94,7 +94,7 @@ public class LoginBottomSheetFragment extends MenuBottomSheetDialogFragment impl
if (!(getActivity() instanceof MapActivity) && fragment instanceof OsmAuthorizationListener) { if (!(getActivity() instanceof MapActivity) && fragment instanceof OsmAuthorizationListener) {
osmOAuthHelper.addListener((OsmAuthorizationListener) fragment); osmOAuthHelper.addListener((OsmAuthorizationListener) fragment);
} }
osmOAuthHelper.startOAuth((ViewGroup) view); osmOAuthHelper.startOAuth((ViewGroup) view, nightMode);
} }
} }

View file

@ -888,7 +888,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route
app.getTargetPointsHelper().updateRouteAndRefresh(true); app.getTargetPointsHelper().updateRouteAndRefresh(true);
app.getRoutingHelper().recalculateRouteDueToSettingsChange(); app.getRoutingHelper().recalculateRouteDueToSettingsChange();
} else { } else {
mapActivity.getMapActions().stopNavigationActionConfirm(new Runnable() { mapActivity.getMapActions().stopNavigationActionConfirm(null , new Runnable() {
@Override @Override
public void run() { public void run() {
MapActivity mapActivity = getMapActivity(); MapActivity mapActivity = getMapActivity();

View file

@ -1,7 +1,6 @@
package net.osmand.plus.osmedit; package net.osmand.plus.osmedit;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -12,8 +11,6 @@ import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R; import net.osmand.plus.R;
@ -22,19 +19,23 @@ import net.osmand.plus.dashboard.DashBaseFragment;
import net.osmand.plus.dashboard.DashboardOnMap; import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.dashboard.tools.DashFragmentData; import net.osmand.plus.dashboard.tools.DashFragmentData;
import net.osmand.plus.dialogs.ProgressDialogFragment; import net.osmand.plus.dialogs.ProgressDialogFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment; import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.PoiUploaderType; import net.osmand.plus.osmedit.dialogs.ProgressDialogPoiUploader;
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static net.osmand.plus.osmedit.oauth.OsmOAuthHelper.*;
/** /**
* Created by Denis * Created by Denis
* on 20.01.2015. * on 20.01.2015.
*/ */
public class DashOsmEditsFragment extends DashBaseFragment public class DashOsmEditsFragment extends DashBaseFragment
implements SendPoiDialogFragment.ProgressDialogPoiUploader { implements ProgressDialogPoiUploader, OsmAuthorizationListener {
public static final String TAG = "DASH_OSM_EDITS_FRAGMENT"; public static final String TAG = "DASH_OSM_EDITS_FRAGMENT";
public static final int TITLE_ID = R.string.osm_settings; public static final int TITLE_ID = R.string.osm_settings;
@ -51,6 +52,7 @@ public class DashOsmEditsFragment extends DashBaseFragment
new DashFragmentData(TAG, DashOsmEditsFragment.class, SHOULD_SHOW_FUNCTION, 130, ROW_NUMBER_TAG); new DashFragmentData(TAG, DashOsmEditsFragment.class, SHOULD_SHOW_FUNCTION, 130, ROW_NUMBER_TAG);
OsmEditingPlugin plugin; OsmEditingPlugin plugin;
private OsmPoint selectedPoint;
@Override @Override
public View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -72,7 +74,6 @@ public class DashOsmEditsFragment extends DashBaseFragment
return view; return view;
} }
@Override @Override
public void onOpenDash() { public void onOpenDash() {
if (plugin == null) { if (plugin == null) {
@ -114,10 +115,15 @@ public class DashOsmEditsFragment extends DashBaseFragment
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (point.getGroup() == OsmPoint.Group.POI) { if (point.getGroup() == OsmPoint.Group.POI) {
SendPoiDialogFragment.createInstance(new OsmPoint[] {point}, PoiUploaderType.FRAGMENT) selectedPoint = point;
.show(getChildFragmentManager(), "SendPoiDialogFragment"); if (getMyApplication().getOsmOAuthHelper().isLogged()) {
SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{point});
} else {
LoginBottomSheetFragment.showInstance(getActivity().getSupportFragmentManager(),
DashOsmEditsFragment.this);
}
} else { } else {
uploadItem(point); SendOsmNoteBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{point});
} }
} }
}); });
@ -141,18 +147,9 @@ public class DashOsmEditsFragment extends DashBaseFragment
} }
} }
// TODO: 9/7/15 Redesign osm notes. @Override
private void uploadItem(final OsmPoint point) { public void authorizationCompleted() {
AlertDialog.Builder b = new AlertDialog.Builder(getActivity()); SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), new OsmPoint[]{selectedPoint});
b.setMessage(getString(R.string.local_osm_changes_upload_all_confirm, 1));
b.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
showProgressDialog(new OsmPoint[] {point}, false, false);
}
});
b.setNegativeButton(R.string.shared_string_cancel, null);
b.show();
} }
@Override @Override
@ -215,5 +212,4 @@ public class DashOsmEditsFragment extends DashBaseFragment
} }
} }
} }
} }

View file

@ -35,11 +35,11 @@ public class HandleOsmNoteAsyncTask extends AsyncTask<Void, Void, OsmBugResult>
@Override @Override
protected OsmBugResult doInBackground(Void... params) { protected OsmBugResult doInBackground(Void... params) {
if (bug != null) { if (bug != null) {
OsmNotesPoint pnt = new OsmNotesPoint(); OsmNotesPoint point = new OsmNotesPoint();
pnt.setId(bug.getId()); point.setId(bug.getId());
pnt.setLatitude(bug.getLatitude()); point.setLatitude(bug.getLatitude());
pnt.setLongitude(bug.getLongitude()); point.setLongitude(bug.getLongitude());
return osmbugsUtil.commit(pnt, text, action); return osmbugsUtil.commit(point, text, action);
} else if (point != null) { } else if (point != null) {
osmbugsUtil = local; osmbugsUtil = local;
return osmbugsUtil.modify(point, text); return osmbugsUtil.modify(point, text);

View file

@ -1,19 +1,14 @@
package net.osmand.plus.osmedit; package net.osmand.plus.osmedit;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.PointF; import android.graphics.PointF;
import android.util.Xml; import android.util.Xml;
import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.data.FavouritePoint.BackgroundType; import net.osmand.data.FavouritePoint.BackgroundType;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
@ -25,6 +20,7 @@ import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.base.PointImageDrawable; import net.osmand.plus.base.PointImageDrawable;
import net.osmand.plus.osmedit.dialogs.BugBottomSheetDialog; import net.osmand.plus.osmedit.dialogs.BugBottomSheetDialog;
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
@ -32,7 +28,6 @@ import net.osmand.plus.osmedit.OsmPoint.Action;
import net.osmand.plus.views.layers.ContextMenuLayer.IContextMenuProvider; import net.osmand.plus.views.layers.ContextMenuLayer.IContextMenuProvider;
import net.osmand.plus.views.OsmandMapLayer; import net.osmand.plus.views.OsmandMapLayer;
import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParser;
@ -362,43 +357,18 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
} }
private void createBugDialog(final boolean offline, String text, int titleTextId, int posButtonTextId, private void createBugDialog(final boolean offline, String text, int titleTextId, int posButtonTextId,
final Action action, final OpenStreetNote bug, final OsmNotesPoint point) { final Action action, final OpenStreetNote bug, OsmNotesPoint point) {
@SuppressLint("InflateParams") final View view = LayoutInflater.from(activity).inflate(R.layout.open_bug, null);
if (offline) { if (offline) {
activity.getContextMenu().close(); activity.getContextMenu().close();
BugBottomSheetDialog.showInstance(activity.getSupportFragmentManager(), getOsmbugsUtil(bug), local, text, BugBottomSheetDialog.showInstance(activity.getSupportFragmentManager(), getOsmbugsUtil(bug), local, text,
titleTextId, posButtonTextId, action, bug, point, getHandleBugListener()); titleTextId, posButtonTextId, action, bug, point, getHandleBugListener());
return;
} else { } else {
((EditText) view.findViewById(R.id.user_name_field)).setText(getUserName()); OsmNotesPoint notesPoint = new OsmNotesPoint();
((EditText) view.findViewById(R.id.password_field)).setText( notesPoint.setAction(action);
activity.getMyApplication().getSettings().USER_PASSWORD.get()); notesPoint.setId(bug.getId());
} notesPoint.setLatitude(bug.getLatitude());
if (!Algorithms.isEmpty(text)) { notesPoint.setLongitude(bug.getLongitude());
((EditText) view.findViewById(R.id.message_field)).setText(text); SendOsmNoteBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), new OsmPoint[]{notesPoint});
}
view.findViewById(R.id.message_field).requestFocus();
AndroidUtils.softKeyboardDelayed(activity, view.findViewById(R.id.message_field));
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.shared_string_commit);
builder.setView(view);
builder.setPositiveButton(posButtonTextId, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
String text = offline ? getMessageText(view) : getTextAndUpdateUserPwd(view);
activity.getContextMenu().close();
handleBug(text, bug, action, point);
}
});
builder.setNegativeButton(R.string.shared_string_cancel, null);
builder.create().show();
}
private void handleBug(String text, OpenStreetNote bug, Action action, OsmNotesPoint point) {
if (bug != null || point != null) {
executeTaskInBackground(new HandleOsmNoteAsyncTask(getOsmbugsUtil(bug), local, bug, point, text, action,
getHandleBugListener()));
} }
} }
@ -453,19 +423,6 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
}; };
} }
private String getUserName() {
return ((OsmandApplication) activity.getApplication()).getSettings().USER_NAME.get();
}
private String getTextAndUpdateUserPwd(final View view) {
String text = getMessageText(view);
String author = ((EditText) view.findViewById(R.id.user_name_field)).getText().toString();
String pwd = ((EditText) view.findViewById(R.id.password_field)).getText().toString();
((OsmandApplication) OsmBugsLayer.this.activity.getApplication()).getSettings().USER_NAME.set(author);
((OsmandApplication) OsmBugsLayer.this.activity.getApplication()).getSettings().USER_PASSWORD.set(pwd);
return text;
}
private String getMessageText(final View view) { private String getMessageText(final View view) {
return ((EditText) view.findViewById(R.id.message_field)).getText().toString(); return ((EditText) view.findViewById(R.id.message_field)).getText().toString();
} }

View file

@ -58,10 +58,9 @@ import net.osmand.plus.osmedit.FileTypeBottomSheetDialogFragment.FileTypeFragmen
import net.osmand.plus.osmedit.OpenstreetmapLocalUtil.OnNodeCommittedListener; import net.osmand.plus.osmedit.OpenstreetmapLocalUtil.OnNodeCommittedListener;
import net.osmand.plus.osmedit.OsmEditOptionsBottomSheetDialogFragment.OsmEditOptionsFragmentListener; import net.osmand.plus.osmedit.OsmEditOptionsBottomSheetDialogFragment.OsmEditOptionsFragmentListener;
import net.osmand.plus.osmedit.OsmPoint.Group; import net.osmand.plus.osmedit.OsmPoint.Group;
import net.osmand.plus.osmedit.dialogs.ProgressDialogPoiUploader;
import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment; import net.osmand.plus.osmedit.dialogs.SendOsmNoteBottomSheetFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment; import net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.ProgressDialogPoiUploader;
import net.osmand.plus.osmedit.oauth.OsmOAuthAuthorizationAdapter;
import net.osmand.plus.osmedit.oauth.OsmOAuthHelper.OsmAuthorizationListener; import net.osmand.plus.osmedit.oauth.OsmOAuthHelper.OsmAuthorizationListener;
import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.util.Algorithms; import net.osmand.util.Algorithms;
@ -633,14 +632,8 @@ public class OsmEditsFragment extends OsmAndListFragment implements ProgressDial
private void uploadItems(final OsmPoint[] points) { private void uploadItems(final OsmPoint[] points) {
FragmentActivity activity = getActivity(); FragmentActivity activity = getActivity();
if (activity != null) { if (activity != null) {
OsmandApplication app = getMyApplication();
OsmandSettings settings = app.getSettings();
OsmOAuthAuthorizationAdapter authorizationAdapter = app.getOsmOAuthHelper().getAuthorizationAdapter();
boolean isLogged = authorizationAdapter.isValidToken()
|| !Algorithms.isEmpty(settings.USER_NAME.get())
&& !Algorithms.isEmpty(settings.USER_PASSWORD.get());
if (hasPoiGroup(points)) { if (hasPoiGroup(points)) {
if (isLogged) { if (getMyApplication().getOsmOAuthHelper().isLogged()) {
SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), points); SendPoiBottomSheetFragment.showInstance(getChildFragmentManager(), points);
} else { } else {
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), this); LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), this);

View file

@ -28,10 +28,8 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.UiUtilities; import net.osmand.plus.UiUtilities;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.ProgressDialogFragment; import net.osmand.plus.dialogs.ProgressDialogFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment; import net.osmand.plus.measurementtool.LoginBottomSheetFragment;
import net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.PoiUploaderType;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -74,13 +72,7 @@ public class OsmEditsUploadListenerHelper implements OsmEditsUploadListener {
OsmPoint point = loadErrorsMap.keySet().iterator().next(); OsmPoint point = loadErrorsMap.keySet().iterator().next();
String message = loadErrorsMap.get(point); String message = loadErrorsMap.get(point);
if (message.equals(activity.getString(R.string.auth_failed))) { if (message.equals(activity.getString(R.string.auth_failed))) {
SendPoiDialogFragment dialogFragment; LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), null);
if (activity instanceof MapActivity) {
dialogFragment = SendPoiDialogFragment.createInstance(new OsmPoint[]{point}, PoiUploaderType.SIMPLE);
} else {
dialogFragment = SendPoiDialogFragment.createInstance(new OsmPoint[]{point}, PoiUploaderType.FRAGMENT);
}
dialogFragment.show(activity.getSupportFragmentManager(), "error_loading");
} else { } else {
DialogFragment dialogFragment = DialogFragment dialogFragment =
UploadingErrorDialogFragment.getInstance(message, point); UploadingErrorDialogFragment.getInstance(message, point);

View file

@ -57,8 +57,6 @@ public class BugBottomSheetDialog extends MenuBottomSheetDialogFragment {
View osmNoteView = View.inflate(UiUtilities.getThemedContext(app, nightMode), View osmNoteView = View.inflate(UiUtilities.getThemedContext(app, nightMode),
R.layout.open_osm_note_text, null); R.layout.open_osm_note_text, null);
TextInputLayout textBox = osmNoteView.findViewById(R.id.name_text_box); TextInputLayout textBox = osmNoteView.findViewById(R.id.name_text_box);
int highlightColorId = nightMode ? R.color.list_background_color_dark : R.color.activity_background_color_light;
textBox.setBoxBackgroundColorResource(highlightColorId);
textBox.setHint(AndroidUtils.addColon(app, R.string.osn_bug_name)); textBox.setHint(AndroidUtils.addColon(app, R.string.osn_bug_name));
ColorStateList colorStateList = ColorStateList.valueOf(ContextCompat ColorStateList colorStateList = ColorStateList.valueOf(ContextCompat
.getColor(app, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light)); .getColor(app, nightMode ? R.color.text_color_secondary_dark : R.color.text_color_secondary_light));
@ -86,11 +84,6 @@ public class BugBottomSheetDialog extends MenuBottomSheetDialogFragment {
dismiss(); dismiss();
} }
@Override
protected int getBgColorId() {
return nightMode ? R.color.activity_background_color_dark : R.color.list_background_color_light;
}
public static void showInstance(@NonNull FragmentManager fm, OsmBugsUtil osmBugsUtil, OsmBugsUtil local, public static void showInstance(@NonNull FragmentManager fm, OsmBugsUtil osmBugsUtil, OsmBugsUtil local,
String text, int titleTextId, int posButtonTextId, final OsmPoint.Action action, String text, int titleTextId, int posButtonTextId, final OsmPoint.Action action,
final OsmBugsLayer.OpenStreetNote bug, final OsmNotesPoint point, final OsmBugsLayer.OpenStreetNote bug, final OsmNotesPoint point,

View file

@ -0,0 +1,106 @@
package net.osmand.plus.osmedit.dialogs;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import net.osmand.plus.R;
import net.osmand.plus.UiUtilities.DialogButtonType;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerSpaceItem;
public class DismissRouteBottomSheetFragment extends MenuBottomSheetDialogFragment {
public static final String TAG = DismissRouteBottomSheetFragment.class.getSimpleName();
private Runnable onStopAction;
private OnDismissListener dismissListener;
@Override
public void createMenuItems(Bundle savedInstanceState) {
BaseBottomSheetItem descriptionItem = new BottomSheetItemWithDescription.Builder()
.setDescription(getString(R.string.stop_routing_confirm))
.setTitle(getString(R.string.cancel_route))
.setLayoutId(R.layout.bottom_sheet_item_list_title_with_descr)
.create();
items.add(descriptionItem);
int padding = getResources().getDimensionPixelSize(R.dimen.content_padding_small);
items.add(new DividerSpaceItem(requireContext(), padding));
}
@Override
protected boolean useVerticalButtons() {
return false;
}
@Override
protected int getDismissButtonTextId() {
return R.string.shared_string_cancel;
}
@Override
protected int getRightBottomButtonTextId() {
return R.string.shared_string_dismiss;
}
@Override
protected DialogButtonType getRightBottomButtonType() {
return DialogButtonType.PRIMARY;
}
@Override
public int getSecondDividerHeight() {
return getResources().getDimensionPixelSize(R.dimen.bottom_sheet_icon_margin);
}
@Override
protected void onRightBottomButtonClick() {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
mapActivity.getMapActions().stopNavigationWithoutConfirm();
}
if (onStopAction != null) {
onStopAction.run();
}
dismiss();
}
@Override
public void onDismiss(@NonNull DialogInterface dialog) {
super.onDismiss(dialog);
FragmentActivity activity = getActivity();
if (activity != null && !activity.isChangingConfigurations() && dismissListener != null) {
dismissListener.onDismiss(dialog);
}
}
@Nullable
public MapActivity getMapActivity() {
Activity activity = getActivity();
if (activity instanceof MapActivity) {
return (MapActivity) activity;
}
return null;
}
public static void showInstance(@NonNull FragmentManager fragmentManager, @Nullable OnDismissListener listener, @Nullable Runnable onStopAction) {
if (!fragmentManager.isStateSaved()) {
DismissRouteBottomSheetFragment fragment = new DismissRouteBottomSheetFragment();
fragment.dismissListener = listener;
fragment.onStopAction = onStopAction;
fragment.setRetainInstance(true);
fragment.show(fragmentManager, TAG);
}
}
}

View file

@ -0,0 +1,7 @@
package net.osmand.plus.osmedit.dialogs;
import net.osmand.plus.osmedit.OsmPoint;
public interface ProgressDialogPoiUploader {
void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously);
}

View file

@ -28,6 +28,7 @@ import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.MenuBottomSheetDialogFragment; import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.osmedit.DashOsmEditsFragment;
import net.osmand.plus.osmedit.OsmNotesPoint; import net.osmand.plus.osmedit.OsmNotesPoint;
import net.osmand.plus.osmedit.OsmPoint; import net.osmand.plus.osmedit.OsmPoint;
import net.osmand.plus.osmedit.oauth.OsmOAuthAuthorizationAdapter; import net.osmand.plus.osmedit.oauth.OsmOAuthAuthorizationAdapter;
@ -42,9 +43,7 @@ import static net.osmand.plus.UiUtilities.setupDialogButton;
import static net.osmand.plus.osmedit.OsmEditingFragment.OSM_LOGIN_DATA; import static net.osmand.plus.osmedit.OsmEditingFragment.OSM_LOGIN_DATA;
import static net.osmand.plus.osmedit.ValidateOsmLoginDetailsTask.ValidateOsmLoginListener; import static net.osmand.plus.osmedit.ValidateOsmLoginDetailsTask.ValidateOsmLoginListener;
import static net.osmand.plus.osmedit.dialogs.SendGpxBottomSheetFragment.showOpenStreetMapScreen; import static net.osmand.plus.osmedit.dialogs.SendGpxBottomSheetFragment.showOpenStreetMapScreen;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.OPENSTREETMAP_POINT; import static net.osmand.plus.osmedit.dialogs.SendPoiBottomSheetFragment.OPENSTREETMAP_POINT;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.ProgressDialogPoiUploader;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.SimpleProgressDialogPoiUploader;
public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragment implements ValidateOsmLoginListener, public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragment implements ValidateOsmLoginListener,
OsmAuthorizationListener { OsmAuthorizationListener {
@ -59,6 +58,7 @@ public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragmen
private LinearLayout signInView; private LinearLayout signInView;
private SwitchCompat uploadAnonymously; private SwitchCompat uploadAnonymously;
private OsmandApplication app; private OsmandApplication app;
private EditText noteText;
private boolean isLoginOAuth() { private boolean isLoginOAuth() {
return !Algorithms.isEmpty(settings.USER_DISPLAY_NAME.get()); return !Algorithms.isEmpty(settings.USER_DISPLAY_NAME.get());
@ -78,7 +78,7 @@ public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragmen
final View sendOsmNoteView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), final View sendOsmNoteView = View.inflate(new ContextThemeWrapper(getContext(), themeRes),
R.layout.send_osm_note_fragment, null); R.layout.send_osm_note_fragment, null);
EditText noteText = sendOsmNoteView.findViewById(R.id.note_text); noteText = sendOsmNoteView.findViewById(R.id.note_text);
noteText.setText(((OsmNotesPoint) poi[0]).getText()); noteText.setText(((OsmNotesPoint) poi[0]).getText());
noteText.setSelection(noteText.getText().length()); noteText.setSelection(noteText.getText().length());
TextInputLayout noteHint = sendOsmNoteView.findViewById(R.id.note_hint); TextInputLayout noteHint = sendOsmNoteView.findViewById(R.id.note_hint);
@ -98,7 +98,7 @@ public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragmen
if (fragment instanceof OsmAuthorizationListener) { if (fragment instanceof OsmAuthorizationListener) {
app.getOsmOAuthHelper().addListener((OsmAuthorizationListener) fragment); app.getOsmOAuthHelper().addListener((OsmAuthorizationListener) fragment);
} }
app.getOsmOAuthHelper().startOAuth((ViewGroup) v); app.getOsmOAuthHelper().startOAuth((ViewGroup) getView(), nightMode);
} }
}); });
View loginButton = sendOsmNoteView.findViewById(R.id.login_button); View loginButton = sendOsmNoteView.findViewById(R.id.login_button);
@ -196,11 +196,16 @@ public class SendOsmNoteBottomSheetFragment extends MenuBottomSheetDialogFragmen
ProgressDialogPoiUploader progressDialogPoiUploader = null; ProgressDialogPoiUploader progressDialogPoiUploader = null;
Activity activity = getActivity(); Activity activity = getActivity();
if (activity instanceof MapActivity) { if (activity instanceof MapActivity) {
progressDialogPoiUploader = new SimpleProgressDialogPoiUploader((MapActivity) activity); if (getParentFragment() instanceof DashOsmEditsFragment) {
progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
} else {
progressDialogPoiUploader = new SimpleProgressDialogPoiUploader((MapActivity) activity);
}
} else if (getParentFragment() instanceof ProgressDialogPoiUploader) { } else if (getParentFragment() instanceof ProgressDialogPoiUploader) {
progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment(); progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
} }
if (progressDialogPoiUploader != null) { if (progressDialogPoiUploader != null) {
((OsmNotesPoint) poi[0]).setText(noteText.getText().toString());
progressDialogPoiUploader.showProgressDialog(poi, false, uploadAnonymously.isChecked()); progressDialogPoiUploader.showProgressDialog(poi, false, uploadAnonymously.isChecked());
} }
dismiss(); dismiss();

View file

@ -34,14 +34,12 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static net.osmand.plus.osmedit.dialogs.SendGpxBottomSheetFragment.showOpenStreetMapScreen; import static net.osmand.plus.osmedit.dialogs.SendGpxBottomSheetFragment.showOpenStreetMapScreen;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.OPENSTREETMAP_POINT;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.ProgressDialogPoiUploader;
import static net.osmand.plus.osmedit.dialogs.SendPoiDialogFragment.SimpleProgressDialogPoiUploader;
public class SendPoiBottomSheetFragment extends MenuBottomSheetDialogFragment { public class SendPoiBottomSheetFragment extends MenuBottomSheetDialogFragment {
public static final String TAG = SendPoiBottomSheetFragment.class.getSimpleName(); public static final String TAG = SendPoiBottomSheetFragment.class.getSimpleName();
private static final Log LOG = PlatformUtil.getLog(SendPoiBottomSheetFragment.class); private static final Log LOG = PlatformUtil.getLog(SendPoiBottomSheetFragment.class);
public static final String OPENSTREETMAP_POINT = "openstreetmap_point";
private OsmPoint[] poi; private OsmPoint[] poi;
private SwitchCompat closeChangeSet; private SwitchCompat closeChangeSet;

View file

@ -1,280 +0,0 @@
package net.osmand.plus.osmedit.dialogs;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SwitchCompat;
import androidx.fragment.app.DialogFragment;
import net.osmand.osm.PoiType;
import net.osmand.osm.edit.Entity;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.settings.backend.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.ProgressDialogFragment;
import net.osmand.plus.osmedit.OpenstreetmapPoint;
import net.osmand.plus.osmedit.OsmBugsLayer;
import net.osmand.plus.osmedit.OsmEditingPlugin;
import net.osmand.plus.osmedit.OsmEditsUploadListener;
import net.osmand.plus.osmedit.OsmEditsUploadListenerHelper;
import net.osmand.plus.osmedit.OsmPoint;
import net.osmand.plus.osmedit.UploadOpenstreetmapPointAsyncTask;
import net.osmand.util.Algorithms;
import java.util.HashMap;
import java.util.Map;
public class SendPoiDialogFragment extends DialogFragment {
public static final String TAG = "SendPoiDialogFragment";
public static final String OPENSTREETMAP_POINT = "openstreetmap_point";
public static final String POI_UPLOADER_TYPE = "poi_uploader_type";
private OsmPoint[] poi;
public enum PoiUploaderType {
SIMPLE,
FRAGMENT
}
private OsmandApplication getMyApplication() {
return (OsmandApplication) getActivity().getApplication();
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT);
final PoiUploaderType poiUploaderType = PoiUploaderType.valueOf(getArguments().getString(POI_UPLOADER_TYPE, PoiUploaderType.SIMPLE.name()));
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View view = getActivity().getLayoutInflater().inflate(R.layout.send_poi_dialog, null);
final SwitchCompat uploadAnonymously = (SwitchCompat) view.findViewById(R.id.upload_anonymously_switch);
final EditText messageEditText = (EditText) view.findViewById(R.id.message_field);
final EditText userNameEditText = (EditText) view.findViewById(R.id.user_name_field);
final EditText passwordEditText = (EditText) view.findViewById(R.id.password_field);
final View messageLabel = view.findViewById(R.id.message_label);
final View userNameLabel = view.findViewById(R.id.osm_user_name_label);
final View passwordLabel = view.findViewById(R.id.osm_user_password_label);
final CheckBox closeChangeSetCheckBox =
(CheckBox) view.findViewById(R.id.close_change_set_checkbox);
final OsmandSettings settings = ((OsmandApplication) getActivity().getApplication())
.getSettings();
userNameEditText.setText(settings.USER_NAME.get());
passwordEditText.setText(settings.USER_PASSWORD.get());
boolean hasPoiGroup = false;
assert poi != null;
for (OsmPoint p : poi) {
if (p.getGroup() == OsmPoint.Group.POI) {
hasPoiGroup = true;
break;
}
}
String defaultChangeSet = createDefaultChangeSet();
messageEditText.setText(defaultChangeSet);
final boolean hasPOI = hasPoiGroup;
messageLabel.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
messageEditText.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
closeChangeSetCheckBox.setVisibility(hasPOI ? View.VISIBLE : View.GONE);
closeChangeSetCheckBox.setChecked(hasPOI && !defaultChangeSet.isEmpty());
view.findViewById(R.id.osm_note_header).setVisibility(hasPOI ? View.GONE : View.VISIBLE);
uploadAnonymously.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
userNameLabel.setVisibility(isChecked ? View.GONE : View.VISIBLE);
userNameEditText.setVisibility(isChecked ? View.GONE : View.VISIBLE);
passwordLabel.setVisibility(isChecked ? View.GONE : View.VISIBLE);
passwordEditText.setVisibility(isChecked ? View.GONE : View.VISIBLE);
}
});
final ProgressDialogPoiUploader progressDialogPoiUploader;
if (poiUploaderType == PoiUploaderType.SIMPLE && getActivity() instanceof MapActivity) {
progressDialogPoiUploader =
new SendPoiDialogFragment.SimpleProgressDialogPoiUploader((MapActivity) getActivity());
} else {
progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
}
builder.setTitle(hasPOI ? R.string.upload_poi : R.string.upload_osm_note)
.setView(view)
.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (progressDialogPoiUploader != null) {
settings.USER_NAME.set(userNameEditText.getText().toString());
settings.USER_PASSWORD.set(passwordEditText.getText().toString());
String comment = messageEditText.getText().toString();
if (comment.length() > 0) {
for (OsmPoint osmPoint : poi) {
if (osmPoint.getGroup() == OsmPoint.Group.POI) {
((OpenstreetmapPoint) osmPoint).setComment(comment);
break;
}
}
}
progressDialogPoiUploader.showProgressDialog(poi,
closeChangeSetCheckBox.isChecked(),
!hasPOI && uploadAnonymously.isChecked());
}
}
})
.setNegativeButton(R.string.shared_string_cancel, null);
return builder.create();
}
public static SendPoiDialogFragment createInstance(@NonNull OsmPoint[] points, @NonNull PoiUploaderType uploaderType) {
SendPoiDialogFragment fragment = new SendPoiDialogFragment();
Bundle bundle = new Bundle();
bundle.putSerializable(OPENSTREETMAP_POINT, points);
bundle.putString(POI_UPLOADER_TYPE, uploaderType.name());
fragment.setArguments(bundle);
return fragment;
}
private String createDefaultChangeSet() {
Map<String, PoiType> allTranslatedSubTypes = getMyApplication().getPoiTypes().getAllTranslatedNames(true);
if (allTranslatedSubTypes == null) {
return "";
}
Map<String, Integer> addGroup = new HashMap<>();
Map<String, Integer> editGroup = new HashMap<>();
Map<String, Integer> deleteGroup = new HashMap<>();
Map<String, Integer> reopenGroup = new HashMap<>();
String comment = "";
for (OsmPoint p : poi) {
if (p.getGroup() == OsmPoint.Group.POI) {
OsmPoint.Action action = p.getAction();
String type = ((OpenstreetmapPoint) p).getEntity().getTag(Entity.POI_TYPE_TAG);
if (type == null) {
continue;
}
PoiType localizedPoiType = allTranslatedSubTypes.get(type.toLowerCase().trim());
if (localizedPoiType != null) {
type = Algorithms.capitalizeFirstLetter(localizedPoiType.getKeyName().replace('_', ' '));
}
if (action == OsmPoint.Action.CREATE) {
if (!addGroup.containsKey(type)) {
addGroup.put(type, 1);
} else {
addGroup.put(type, addGroup.get(type) + 1);
}
} else if (action == OsmPoint.Action.MODIFY) {
if (!editGroup.containsKey(type)) {
editGroup.put(type, 1);
} else {
editGroup.put(type, editGroup.get(type) + 1);
}
} else if (action == OsmPoint.Action.DELETE) {
if (!deleteGroup.containsKey(type)) {
deleteGroup.put(type, 1);
} else {
deleteGroup.put(type, deleteGroup.get(type) + 1);
}
} else if (action == OsmPoint.Action.REOPEN) {
if (!reopenGroup.containsKey(type)) {
reopenGroup.put(type, 1);
} else {
reopenGroup.put(type, reopenGroup.get(type) + 1);
}
}
}
}
int modifiedItemsOutOfLimit = 0;
for (int i = 0; i < 4; i++) {
String action;
Map<String, Integer> group;
switch (i) {
case 0:
action = getString(R.string.default_changeset_add);
group = addGroup;
break;
case 1:
action = getString(R.string.default_changeset_edit);
group = editGroup;
break;
case 2:
action = getString(R.string.default_changeset_delete);
group = deleteGroup;
break;
case 3:
action = getString(R.string.default_changeset_reopen);
group = reopenGroup;
break;
default:
action = "";
group = new HashMap<>();
}
if (!group.isEmpty()) {
int pos = 0;
for (Map.Entry<String, Integer> entry : group.entrySet()) {
String type = entry.getKey();
int quantity = entry.getValue();
if (comment.length() > 200) {
modifiedItemsOutOfLimit += quantity;
} else {
if (pos == 0) {
comment = comment.concat(comment.length() == 0 ? "" : "; ").concat(action).concat(" ").concat(quantity == 1 ? "" : quantity + " ").concat(type);
} else {
comment = comment.concat(", ").concat(quantity == 1 ? "" : quantity + " ").concat(type);
}
}
pos++;
}
}
}
if (modifiedItemsOutOfLimit != 0) {
comment = comment.concat("; ").concat(modifiedItemsOutOfLimit + " ").concat(getString(R.string.items_modified)).concat(".");
} else if (!comment.isEmpty()){
comment = comment.concat(".");
}
return comment;
}
public interface ProgressDialogPoiUploader {
void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously);
}
public static class SimpleProgressDialogPoiUploader implements ProgressDialogPoiUploader {
private MapActivity mapActivity;
public SimpleProgressDialogPoiUploader(MapActivity mapActivity) {
this.mapActivity = mapActivity;
}
@Override
public void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously) {
ProgressDialogFragment dialog = ProgressDialogFragment.createInstance(
R.string.uploading,
R.string.local_openstreetmap_uploading,
ProgressDialog.STYLE_HORIZONTAL);
OsmEditingPlugin plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class);
OsmEditsUploadListener listener = new OsmEditsUploadListenerHelper(mapActivity,
mapActivity.getString(R.string.local_openstreetmap_were_uploaded)) {
@Override
public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) {
super.uploadEnded(loadErrorsMap);
mapActivity.getContextMenu().close();
OsmBugsLayer l = mapActivity.getMapView().getLayerByClass(OsmBugsLayer.class);
if(l != null) {
l.clearCache();
mapActivity.refreshMap();
}
}
};
dialog.show(mapActivity.getSupportFragmentManager(), ProgressDialogFragment.TAG);
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(
dialog, listener, plugin, points.length, closeChangeSet, anonymously);
uploadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, points);
}
}
}

View file

@ -0,0 +1,52 @@
package net.osmand.plus.osmedit.dialogs;
import android.app.ProgressDialog;
import android.os.AsyncTask;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dialogs.ProgressDialogFragment;
import net.osmand.plus.osmedit.OsmBugsLayer;
import net.osmand.plus.osmedit.OsmEditingPlugin;
import net.osmand.plus.osmedit.OsmEditsUploadListener;
import net.osmand.plus.osmedit.OsmEditsUploadListenerHelper;
import net.osmand.plus.osmedit.OsmPoint;
import net.osmand.plus.osmedit.UploadOpenstreetmapPointAsyncTask;
import java.util.Map;
public class SimpleProgressDialogPoiUploader implements ProgressDialogPoiUploader {
private MapActivity mapActivity;
public SimpleProgressDialogPoiUploader(MapActivity mapActivity) {
this.mapActivity = mapActivity;
}
@Override
public void showProgressDialog(OsmPoint[] points, boolean closeChangeSet, boolean anonymously) {
ProgressDialogFragment dialog = ProgressDialogFragment.createInstance(
R.string.uploading,
R.string.local_openstreetmap_uploading,
ProgressDialog.STYLE_HORIZONTAL);
OsmEditingPlugin plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class);
OsmEditsUploadListener listener = new OsmEditsUploadListenerHelper(mapActivity,
mapActivity.getString(R.string.local_openstreetmap_were_uploaded)) {
@Override
public void uploadEnded(Map<OsmPoint, String> loadErrorsMap) {
super.uploadEnded(loadErrorsMap);
mapActivity.getContextMenu().close();
OsmBugsLayer l = mapActivity.getMapView().getLayerByClass(OsmBugsLayer.class);
if (l != null) {
l.clearCache();
mapActivity.refreshMap();
}
}
};
dialog.show(mapActivity.getSupportFragmentManager(), ProgressDialogFragment.TAG);
UploadOpenstreetmapPointAsyncTask uploadTask = new UploadOpenstreetmapPointAsyncTask(
dialog, listener, plugin, points.length, closeChangeSet, anonymously);
uploadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, points);
}
}

View file

@ -1,12 +1,19 @@
package net.osmand.plus.osmedit.oauth; package net.osmand.plus.osmedit.oauth;
import android.content.Context;
import android.content.Intent;
import android.net.TrafficStats; import android.net.TrafficStats;
import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebView; import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.core.content.ContextCompat;
import com.github.scribejava.core.builder.api.DefaultApi10a; import com.github.scribejava.core.builder.api.DefaultApi10a;
import com.github.scribejava.core.model.OAuth1AccessToken; import com.github.scribejava.core.model.OAuth1AccessToken;
@ -20,6 +27,7 @@ import net.osmand.osm.oauth.OsmOAuthAuthorizationClient;
import net.osmand.plus.OsmAndConstants; import net.osmand.plus.OsmAndConstants;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.wikipedia.WikipediaDialogFragment;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParser;
@ -79,8 +87,8 @@ public class OsmOAuthAuthorizationAdapter {
} }
} }
public void startOAuth(final ViewGroup rootLayout) { public void startOAuth(final ViewGroup rootLayout, boolean nightMode) {
new StartOAuthAsyncTask(rootLayout).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null); new StartOAuthAsyncTask(rootLayout, nightMode).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null);
} }
private void saveToken() { private void saveToken() {
@ -89,11 +97,10 @@ public class OsmOAuthAuthorizationAdapter {
app.getSettings().USER_ACCESS_TOKEN_SECRET.set(accessToken.getTokenSecret()); app.getSettings().USER_ACCESS_TOKEN_SECRET.set(accessToken.getTokenSecret());
} }
private void loadWebView(ViewGroup root, String url) { private void loadWebView(ViewGroup root, boolean nightMode, String url) {
WebView webView = new WebView(root.getContext()); Uri uri = Uri.parse(url);
webView.requestFocus(View.FOCUS_DOWN); Context context = root.getContext();
webView.loadUrl(url); WikipediaDialogFragment.showFullArticle(context, uri, nightMode);
root.addView(webView);
} }
public void performGetRequest(String url, OAuthAsyncRequestCallback<Response> callback) { public void performGetRequest(String url, OAuthAsyncRequestCallback<Response> callback) {
@ -117,9 +124,11 @@ public class OsmOAuthAuthorizationAdapter {
private class StartOAuthAsyncTask extends AsyncTask<Void, Void, OAuth1RequestToken> { private class StartOAuthAsyncTask extends AsyncTask<Void, Void, OAuth1RequestToken> {
private final ViewGroup rootLayout; private final ViewGroup rootLayout;
boolean nightMode;
public StartOAuthAsyncTask(ViewGroup rootLayout) { public StartOAuthAsyncTask(ViewGroup rootLayout, boolean nightMode) {
this.rootLayout = rootLayout; this.rootLayout = rootLayout;
this.nightMode = nightMode;
} }
@Override @Override
@ -129,7 +138,7 @@ public class OsmOAuthAuthorizationAdapter {
@Override @Override
protected void onPostExecute(@NonNull OAuth1RequestToken requestToken) { protected void onPostExecute(@NonNull OAuth1RequestToken requestToken) {
loadWebView(rootLayout, client.getService().getAuthorizationUrl(requestToken)); loadWebView(rootLayout, nightMode, client.getService().getAuthorizationUrl(requestToken));
} }
} }

View file

@ -28,9 +28,8 @@ public class OsmOAuthHelper {
listeners.add(listener); listeners.add(listener);
} }
public OsmOAuthAuthorizationAdapter updateAdapter(){ public void updateAdapter() {
authorizationAdapter = new OsmOAuthAuthorizationAdapter(app); authorizationAdapter = new OsmOAuthAuthorizationAdapter(app);
return authorizationAdapter;
} }
public void removeListener(OsmAuthorizationListener listener) { public void removeListener(OsmAuthorizationListener listener) {
@ -41,8 +40,8 @@ public class OsmOAuthHelper {
return authorizationAdapter; return authorizationAdapter;
} }
public void startOAuth(@NonNull ViewGroup view) { public void startOAuth(@NonNull ViewGroup view, boolean nightMode) {
authorizationAdapter.startOAuth(view); authorizationAdapter.startOAuth(view, nightMode);
} }
public void authorize(@NonNull String oauthVerifier) { public void authorize(@NonNull String oauthVerifier) {
@ -76,6 +75,10 @@ public class OsmOAuthHelper {
return authorizationAdapter.isValidToken(); return authorizationAdapter.isValidToken();
} }
public boolean isLogged() {
return isValidToken() || isLoginExists();
}
public interface OsmAuthorizationListener { public interface OsmAuthorizationListener {
void authorizationCompleted(); void authorizationCompleted();
} }

View file

@ -379,6 +379,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
iconId = R.drawable.ic_action_photo_dark; iconId = R.drawable.ic_action_photo_dark;
} }
builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes)); builder.setIcon(uiUtilities.getIcon(iconId, activeColorRes));
builder.setDescription(AndroidUtils.formatSize(app, size));
} else if (fileSubtype.isMap() } else if (fileSubtype.isMap()
|| fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE || fileSubtype == FileSettingsItem.FileSubtype.TTS_VOICE
|| fileSubtype == FileSettingsItem.FileSubtype.VOICE) { || fileSubtype == FileSettingsItem.FileSubtype.VOICE) {
@ -389,7 +390,7 @@ public class ExportItemsBottomSheet extends MenuBottomSheetDialogFragment {
String mapDescription = getMapDescription(file); String mapDescription = getMapDescription(file);
String formattedSize = AndroidUtils.formatSize(app, size); String formattedSize = AndroidUtils.formatSize(app, size);
if (mapDescription != null) { if (mapDescription != null) {
builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_star, mapDescription, formattedSize)); builder.setDescription(getString(R.string.ltr_or_rtl_combine_via_bold_point, mapDescription, formattedSize));
} else { } else {
builder.setDescription(formattedSize); builder.setDescription(formattedSize);
} }

View file

@ -703,9 +703,16 @@ public class ContextMenuLayer extends OsmandMapLayer {
RenderingContext rc = maps.getVisibleRenderingContext(); RenderingContext rc = maps.getVisibleRenderingContext();
RenderedObject[] renderedObjects = null; RenderedObject[] renderedObjects = null;
if (rc != null && rc.zoom == tileBox.getZoom()) { if (rc != null && rc.zoom == tileBox.getZoom()) {
double sinRotate = Math.sin(Math.toRadians(rc.rotate - tileBox.getRotate()));
double cosRotate = Math.cos(Math.toRadians(rc.rotate - tileBox.getRotate()));
float x = tileBox.getPixXFrom31((int) (rc.leftX * rc.tileDivisor), (int) (rc.topY * rc.tileDivisor)); float x = tileBox.getPixXFrom31((int) (rc.leftX * rc.tileDivisor), (int) (rc.topY * rc.tileDivisor));
float y = tileBox.getPixYFrom31((int) (rc.leftX * rc.tileDivisor), (int) (rc.topY * rc.tileDivisor)); float y = tileBox.getPixYFrom31((int) (rc.leftX * rc.tileDivisor), (int) (rc.topY * rc.tileDivisor));
renderedObjects = nativeLib.searchRenderedObjectsFromContext(rc, (int) (point.x - x), (int) (point.y - y)); float dx = point.x - x;
float dy = point.y - y;
int coordX = (int) (dx * cosRotate - dy * sinRotate);
int coordY = (int) (dy * cosRotate + dx * sinRotate);
renderedObjects = nativeLib.searchRenderedObjectsFromContext(rc, coordX, coordY);
} }
if (renderedObjects != null) { if (renderedObjects != null) {
int TILE_SIZE = 256; int TILE_SIZE = 256;

View file

@ -339,7 +339,7 @@ public class MapControlsLayer extends OsmandMapLayer {
public void stopNavigation() { public void stopNavigation() {
mapRouteInfoMenu.hide(); mapRouteInfoMenu.hide();
if (mapActivity.getRoutingHelper().isFollowingMode()) { if (mapActivity.getRoutingHelper().isFollowingMode()) {
mapActivity.getMapActions().stopNavigationActionConfirm(); mapActivity.getMapActions().stopNavigationActionConfirm(null);
} else { } else {
mapActivity.getMapActions().stopNavigationWithoutConfirm(); mapActivity.getMapActions().stopNavigationWithoutConfirm();
} }

View file

@ -4,6 +4,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import net.osmand.Collator; import net.osmand.Collator;
import net.osmand.CollatorStringMatcher;
import net.osmand.GPXUtilities; import net.osmand.GPXUtilities;
import net.osmand.IndexConstants; import net.osmand.IndexConstants;
import net.osmand.OsmAndCollator; import net.osmand.OsmAndCollator;
@ -25,7 +26,9 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
@ -34,7 +37,7 @@ import gnu.trove.map.TLongObjectMap;
import gnu.trove.map.hash.TLongObjectHashMap; import gnu.trove.map.hash.TLongObjectHashMap;
public class TravelObfHelper implements TravelHelper{ public class TravelObfHelper implements TravelHelper {
private static final Log LOG = PlatformUtil.getLog(TravelObfHelper.class); private static final Log LOG = PlatformUtil.getLog(TravelObfHelper.class);
@ -76,7 +79,8 @@ public class TravelObfHelper implements TravelHelper{
return localDataHelper; return localDataHelper;
} }
/** TODO /**
* TODO
* 1. implement regional travelbooks * 1. implement regional travelbooks
* 2. check settings for default? * 2. check settings for default?
*/ */
@ -143,7 +147,82 @@ public class TravelObfHelper implements TravelHelper{
@NonNull @NonNull
@Override @Override
public List<WikivoyageSearchResult> search(String searchQuery) { public List<WikivoyageSearchResult> search(String searchQuery) {
return null; List<WikivoyageSearchResult> res = new ArrayList<>();
CollatorStringMatcher matcher = new CollatorStringMatcher(searchQuery,
CollatorStringMatcher.StringMatcherMode.CHECK_STARTS_FROM_SPACE);
for (TravelArticle article : popularArticles) {
if (checkArticleMatches(matcher, article)) {
WikivoyageSearchResult searchResult = convertArticleToSearchResult(article);
res.add(searchResult);
}
}
res = new ArrayList<>(groupSearchResultsByCityId(res));
sortSearchResults(searchQuery, res);
return res;
}
private WikivoyageSearchResult convertArticleToSearchResult(TravelArticle article) {
WikivoyageSearchResult searchResult = new WikivoyageSearchResult();
searchResult.articleTitles = new ArrayList<>(Collections.singletonList(article.title));
searchResult.isPartOf = new ArrayList<>(Collections.singletonList(article.isPartOf));
searchResult.imageTitle = article.imageTitle;
searchResult.langs = new ArrayList<>(Collections.singletonList(article.lang));
searchResult.tripId = article.tripId;
return searchResult;
}
private Collection<WikivoyageSearchResult> groupSearchResultsByCityId(List<WikivoyageSearchResult> res) {
String baseLng = application.getLanguage();
TLongObjectHashMap<WikivoyageSearchResult> wikivoyage = new TLongObjectHashMap<>();
for (WikivoyageSearchResult rs : res) {
WikivoyageSearchResult prev = wikivoyage.get(rs.tripId);
if (prev != null) {
int insInd = prev.langs.size();
if (rs.langs.get(0).equals(baseLng)) {
insInd = 0;
} else if (rs.langs.get(0).equals("en")) {
if (!prev.langs.get(0).equals(baseLng)) {
insInd = 0;
} else {
insInd = 1;
}
}
prev.articleTitles.add(insInd, rs.articleTitles.get(0));
prev.langs.add(insInd, rs.langs.get(0));
prev.isPartOf.add(insInd, rs.isPartOf.get(0));
} else {
wikivoyage.put(rs.tripId, rs);
}
}
return wikivoyage.valueCollection();
}
private void sortSearchResults(final String searchQuery, List<WikivoyageSearchResult> list) {
Collections.sort(list, new Comparator<WikivoyageSearchResult>() {
@Override
public int compare(WikivoyageSearchResult o1, WikivoyageSearchResult o2) {
boolean c1 = CollatorStringMatcher.cmatches(collator, searchQuery, o1.articleTitles.get(0),
CollatorStringMatcher.StringMatcherMode.CHECK_ONLY_STARTS_WITH);
boolean c2 = CollatorStringMatcher.cmatches(collator, searchQuery, o2.articleTitles.get(0),
CollatorStringMatcher.StringMatcherMode.CHECK_ONLY_STARTS_WITH);
if (c1 == c2) {
return collator.compare(o1.articleTitles.get(0), o2.articleTitles.get(0));
} else if (c1) {
return -1;
} else if (c2) {
return 1;
}
return 0;
}
});
}
private boolean checkArticleMatches(CollatorStringMatcher matcher, TravelArticle article) {
return matcher.matches(article.getTitle())
|| matcher.matches(article.getContent())
|| matcher.matches(article.getContentsJson());
} }
@NonNull @NonNull
@ -281,14 +360,14 @@ public class TravelObfHelper implements TravelHelper{
// if (aa != null) { // if (aa != null) {
// article = readArticle(aa, lang); // article = readArticle(aa, lang);
// } // }
return article; return article;
} }
@Override @Override
public TravelArticle getArticle(long resId, String lang) { public TravelArticle getArticle(long resId, String lang) {
TravelArticle article = getArticleFromCache(resId, lang); TravelArticle article = getArticleFromCache(resId, lang);
if (article != null) { if (article != null) {
return article; return article;
} }
String name = ""; //??? String name = ""; //???
return getArticle(name, lang); return getArticle(name, lang);
@ -344,7 +423,7 @@ public class TravelObfHelper implements TravelHelper{
} }
//TODO finish stub //TODO finish stub
@Override @Override
public ArrayList<String> getArticleLangs(long cityId) { public ArrayList<String> getArticleLangs(long cityId) {
ArrayList<String> res = new ArrayList<>(); ArrayList<String> res = new ArrayList<>();