Merge context menu changes
This commit is contained in:
commit
4de6bdbe14
145 changed files with 1264 additions and 1350 deletions
|
@ -2915,4 +2915,13 @@ Zobrazená oblast: %1$s x %2$s</string>
|
||||||
<string name="how_to_open_wiki_title">Jak otevřít články Wikipedie?</string>
|
<string name="how_to_open_wiki_title">Jak otevřít články Wikipedie?</string>
|
||||||
<string name="hide_full_description">Skrýt plný popis</string>
|
<string name="hide_full_description">Skrýt plný popis</string>
|
||||||
<string name="show_full_description">Zobrazit plný popis</string>
|
<string name="show_full_description">Zobrazit plný popis</string>
|
||||||
|
<string name="release_3_0">• Nové: Podpora pro celosvětové cestovní průvodce. Odkazovaná místa jsou propojené s mapou. Úvodní data z Wikivoyage.
|
||||||
|
\n
|
||||||
|
\n • Wikipedie: nový vzhled, aktivní linky, podpora obrázků
|
||||||
|
\n
|
||||||
|
\n • Rozhraní zobrazování tras: podpora skupin přechodových bodů (waypointů)
|
||||||
|
\n
|
||||||
|
\n • Mapové značky: import vybraných skupin z GPX souborů, nový vzhled zadávání souřadnic
|
||||||
|
\n
|
||||||
|
\n • Předplatné OsmAnd Live nyní zahrnuje všechny funkce OsmAnd</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2027,4 +2027,33 @@
|
||||||
<string name="poi_architecture_modern">Αρχιτεκτονική: σύγχρονη</string>
|
<string name="poi_architecture_modern">Αρχιτεκτονική: σύγχρονη</string>
|
||||||
<string name="poi_architecture_stalinist_neoclassicism">Αρχιτεκτονική: σταλινικός νεοκλασικισμός</string>
|
<string name="poi_architecture_stalinist_neoclassicism">Αρχιτεκτονική: σταλινικός νεοκλασικισμός</string>
|
||||||
<string name="poi_architecture_eclectic">Αρχιτεκτονική: εκλεκτική</string>
|
<string name="poi_architecture_eclectic">Αρχιτεκτονική: εκλεκτική</string>
|
||||||
|
<string name="poi_architecture_new_objectivity">Αρχιτεκτονική: νέα αντικειμενικότητα</string>
|
||||||
|
<string name="poi_architecture_contemporary">Αρχιτεκτονική: σύγχρονη</string>
|
||||||
|
<string name="poi_architecture_constructivism">Αρχιτεκτονική: οικοδομισμός</string>
|
||||||
|
<string name="poi_architecture_umgebinde">Αρχιτεκτονική: περιδεμένη (umgebinde)</string>
|
||||||
|
<string name="poi_architecture_timber_frame">Αρχιτεκτονική: ξύλινος σκελετός</string>
|
||||||
|
<string name="poi_architecture_art_nouveau">Αρχιτεκτονική: νέο ύφος (αρ νουβό)</string>
|
||||||
|
<string name="poi_architecture_neoclassicism">Αρχιτεκτονική: νεοκλασικισμός</string>
|
||||||
|
<string name="poi_architecture_victorian">Αρχιτεκτονική: βικτωριανή</string>
|
||||||
|
<string name="poi_architecture_brutalism">Αρχιτεκτονική: μπρουταλισμός</string>
|
||||||
|
<string name="poi_architecture_classicism">Αρχιτεκτονική: κλασικισμός</string>
|
||||||
|
<string name="poi_architecture_gothic">Αρχιτεκτονική: γοτθική</string>
|
||||||
|
<string name="poi_architecture_oldrussian">Αρχιτεκτονική: παλαιορωσική</string>
|
||||||
|
<string name="poi_architecture_baroque">Αρχιτεκτονική: μπαρόκ</string>
|
||||||
|
<string name="poi_architecture_postconstructivism">Αρχιτεκτονική: μεταοικοδομισμός</string>
|
||||||
|
<string name="poi_architecture_wilhelminian_style">Αρχιτεκτονική: βιλχεμινικό ύφος</string>
|
||||||
|
<string name="poi_architecture_renaissance">Αρχιτεκτονική: αναγεννησιακή</string>
|
||||||
|
<string name="poi_architecture_romanesque">Αρχιτεκτονική: ρομανική</string>
|
||||||
|
|
||||||
|
<string name="poi_tunnel_waterway">Υδατοσήραγγα</string>
|
||||||
|
<string name="poi_tunnel_car">Οδική σήραγγα</string>
|
||||||
|
<string name="poi_tunnel_pedestrian">Πεζοσήραγγα</string>
|
||||||
|
<string name="poi_tunnel_railway">Σιδηροδρομική σήραγγα</string>
|
||||||
|
<string name="poi_bridge_car">Οδική σήραγγα</string>
|
||||||
|
<string name="poi_bridge_pedestrian">Πεζογέφυρα</string>
|
||||||
|
<string name="poi_bridge_bicycle">Ποδηλατική γέφυρα</string>
|
||||||
|
<string name="poi_bridge_railway">Σιδηροδρομική γέφυρα</string>
|
||||||
|
<string name="poi_bridge_waterway">Γέφυρα θαλάσσιων οδών</string>
|
||||||
|
<string name="poi_bridge_structure_beam">Δομή γέφυρας: ακτινωτή</string>
|
||||||
|
<string name="poi_bridge_structure_simple_suspension">Δομή γέφυρας: απλή ανάρτηση</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1715,7 +1715,7 @@
|
||||||
<string name="poi_memorial_war">Memorial de guerra</string>
|
<string name="poi_memorial_war">Memorial de guerra</string>
|
||||||
<string name="poi_memorial_plaque">Placa</string>
|
<string name="poi_memorial_plaque">Placa</string>
|
||||||
<string name="poi_memorial_stone">Piedra</string>
|
<string name="poi_memorial_stone">Piedra</string>
|
||||||
<string name="poi_memorial_stele">Estrella</string>
|
<string name="poi_memorial_stele">Estela</string>
|
||||||
<string name="poi_memorial_bust">Busto</string>
|
<string name="poi_memorial_bust">Busto</string>
|
||||||
<string name="poi_memorial_koshinto">Koshinto</string>
|
<string name="poi_memorial_koshinto">Koshinto</string>
|
||||||
<string name="poi_memorial_blue_plaque">Placa azul</string>
|
<string name="poi_memorial_blue_plaque">Placa azul</string>
|
||||||
|
|
|
@ -3207,5 +3207,116 @@
|
||||||
<string name="poi_indoor_no">Kanpokoa</string>
|
<string name="poi_indoor_no">Kanpokoa</string>
|
||||||
<string name="poi_vending_telephone_vouchers">Telefono-baleak</string>
|
<string name="poi_vending_telephone_vouchers">Telefono-baleak</string>
|
||||||
<string name="poi_vending_vouchers">Baleak</string>
|
<string name="poi_vending_vouchers">Baleak</string>
|
||||||
<string name="poi_resource_aggregate"></string>
|
<string name="poi_resource_aggregate"/>
|
||||||
</resources>
|
<string name="poi_checkpoint_type">Kontrol-postu mota</string>
|
||||||
|
|
||||||
|
<string name="synonyms_poi_fuel">Gasolindegia; Zerbitzu estazioa;Erregai estazioa;Petrolio estazioa</string>
|
||||||
|
|
||||||
|
<string name="poi_tactile_paving_no">Ukimenezko zoladura gabe</string>
|
||||||
|
<string name="poi_capacity_disabled_no">Ez dago ezinduentzako toki berezirik</string>
|
||||||
|
<string name="poi_capacity_disabled">Ezinduentzako toki bereziak</string>
|
||||||
|
<string name="poi_drive_in_no">"Kotxean zerbitzatzea: Ez "</string>
|
||||||
|
<string name="poi_drive_through_no">Kotxearekin gurutzatzea: Ez</string>
|
||||||
|
|
||||||
|
<string name="poi_takeaway_no">Ezin da eraman</string>
|
||||||
|
<string name="poi_takeaway_only">Eramateko besterik ez</string>
|
||||||
|
|
||||||
|
<string name="poi_delivery_no">Ez da etxera bidaltzen</string>
|
||||||
|
<string name="poi_delivery_only">Etxera bidaltzeko besterik ez</string>
|
||||||
|
|
||||||
|
<string name="poi_vending_bicycle_tube">Bizikletentzako hodiak</string>
|
||||||
|
<string name="poi_vending_parcel_pickup">Paketeak jasotzeko gunea</string>
|
||||||
|
<string name="poi_memorial_stele">Estela</string>
|
||||||
|
<string name="poi_memorial_stupa">Estupa</string>
|
||||||
|
<string name="poi_memorial_fassade_decoration">Aurrealdeko dekorazioa</string>
|
||||||
|
|
||||||
|
<string name="poi_resource_mica">Mika</string>
|
||||||
|
<string name="poi_resource_peat">Zohikatza</string>
|
||||||
|
<string name="poi_resource_ruby">Errubia</string>
|
||||||
|
<string name="poi_resource_rutile">Errutiloa</string>
|
||||||
|
<string name="poi_resource_slate_iron_ore_copper">Arbela;burdin minerala;kobrea</string>
|
||||||
|
<string name="poi_resource_zircon">Zirkoia</string>
|
||||||
|
|
||||||
|
<string name="poi_wetland_wet_meadow">Belardi hezea</string>
|
||||||
|
<string name="poi_socket_as3112_yes">AS/NZS 3112</string>
|
||||||
|
|
||||||
|
<string name="poi_socket_chademo_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_chademo_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_chademo_output_low">Txikia</string>
|
||||||
|
<string name="poi_socket_type2_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_type2_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_type2_output_low">Txikia</string>
|
||||||
|
<string name="poi_socket_type2_combo_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_type2_combo_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_type2_combo_output_low">Txikia</string>
|
||||||
|
<string name="poi_socket_type3_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_type3_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_type3_output_low">Txikia</string>
|
||||||
|
<string name="poi_socket_cee_blue_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_cee_blue_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_cee_blue_output_low">Txikia</string>
|
||||||
|
<string name="poi_socket_schuko_output_high">Handia</string>
|
||||||
|
<string name="poi_socket_schuko_output_medium">Tartekoa</string>
|
||||||
|
<string name="poi_socket_schuko_output_low">Txikia</string>
|
||||||
|
|
||||||
|
<string name="poi_flooring">Zoladura denda</string>
|
||||||
|
<string name="poi_pottery">Eltzegintza</string>
|
||||||
|
|
||||||
|
<string name="poi_outpost">Dendako entrega-puntua</string>
|
||||||
|
|
||||||
|
<string name="poi_adult_gaming_centre">Helduentzako jokoen zentroa</string>
|
||||||
|
|
||||||
|
<string name="poi_service_vehicle_car_repair_yes">Kotxe konponketa</string>
|
||||||
|
<string name="poi_service_vehicle_oil_change_yes">Olio aldaketa</string>
|
||||||
|
<string name="poi_service_vehicle_used_car_sales_yes">Erabilitako kotxeen salmenta</string>
|
||||||
|
<string name="poi_service_vehicle_brakes_yes">Frenoak</string>
|
||||||
|
<string name="poi_service_vehicle_new_car_sales_yes">Kotxe berrien salmenta</string>
|
||||||
|
<string name="poi_service_vehicle_diagnostics_yes">Diagnostikoak</string>
|
||||||
|
<string name="poi_service_vehicle_car_parts_yes">Kotxerako piezak</string>
|
||||||
|
<string name="poi_service_vehicle_batteries_yes">Bateriak</string>
|
||||||
|
<string name="poi_service_vehicle_air_conditioning_yes">Haize egokitua</string>
|
||||||
|
<string name="poi_service_vehicle_body_repair_yes">Karrozeriaren konponketa</string>
|
||||||
|
<string name="poi_service_vehicle_electrical_yes">Elektrikoa</string>
|
||||||
|
<string name="poi_service_vehicle_wheels_yes">Gurpilak</string>
|
||||||
|
<string name="poi_service_vehicle_glass_yes">Kristala</string>
|
||||||
|
<string name="poi_service_vehicle_truck_repair_yes">Kamioien konponketa</string>
|
||||||
|
<string name="poi_service_vehicle_muffler_yes">Isilgailua</string>
|
||||||
|
<string name="poi_service_vehicle_alignment_yes">Alineazioa</string>
|
||||||
|
<string name="poi_service_vehicle_transmission_repair_yes">Transmisioaren konponketa</string>
|
||||||
|
<string name="poi_service_vehicle_motor_yes">Motorra</string>
|
||||||
|
<string name="poi_service_vehicle_insurance_yes">Asegurua</string>
|
||||||
|
<string name="poi_service_vehicle_tyres_yes">Pneumatikoak</string>
|
||||||
|
|
||||||
|
<string name="poi_climbing_adventure">Eskalada abentura</string>
|
||||||
|
|
||||||
|
<string name="poi_via_ferrata">Via ferrata</string>
|
||||||
|
<string name="poi_cable_number">Kable zenbakia</string>
|
||||||
|
<string name="poi_via_ferrata_scale">Zailtauna</string>
|
||||||
|
|
||||||
|
<string name="poi_glacier_type_plateau">Goi-ordoki</string>
|
||||||
|
<string name="poi_glacier_type_valley">Harana</string>
|
||||||
|
<string name="poi_glacier_type_mountain">Mendia</string>
|
||||||
|
<string name="poi_glacier_type_hanging">Zintzilik</string>
|
||||||
|
<string name="poi_glacier_type_rock">Harkaitza</string>
|
||||||
|
<string name="poi_glacier_type_shelf">Apala</string>
|
||||||
|
<string name="poi_glacier_type_remnant">Geldikia</string>
|
||||||
|
<string name="poi_glacier_type_ice_tongue">Izotz-mihia</string>
|
||||||
|
|
||||||
|
<string name="poi_glacier_ele_top">Punturik altuena</string>
|
||||||
|
<string name="poi_glacier_ele_bottom">Punturik baxuena</string>
|
||||||
|
<string name="poi_glacier_slope">Batez besteko aldapa</string>
|
||||||
|
|
||||||
|
<string name="poi_checkpoint_hiking">Bidezidor kiroleko kontrol-puntua</string>
|
||||||
|
<string name="poi_checkpoint_type_stamp">Zigilatze puntua</string>
|
||||||
|
<string name="poi_checkpoint_type_code">Kodea</string>
|
||||||
|
<string name="poi_checkpoint_type_notebook">Koadernoa</string>
|
||||||
|
<string name="poi_checkpoint_type_needler">Zulatzailea</string>
|
||||||
|
<string name="poi_checkpoint_type_quize">Galdetegia</string>
|
||||||
|
<string name="poi_checkpoint_type_electronic">Elektronikoa</string>
|
||||||
|
<string name="poi_course">Zirkuitoa</string>
|
||||||
|
|
||||||
|
<string name="poi_rock">Harkaitza</string>
|
||||||
|
|
||||||
|
<string name="poi_end_date">Bukaera data</string>
|
||||||
|
|
||||||
|
</resources>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<string name="distance_measurement_finish_subtrack">Hasi azpilorratz berri bat</string>
|
<string name="distance_measurement_finish_subtrack">Hasi azpilorratz berri bat</string>
|
||||||
<string name="distance_measurement_clear_route">Puntu guztiak garbitu</string>
|
<string name="distance_measurement_clear_route">Puntu guztiak garbitu</string>
|
||||||
|
|
||||||
<string name="distance_measurement_load_gpx">Ireki existitzen den GPX lorratza</string>
|
<string name="distance_measurement_load_gpx">Ireki existitzen den GPX fitxategia</string>
|
||||||
<string name="wait_current_task_finished">Mesedez itxaron uneko zeregina bukatu harte</string>
|
<string name="wait_current_task_finished">Mesedez itxaron uneko zeregina bukatu harte</string>
|
||||||
<string name="use_kalman_filter_compass_descr">Iparrorratzean zarata gutxiagotzen du baina inertzia gehitzen du.</string>
|
<string name="use_kalman_filter_compass_descr">Iparrorratzean zarata gutxiagotzen du baina inertzia gehitzen du.</string>
|
||||||
<string name="use_kalman_filter_compass">Erabili Kalman iragazkia</string>
|
<string name="use_kalman_filter_compass">Erabili Kalman iragazkia</string>
|
||||||
|
@ -565,7 +565,7 @@
|
||||||
<string name="gpx_monitoring_disabled_warn">Gorde lorratza GPX trepeta erabiliz edo \'Bidaiaren grabaketa\' ezarpenen bidez.</string>
|
<string name="gpx_monitoring_disabled_warn">Gorde lorratza GPX trepeta erabiliz edo \'Bidaiaren grabaketa\' ezarpenen bidez.</string>
|
||||||
<string name="show_current_gpx_title">Erakutsi uneko lorratza</string>
|
<string name="show_current_gpx_title">Erakutsi uneko lorratza</string>
|
||||||
|
|
||||||
<string name="free_version_message">OsmAnd-en dohaineko bertsio hau %1$s deskargetara dago mugatua eta ez ditu Wikipediako artikuluak lineaz kanpo erabiltzen.</string>
|
<string name="free_version_message">%1$s mapa deskargatu edo eguneratu ditzakezu.</string>
|
||||||
<string name="free_version_title">Doainezko bertsioa</string>
|
<string name="free_version_title">Doainezko bertsioa</string>
|
||||||
<string name="poi_context_menu_showdescription">Erakutsi POI-aren deskripzioa.</string>
|
<string name="poi_context_menu_showdescription">Erakutsi POI-aren deskripzioa.</string>
|
||||||
<string name="index_name_north_america">Ipar Amerika</string>
|
<string name="index_name_north_america">Ipar Amerika</string>
|
||||||
|
@ -661,7 +661,7 @@ Biltegiratzean {1} MB erabiliko dira.
|
||||||
<string name="select_search_position">Jatorria:</string>
|
<string name="select_search_position">Jatorria:</string>
|
||||||
<string name="context_menu_item_search">Bilatu inguruan</string>
|
<string name="context_menu_item_search">Bilatu inguruan</string>
|
||||||
|
|
||||||
<string name="shared_string_save_as_gpx">Gorde GPX lorratz berri gisa</string>
|
<string name="shared_string_save_as_gpx">Gorde GPX fitxategi berri gisa</string>
|
||||||
<string name="route_successfully_saved_at">Ibilbidea \'%1$s\' bezala gorde da.</string>
|
<string name="route_successfully_saved_at">Ibilbidea \'%1$s\' bezala gorde da.</string>
|
||||||
<string name="filename_input">Fitxategi-izena:</string>
|
<string name="filename_input">Fitxategi-izena:</string>
|
||||||
<string name="file_with_name_already_exist">Izen berdineko beste fitxategi bat dago dagoeneko.</string>
|
<string name="file_with_name_already_exist">Izen berdineko beste fitxategi bat dago dagoeneko.</string>
|
||||||
|
@ -893,7 +893,7 @@ Biltegiratzean {1} MB erabiliko dira.
|
||||||
<string name="no_vector_map_loaded">Bektore mapak ez dira kargatuak izan</string>
|
<string name="no_vector_map_loaded">Bektore mapak ez dira kargatuak izan</string>
|
||||||
|
|
||||||
<string name="gpx_files_not_found">Ez da GPX fitxategirik aurkitu lorratzen direktorioan</string>
|
<string name="gpx_files_not_found">Ez da GPX fitxategirik aurkitu lorratzen direktorioan</string>
|
||||||
<string name="layer_gpx_layer">GPX lorratza…</string>
|
<string name="layer_gpx_layer">GPX fitxategiak…</string>
|
||||||
<string name="error_reading_gpx">Ezin izan dira GPX datuak irakurri</string>
|
<string name="error_reading_gpx">Ezin izan dira GPX datuak irakurri</string>
|
||||||
<string name="vector_data">Lineaz kanpoko bektore mapak</string>
|
<string name="vector_data">Lineaz kanpoko bektore mapak</string>
|
||||||
<string name="transport_context_menu">Bilatu garraioa geldiunean</string>
|
<string name="transport_context_menu">Bilatu garraioa geldiunean</string>
|
||||||
|
@ -1060,7 +1060,7 @@ Biltegiratzean {1} MB erabiliko dira.
|
||||||
<string name="loading_cities">Herriak kargatzen…</string>
|
<string name="loading_cities">Herriak kargatzen…</string>
|
||||||
|
|
||||||
<string name="poi">POI</string>
|
<string name="poi">POI</string>
|
||||||
<string name="error_occurred_saving_gpx">Ezin izan da GPX lorratza gorde</string>
|
<string name="error_occurred_saving_gpx">Ezin izan da GPX fitxategia gorde</string>
|
||||||
<string name="error_calculating_route">Ezin izan da ibilbidea kalkulatu</string>
|
<string name="error_calculating_route">Ezin izan da ibilbidea kalkulatu</string>
|
||||||
<string name="error_calculating_route_occured">Ezin izan da ibilbidea kalkulatu</string>
|
<string name="error_calculating_route_occured">Ezin izan da ibilbidea kalkulatu</string>
|
||||||
<string name="empty_route_calculated">Kalkulatutako ibilbidea hutsik dago</string>
|
<string name="empty_route_calculated">Kalkulatutako ibilbidea hutsik dago</string>
|
||||||
|
@ -1072,7 +1072,7 @@ Biltegiratzean {1} MB erabiliko dira.
|
||||||
<string name="loading_data">Datuak kargatzen…</string>
|
<string name="loading_data">Datuak kargatzen…</string>
|
||||||
<string name="reading_indexes">Datu lokalak irakurtzen…</string>
|
<string name="reading_indexes">Datu lokalak irakurtzen…</string>
|
||||||
<string name="previous_run_crashed">Azkeneko OsmAnden exekuzioak huts egin du. Log fitxategia {0} da. Mesedez gertatutakoa jakinarazi eta log fitxategia erantsi.</string>
|
<string name="previous_run_crashed">Azkeneko OsmAnden exekuzioak huts egin du. Log fitxategia {0} da. Mesedez gertatutakoa jakinarazi eta log fitxategia erantsi.</string>
|
||||||
<string name="saving_gpx_tracks">GPX lorratzak SDra gordetzen…</string>
|
<string name="saving_gpx_tracks">GPX fitxategia gordetzen…</string>
|
||||||
<string name="finished_task">Bukatua</string>
|
<string name="finished_task">Bukatua</string>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1087,8 +1087,8 @@ Biltegiratzean {1} MB erabiliko dira.
|
||||||
<string name="osm_settings">OSM edizioa</string>
|
<string name="osm_settings">OSM edizioa</string>
|
||||||
<string name="additional_settings">Gainerako ezarpenak</string>
|
<string name="additional_settings">Gainerako ezarpenak</string>
|
||||||
<string name="shared_string_settings">Ezarpenak</string>
|
<string name="shared_string_settings">Ezarpenak</string>
|
||||||
<string name="save_current_track_descr">Gorde uneko lorratza memoria txartelean orain.</string>
|
<string name="save_current_track_descr">Gorde uneko lorratza GPX fitxategi gisa orain.</string>
|
||||||
<string name="save_current_track">Gorde uneko GPX lorratza</string>
|
<string name="save_current_track">Gorde uneko lorratza</string>
|
||||||
<string name="save_track_interval">Erregistroen tartea nabigazioan</string>
|
<string name="save_track_interval">Erregistroen tartea nabigazioan</string>
|
||||||
<string name="save_track_interval_descr">Aukeratu erregistratze maiztasuna nabigazio bitarteko lorratz grabaketarako.</string>
|
<string name="save_track_interval_descr">Aukeratu erregistratze maiztasuna nabigazio bitarteko lorratz grabaketarako.</string>
|
||||||
<string name="save_track_to_gpx_descrp">GPX lorratza automatikoki gordeko da lorratzen direktorioan nabigazioan zehar.</string>
|
<string name="save_track_to_gpx_descrp">GPX lorratza automatikoki gordeko da lorratzen direktorioan nabigazioan zehar.</string>
|
||||||
|
@ -1750,9 +1750,9 @@ Lorratza %2$s</string>
|
||||||
<string name="save_global_track_interval_descr">Hautatu lorratzen grabatze orokorrerako erregistratze maiztasun bat (Mapan GPX erregistratze trepetaren bidez gaitzen da).</string>
|
<string name="save_global_track_interval_descr">Hautatu lorratzen grabatze orokorrerako erregistratze maiztasun bat (Mapan GPX erregistratze trepetaren bidez gaitzen da).</string>
|
||||||
<string name="save_track_to_gpx_globally">Erregistratu lorratza GPX fitxategian</string>
|
<string name="save_track_to_gpx_globally">Erregistratu lorratza GPX fitxategian</string>
|
||||||
<string name="save_track_to_gpx_globally_headline">Eskaerapeko lorratz erregistroa</string>
|
<string name="save_track_to_gpx_globally_headline">Eskaerapeko lorratz erregistroa</string>
|
||||||
<string name="none_selected_gpx">Ez da GPX fitxategirik aukeratu. Bat aukeratzeko sakatu luze lorratz eskuragarri batean.</string>
|
<string name="none_selected_gpx">Ez da GPX fitxategirik aukeratu. Sakatu luze bat aukeratzeko.</string>
|
||||||
<string name="gpx_info_subtracks">Azpi-lorratzak: %1$s</string>
|
<string name="gpx_info_subtracks">Azpi-lorratzak: %1$s</string>
|
||||||
<string name="gpx_file_is_empty">GPX lorratza hutsa</string>
|
<string name="gpx_file_is_empty">GPX fitxategi hutsa</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="shared_string_trip_recording">Bidaiaren grabaketa</string>
|
<string name="shared_string_trip_recording">Bidaiaren grabaketa</string>
|
||||||
|
@ -2199,7 +2199,7 @@ Eskuragarri {2} MB besterik ez daude.</string>
|
||||||
\n
|
\n
|
||||||
\nGrabatutako lorratzak lagunekin partekatu ditzakezu edo OSM kontribuzio gisa erabili. Kirolariek entrenamenduak grabatzeko erabili dezakete. Lorratzen oinarrizko analisi bat egin daiteke zuzenean OsmAnd erabiliz, bueltako denbora, batezbesteko abiadura, eta abar. eta jakina lorratzak kanpo tresna bereziekin aztertu daitezke ere.</string>
|
\nGrabatutako lorratzak lagunekin partekatu ditzakezu edo OSM kontribuzio gisa erabili. Kirolariek entrenamenduak grabatzeko erabili dezakete. Lorratzen oinarrizko analisi bat egin daiteke zuzenean OsmAnd erabiliz, bueltako denbora, batezbesteko abiadura, eta abar. eta jakina lorratzak kanpo tresna bereziekin aztertu daitezke ere.</string>
|
||||||
<string name="plugin_install_needs_network">Internetera konektatu behar zara gehigarri hau instalatzeko.</string>
|
<string name="plugin_install_needs_network">Internetera konektatu behar zara gehigarri hau instalatzeko.</string>
|
||||||
<string name="activate_srtm_plugin">Gaitu \'SRTM\' gehigarria</string>
|
<string name="activate_srtm_plugin">Aktibatu \'Sestra-kurbak\' gehigarria</string>
|
||||||
<string name="plugins_menu_group">Gehigarriak</string>
|
<string name="plugins_menu_group">Gehigarriak</string>
|
||||||
<string name="rendering_attr_pisteGrooming_name">Pisten prestaketa</string>
|
<string name="rendering_attr_pisteGrooming_name">Pisten prestaketa</string>
|
||||||
<string name="navigate_point_northing">Iparrera</string>
|
<string name="navigate_point_northing">Iparrera</string>
|
||||||
|
@ -2283,7 +2283,7 @@ mapak eta nabigazioa</string>
|
||||||
<string name="favourites">Gogokoak</string>
|
<string name="favourites">Gogokoak</string>
|
||||||
<string name="saved_at_time">Orain hemen gordeta: %1$s</string>
|
<string name="saved_at_time">Orain hemen gordeta: %1$s</string>
|
||||||
<string name="poi_deleted_localy">Aldaketak igotzen dituzunean POIa ezabatuko da</string>
|
<string name="poi_deleted_localy">Aldaketak igotzen dituzunean POIa ezabatuko da</string>
|
||||||
<string name="show_gpx">Erakutsi GPX</string>
|
<string name="show_gpx">Erakutsi GPX datuak</string>
|
||||||
<string name="count_of_lines">Lerro kopurua</string>
|
<string name="count_of_lines">Lerro kopurua</string>
|
||||||
<string name="are_you_sure">Ziur zaude?</string>
|
<string name="are_you_sure">Ziur zaude?</string>
|
||||||
<string name="unsaved_changes_will_be_lost">Gorde gabeko aldaketak galduko dira, Jarraitu?</string>
|
<string name="unsaved_changes_will_be_lost">Gorde gabeko aldaketak galduko dira, Jarraitu?</string>
|
||||||
|
@ -2332,7 +2332,7 @@ mapak eta nabigazioa</string>
|
||||||
\n
|
\n
|
||||||
\nOsmAnden ohiko mapa batetara itzultzeko, gehigarri hau desgaitu edo \'Mapa estiloa\' aldatu \'Konfiguratu mapa\' menuan."</string>
|
\nOsmAnden ohiko mapa batetara itzultzeko, gehigarri hau desgaitu edo \'Mapa estiloa\' aldatu \'Konfiguratu mapa\' menuan."</string>
|
||||||
<string name="fav_point_emoticons_message">Gogoko puntuaren izena aldatu da eta orain %1$s da irriabartxoak dituen katea fitxategira gorde ahal izateko.</string>
|
<string name="fav_point_emoticons_message">Gogoko puntuaren izena aldatu da eta orain %1$s da irriabartxoak dituen katea fitxategira gorde ahal izateko.</string>
|
||||||
<string name="activate_seamarks_plugin">Gaitu \'Itsaso markak\' gehigarria</string>
|
<string name="activate_seamarks_plugin">Aktibatu \'Itsas-mapa ikuspegia\'</string>
|
||||||
<string name="plugin_ski_descr">Gehigarri honek zure eskura jartzen ditu mundu osoko eskiatzeko aldapak, fondoko eski zirkuituak, trabesiako eski ibilbideak, teleferikoak, eta abar. Ibilbideak eta pistak zailtasunaren arabera koloreztatu dira, eta elurtutako paisaiaren itxura duen \'Negu\' estiloko mapa batean adierazten dira.
|
<string name="plugin_ski_descr">Gehigarri honek zure eskura jartzen ditu mundu osoko eskiatzeko aldapak, fondoko eski zirkuituak, trabesiako eski ibilbideak, teleferikoak, eta abar. Ibilbideak eta pistak zailtasunaren arabera koloreztatu dira, eta elurtutako paisaiaren itxura duen \'Negu\' estiloko mapa batean adierazten dira.
|
||||||
\n
|
\n
|
||||||
\nHau aktibatzean ikuspegia \'Negua eta eskia\' estilora aldatzen da, paisaia neguko egoeran bistaratuz. Hau atzera aldatu daiteke gehigarri hau desgaituz eta \'Konfiguratu mapa\' menuko \'Mapa estiloa\' aldatuz.</string>
|
\nHau aktibatzean ikuspegia \'Negua eta eskia\' estilora aldatzen da, paisaia neguko egoeran bistaratuz. Hau atzera aldatu daiteke gehigarri hau desgaituz eta \'Konfiguratu mapa\' menuko \'Mapa estiloa\' aldatuz.</string>
|
||||||
|
@ -2358,7 +2358,7 @@ mapak eta nabigazioa</string>
|
||||||
<string name="no_inet_connection_desc_map">Mapak deskargatzeko beharrezkoa da.</string>
|
<string name="no_inet_connection_desc_map">Mapak deskargatzeko beharrezkoa da.</string>
|
||||||
<string name="search_location">Kokalekua bilatzen…</string>
|
<string name="search_location">Kokalekua bilatzen…</string>
|
||||||
<string name="storage_free_space">Espazio librea</string>
|
<string name="storage_free_space">Espazio librea</string>
|
||||||
<string name="storage_place_description">OsmAnd datuen biltegiratzea (mapak, lorratzak, eta abar): %1$s.</string>
|
<string name="storage_place_description">OsmAnd datuen biltegiratzea (mapak, GPX fitxategiak, eta abar): %1$s.</string>
|
||||||
<string name="give_permission">Eman baimena</string>
|
<string name="give_permission">Eman baimena</string>
|
||||||
<string name="allow_access_location">Eman kokapena atzitzeko baimena</string>
|
<string name="allow_access_location">Eman kokapena atzitzeko baimena</string>
|
||||||
<string name="first_usage_greeting">Jaso jarraibideak eta aurkitu toki berriak Internetera konexiorik gabe</string>
|
<string name="first_usage_greeting">Jaso jarraibideak eta aurkitu toki berriak Internetera konexiorik gabe</string>
|
||||||
|
@ -2437,9 +2437,9 @@ mapak eta nabigazioa</string>
|
||||||
<string name="route_roundabout_short">Hartu %1$d. irteera eta jarraitu</string>
|
<string name="route_roundabout_short">Hartu %1$d. irteera eta jarraitu</string>
|
||||||
<string name="upload_poi">Igo POI bat</string>
|
<string name="upload_poi">Igo POI bat</string>
|
||||||
<string name="route_calculation">Ibilbidearen kalkulua</string>
|
<string name="route_calculation">Ibilbidearen kalkulua</string>
|
||||||
<string name="gpx_no_tracks_title">Ez duzu lorratzik oraindik</string>
|
<string name="gpx_no_tracks_title">Ez duzu GPX fitxategirik oraindik</string>
|
||||||
<string name="gpx_no_tracks_title_folder">Lorratzak karpetara gehitu ditzakezu ere</string>
|
<string name="gpx_no_tracks_title_folder">GPX fitxategiak karpetara gehitu ditzakezu ere</string>
|
||||||
<string name="gpx_add_track">Gehitu lorratza</string>
|
<string name="gpx_add_track">Gehitu GPX fitxategia</string>
|
||||||
<string name="gpx_appearance">Itxura</string>
|
<string name="gpx_appearance">Itxura</string>
|
||||||
<string name="rendering_value_fine_name">Ongi</string>
|
<string name="rendering_value_fine_name">Ongi</string>
|
||||||
<string name="search_map_hint">Bilatu hiria edo eskualdea</string>
|
<string name="search_map_hint">Bilatu hiria edo eskualdea</string>
|
||||||
|
@ -2583,7 +2583,7 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="points_delete_multiple_succesful">Puntuak ezabatu dira.</string>
|
<string name="points_delete_multiple_succesful">Puntuak ezabatu dira.</string>
|
||||||
<string name="points_delete_multiple">%1$d puntu ezabatuko dituzu. Ziur zaude?</string>
|
<string name="points_delete_multiple">%1$d puntu ezabatuko dituzu. Ziur zaude?</string>
|
||||||
<string name="route_points_category_name">Ibilbide honetan pasatu beharreko bide-gurutzeak</string>
|
<string name="route_points_category_name">Ibilbide honetan pasatu beharreko bide-gurutzeak</string>
|
||||||
<string name="track_points_category_name">Ibilbide honetako puntu nabarmenak</string>
|
<string name="track_points_category_name">Bide-puntuak, interesezko puntuak, izena duten ezaugarriak</string>
|
||||||
<string name="shared_string_gpx_track">Lorratza</string>
|
<string name="shared_string_gpx_track">Lorratza</string>
|
||||||
<string name="max_speed">Gehieneko abiadura</string>
|
<string name="max_speed">Gehieneko abiadura</string>
|
||||||
<string name="average_speed">Batezbesteko abiadura</string>
|
<string name="average_speed">Batezbesteko abiadura</string>
|
||||||
|
@ -2593,7 +2593,7 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="shared_string_start_time">Irteera</string>
|
<string name="shared_string_start_time">Irteera</string>
|
||||||
<string name="shared_string_end_time">Iritsiera</string>
|
<string name="shared_string_end_time">Iritsiera</string>
|
||||||
<string name="shared_string_color">Kolorea</string>
|
<string name="shared_string_color">Kolorea</string>
|
||||||
<string name="select_gpx_folder">Hautatu lorratzen karpeta</string>
|
<string name="select_gpx_folder">Hautatu GPX fitxategien karpeta</string>
|
||||||
<string name="file_can_not_be_moved">Fitxategia ezin da lekuz aldatu.</string>
|
<string name="file_can_not_be_moved">Fitxategia ezin da lekuz aldatu.</string>
|
||||||
<string name="shared_string_move">Lekuz aldatu</string>
|
<string name="shared_string_move">Lekuz aldatu</string>
|
||||||
<string name="shared_string_gpx_tracks">Lorratzak</string>
|
<string name="shared_string_gpx_tracks">Lorratzak</string>
|
||||||
|
@ -2609,7 +2609,7 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="routing_attr_height_obstacles_name">Erabili elebazio kotak</string>
|
<string name="routing_attr_height_obstacles_name">Erabili elebazio kotak</string>
|
||||||
<string name="routing_attr_height_obstacles_description">Erabili SRT, ASTER, eta EU-DEM hornitzaileen elebazio datuak.</string>
|
<string name="routing_attr_height_obstacles_description">Kontuan izan terrenoaren elebazioa (SRTM, ASTER, eta EU-DEM datuen bidez).</string>
|
||||||
|
|
||||||
<string name="shared_string_slope">Malda</string>
|
<string name="shared_string_slope">Malda</string>
|
||||||
<string name="lang_ber">Berberera</string>
|
<string name="lang_ber">Berberera</string>
|
||||||
|
@ -2906,14 +2906,14 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="choose_navigation_type">Hautatu nabigazio profila</string>
|
<string name="choose_navigation_type">Hautatu nabigazio profila</string>
|
||||||
<string name="add_route_points">Gehitu ibilbide-puntuak</string>
|
<string name="add_route_points">Gehitu ibilbide-puntuak</string>
|
||||||
<string name="add_line">Gehitu lerroa</string>
|
<string name="add_line">Gehitu lerroa</string>
|
||||||
<string name="empty_state_my_tracks">Gehitu eta grabatu lorratzak</string>
|
<string name="empty_state_my_tracks">Gehitu GPX fitxategiak</string>
|
||||||
<string name="empty_state_my_tracks_desc">Grabatu edo inportatu lorratzak ikusteko.</string>
|
<string name="empty_state_my_tracks_desc">Inportatu GPX fitxategiak, edo grabatu lorratzak.</string>
|
||||||
<string name="empty_state_favourites">Gehitu gogokoak</string>
|
<string name="empty_state_favourites">Gehitu gogokoak</string>
|
||||||
<string name="empty_state_favourites_desc">Inportatu edo markatu gogokoak mapan.</string>
|
<string name="empty_state_favourites_desc">Inportatu gogokoak, edo gehitu mapan puntuak markatuz.</string>
|
||||||
<string name="import_track">Inportatu lorratza</string>
|
<string name="import_track">Inportatu GPX fitxategia</string>
|
||||||
<string name="import_track_desc">%1$s fitxategiak ez du bide-punturik, inportatu lorratz gisa?</string>
|
<string name="import_track_desc">%1$s fitxategiak ez du bide-punturik, inportatu lorratz gisa?</string>
|
||||||
<string name="move_point">Mugitu puntua</string>
|
<string name="move_point">Mugitu puntua</string>
|
||||||
<string name="add_segment_to_the_track">Gehitu GPX lorratzera</string>
|
<string name="add_segment_to_the_track">Gehitu GPX fitxategira</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed">Maparen orientazioaren atalasea</string>
|
<string name="map_orientation_change_in_accordance_with_speed">Maparen orientazioaren atalasea</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed_descr">"Hautatu maparen orientazioa \'barne ipar-orratza\' eta ez \'mugimenduaren norabidea\'-ren arabera erabakitzeko abiadura."</string>
|
<string name="map_orientation_change_in_accordance_with_speed_descr">"Hautatu maparen orientazioa \'barne ipar-orratza\' eta ez \'mugimenduaren norabidea\'-ren arabera erabakitzeko abiadura."</string>
|
||||||
<string name="all_markers_moved_to_history">Markatzaile guztiak historialera mugituta</string>
|
<string name="all_markers_moved_to_history">Markatzaile guztiak historialera mugituta</string>
|
||||||
|
@ -2964,16 +2964,16 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="looking_for_tracks_with_waypoints">Bide-puntuak dituzten lorratzak bilatzen</string>
|
<string name="looking_for_tracks_with_waypoints">Bide-puntuak dituzten lorratzak bilatzen</string>
|
||||||
<string name="shared_string_more_without_dots">Gehiago</string>
|
<string name="shared_string_more_without_dots">Gehiago</string>
|
||||||
<string name="appearance_on_the_map">Maparen itxura</string>
|
<string name="appearance_on_the_map">Maparen itxura</string>
|
||||||
<string name="add_track_to_markers_descr">Bide-puntuak markatzaileetara gehitu ahal dira, bide-puntuak dituzten lorratz hauetako bat hautatuz.</string>
|
<string name="add_track_to_markers_descr">Hautatu lorratz bat bere bide-puntuak markatzaileetara gehitzeko.</string>
|
||||||
<string name="add_favourites_group_to_markers_descr">Hautatu gogoko kategoria bat markatzaileetara gehitzeko.</string>
|
<string name="add_favourites_group_to_markers_descr">Hautatu gogoko kategoria bat markatzaileetara gehitzeko.</string>
|
||||||
<string name="shared_string_gpx_waypoints">Lorratzaren bide-puntuak</string>
|
<string name="shared_string_gpx_waypoints">Lorratzaren bide-puntuak</string>
|
||||||
<string name="favourites_group">Gogokoak kategoria</string>
|
<string name="favourites_group">Gogokoak kategoria</string>
|
||||||
<string name="add_group">Gehitu talde bat</string>
|
<string name="add_group">Gehitu talde bat</string>
|
||||||
<string name="add_group_descr">"Inportatu taldeak gogokoetatik eta lorratzaren bide-puntuetatik."</string>
|
<string name="add_group_descr">Inportatu taldeak gogokoetatik eta GPX bide-puntuetatik.</string>
|
||||||
<string name="empty_state_markers_active">Sortu mapa-markatzaileak!</string>
|
<string name="empty_state_markers_active">Sortu mapa-markatzaileak!</string>
|
||||||
<string name="empty_state_markers_active_desc">Sakatu labur edo luze \'Tokiak\', gero sakatu markatzaile-bandera botoian.</string>
|
<string name="empty_state_markers_active_desc">Sakatu labur edo luze \'Tokiak\', gero sakatu markatzaile-bandera botoian.</string>
|
||||||
<string name="empty_state_markers_groups">Inportatu taldeak</string>
|
<string name="empty_state_markers_groups">Inportatu taldeak</string>
|
||||||
<string name="empty_state_markers_groups_desc">Inportatu gogokoen taldeak edo lorratzen bide-puntuak markatzaile gisa.</string>
|
<string name="empty_state_markers_groups_desc">Inportatu gogokoen taldeak edo bide-puntuak markatzaile gisa.</string>
|
||||||
<string name="empty_state_markers_history_desc">Pasatutako gisa markatutako markatzaileak pantaila honetan agertzen dira.</string>
|
<string name="empty_state_markers_history_desc">Pasatutako gisa markatutako markatzaileak pantaila honetan agertzen dira.</string>
|
||||||
<string name="shared_string_two">Bi</string>
|
<string name="shared_string_two">Bi</string>
|
||||||
<string name="shared_string_one">Bat</string>
|
<string name="shared_string_one">Bat</string>
|
||||||
|
@ -2990,7 +2990,7 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="go_to_next_field">Hurrengo eremura</string>
|
<string name="go_to_next_field">Hurrengo eremura</string>
|
||||||
<string name="rename_marker">Aldatu izena markatzaileari</string>
|
<string name="rename_marker">Aldatu izena markatzaileari</string>
|
||||||
<string name="tap_on_map_to_hide_interface">Pantaila osoko modua</string>
|
<string name="tap_on_map_to_hide_interface">Pantaila osoko modua</string>
|
||||||
<string name="import_gpx_file_description">gogoko edo lorratz fitxategi gisa inportatu daiteke.</string>
|
<string name="import_gpx_file_description">gogoko edo GPX fitxategi gisa inportatu daiteke.</string>
|
||||||
<string name="import_as_gpx">Inportatu GPX fitxategi gisa</string>
|
<string name="import_as_gpx">Inportatu GPX fitxategi gisa</string>
|
||||||
<string name="import_as_favorites">Inportatu gogoko gisa</string>
|
<string name="import_as_favorites">Inportatu gogoko gisa</string>
|
||||||
<string name="import_file">Inportatu fitxategia</string>
|
<string name="import_file">Inportatu fitxategia</string>
|
||||||
|
@ -3028,8 +3028,8 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="shared_string_sort">Ordenatu</string>
|
<string name="shared_string_sort">Ordenatu</string>
|
||||||
<string name="coordinate_input">Koordenatuen sarrera</string>
|
<string name="coordinate_input">Koordenatuen sarrera</string>
|
||||||
<string name="is_saved">gorde da</string>
|
<string name="is_saved">gorde da</string>
|
||||||
<string name="marker_save_as_track_descr">Esportatu zure markatzaileak honako fitxategi honetara:</string>
|
<string name="marker_save_as_track_descr">Esportatu zure markatzaileak honako GPX fitxategi honetara:</string>
|
||||||
<string name="marker_save_as_track">Gorde lorratz gisa</string>
|
<string name="marker_save_as_track">Gorde GPX fitxategi gisa</string>
|
||||||
<string name="move_to_history">Eraman historialera</string>
|
<string name="move_to_history">Eraman historialera</string>
|
||||||
<string name="group_will_be_removed_after_restart">Taldea ez da egongo da aplikazioa berrabiarazten denean.</string>
|
<string name="group_will_be_removed_after_restart">Taldea ez da egongo da aplikazioa berrabiarazten denean.</string>
|
||||||
<string name="show_guide_line">Erakutsi norabide lerroak</string>
|
<string name="show_guide_line">Erakutsi norabide lerroak</string>
|
||||||
|
@ -3106,7 +3106,7 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="map_import_error">Maparen inportazio errorea</string>
|
<string name="map_import_error">Maparen inportazio errorea</string>
|
||||||
<string name="map_imported_successfully">Mapa inportatu da</string>
|
<string name="map_imported_successfully">Mapa inportatu da</string>
|
||||||
<string name="transport_nearby_routes_within">Inguruko ibilbideak</string>
|
<string name="transport_nearby_routes_within">Inguruko ibilbideak</string>
|
||||||
<string name="transport_nearby_routes">Inguruan</string>
|
<string name="transport_nearby_routes">Erradioa</string>
|
||||||
<string name="distance_farthest">Distantzia: Urrunena lehenbizi</string>
|
<string name="distance_farthest">Distantzia: Urrunena lehenbizi</string>
|
||||||
<string name="distance_nearest">Distantzia: Hurbilena lehenbizi</string>
|
<string name="distance_nearest">Distantzia: Hurbilena lehenbizi</string>
|
||||||
<string name="enter_lon">Sartu longitudea</string>
|
<string name="enter_lon">Sartu longitudea</string>
|
||||||
|
@ -3132,15 +3132,16 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="shared_string_do">Bai</string>
|
<string name="shared_string_do">Bai</string>
|
||||||
<string name="shared_string_only_with_wifi">Soilik Wi-Fi bidez</string>
|
<string name="shared_string_only_with_wifi">Soilik Wi-Fi bidez</string>
|
||||||
<string name="wikivoyage_download_pics">Deskargatu irudiak</string>
|
<string name="wikivoyage_download_pics">Deskargatu irudiak</string>
|
||||||
<string name="wikivoyage_download_pics_descr">Artikuluetako irudiak deskargatu daitezke konexiorik gabe erabiltzeko. Ezarpen hau aldatzeko zoaz Arakatu > Aukerak atalera.</string>
|
<string name="wikivoyage_download_pics_descr">"Artikuluetako irudiak konexiorik gabe erabiltzeko deskargatu daitezke.
|
||||||
|
\nEzarpen hau Arakatu > Aukerak atalean aldatu dezakezu."</string>
|
||||||
<string name="shared_string_wifi_only">Soilik Wi-Fi</string>
|
<string name="shared_string_wifi_only">Soilik Wi-Fi</string>
|
||||||
<string name="select_travel_book">Hautatu bidai liburua</string>
|
<string name="select_travel_book">Hautatu bidai-liburu bat</string>
|
||||||
<string name="shared_string_travel_book">Bidai liburua</string>
|
<string name="shared_string_travel_book">Bidai liburua</string>
|
||||||
<string name="online_webpage_warning">Orria sarean besterik ez dago eskuragarri. Web nabigatzaile batean ireki nahi duzu?</string>
|
<string name="online_webpage_warning">Orria sarean besterik ez dago eskuragarri. Web nabigatzaile batean ireki nahi duzu?</string>
|
||||||
<string name="images_cache">Irudien cache-a</string>
|
<string name="images_cache">Irudien cache-a</string>
|
||||||
<string name="delete_search_history">Ezabatu bilaketa historiala</string>
|
<string name="delete_search_history">Ezabatu bilaketa historiala</string>
|
||||||
<string name="download_images">Erakutsi irudiak</string>
|
<string name="download_images">Deskargatu irudiak</string>
|
||||||
<string name="download_maps_travel">Bidai mapak</string>
|
<string name="download_maps_travel">Bidai-gidak</string>
|
||||||
<string name="shared_string_wikivoyage">Wikivoyage</string>
|
<string name="shared_string_wikivoyage">Wikivoyage</string>
|
||||||
<string name="article_removed">Artikulua kenduta</string>
|
<string name="article_removed">Artikulua kenduta</string>
|
||||||
<string name="wikivoyage_search_hint">Bilatu: Herrialdea, hiria, probintzia</string>
|
<string name="wikivoyage_search_hint">Bilatu: Herrialdea, hiria, probintzia</string>
|
||||||
|
@ -3154,9 +3155,9 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="waypoints_removed_from_map_markers">Bide-puntuak mapa markatzaileetatik kendu dira</string>
|
<string name="waypoints_removed_from_map_markers">Bide-puntuak mapa markatzaileetatik kendu dira</string>
|
||||||
<string name="index_item_world_wikivoyage">Mundu osoko Wikivoyage artikuluak</string>
|
<string name="index_item_world_wikivoyage">Mundu osoko Wikivoyage artikuluak</string>
|
||||||
<string name="wikivoyage_travel_guide_descr">Planetako leku interesgarrienetarako gidak, OsmAnd-en bertan eta Internet konexiorik gabe.</string>
|
<string name="wikivoyage_travel_guide_descr">Planetako leku interesgarrienetarako gidak, OsmAnd-en bertan eta Internet konexiorik gabe.</string>
|
||||||
<string name="wikivoyage_travel_guide">Wikivoyage bidai gida</string>
|
<string name="wikivoyage_travel_guide">Bidai-gidak</string>
|
||||||
<string name="purchase_dialog_title">Hautatu plana</string>
|
<string name="purchase_dialog_title">Hautatu plana</string>
|
||||||
<string name="purchase_dialog_travel_description">Erosi hauetako bat bidai-artikuluak konexiorik gabe irakurtzeko:</string>
|
<string name="purchase_dialog_travel_description">Erosi hauetako bat lineaz kanpoko bidai-giden funtzioa eskuratzeko:</string>
|
||||||
<string name="purchase_dialog_subtitle">Hautatu elementu egokia:</string>
|
<string name="purchase_dialog_subtitle">Hautatu elementu egokia:</string>
|
||||||
<string name="monthly_map_updates">Mapen eguneraketak: <b>Hilero</b></string>
|
<string name="monthly_map_updates">Mapen eguneraketak: <b>Hilero</b></string>
|
||||||
<string name="daily_map_updates">Mapen eguneraketak: <b>Egunero, orduero</b></string>
|
<string name="daily_map_updates">Mapen eguneraketak: <b>Egunero, orduero</b></string>
|
||||||
|
@ -3190,9 +3191,9 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
|
|
||||||
<string name="maps_you_need_descr">Gogoko dituzun artikuluetan oinarrituta, honako mapak deskargatzea aholkatzen dizugu:</string>
|
<string name="maps_you_need_descr">Gogoko dituzun artikuluetan oinarrituta, honako mapak deskargatzea aholkatzen dizugu:</string>
|
||||||
<string name="maps_you_need">Behar dituzun mapak</string>
|
<string name="maps_you_need">Behar dituzun mapak</string>
|
||||||
<string name="travel_card_download_descr">Deskargatu Wikivoyage bidai gida hauek munduko tokien inguruko artikuluak ikusteko Internetera konexioa ez duzunean ere.</string>
|
<string name="travel_card_download_descr">Deskargatu Wikivoyage bidai gidak munduko tokien inguruko artikuluak ikusteko Internetera konexioa ez duzunean ere.</string>
|
||||||
<string name="start_editing_card_image_text">Edonork idatzi dezakeen mundu osoko doako gida.</string>
|
<string name="start_editing_card_image_text">Edonork idatzi dezakeen mundu osoko doako gida.</string>
|
||||||
<string name="welcome_to_open_beta_description">Bidaia Wikivoyage-n oinarrituta dago. Probatu doan ezaugarri guztiak besta probatze garai irekian. Gero, Bidaia OsmAnd Unlimited harpidedunentzat eta OsmAnd+ erosleentzat egongo da eskuragarri</string>
|
<string name="welcome_to_open_beta_description">Bidai-gidak Wikivoyage-n oinarrituta daude. Probatu doan ezaugarri guztiak besta probatze garai irekian. Gero, Bidaia-gidak OsmAnd Unlimited harpidedunentzat eta OsmAnd+ erosleentzat egongo da eskuragarri.</string>
|
||||||
<string name="start_editing_card_description">Wikivoyage-ko edozein artikulu aldatu dezakezu. Partekatu ezagutza, esperientzia, talentua eta zure atentzioa</string>
|
<string name="start_editing_card_description">Wikivoyage-ko edozein artikulu aldatu dezakezu. Partekatu ezagutza, esperientzia, talentua eta zure atentzioa</string>
|
||||||
<string name="welcome_to_open_beta">Ongi etorri beta irekira</string>
|
<string name="welcome_to_open_beta">Ongi etorri beta irekira</string>
|
||||||
<string name="contour_lines_hillshade_maps">Sestra-kurbak eta mendi itzalak</string>
|
<string name="contour_lines_hillshade_maps">Sestra-kurbak eta mendi itzalak</string>
|
||||||
|
@ -3212,4 +3213,28 @@ Area honi dagokio: %1$s x %2$s</string>
|
||||||
<string name="read_wikipedia_offline">Irakurri Wikipedia sarean</string>
|
<string name="read_wikipedia_offline">Irakurri Wikipedia sarean</string>
|
||||||
<string name="download_all">Deskargatu dena</string>
|
<string name="download_all">Deskargatu dena</string>
|
||||||
<string name="shared_string_bookmark">Gogokoa</string>
|
<string name="shared_string_bookmark">Gogokoa</string>
|
||||||
|
<string name="get_osmand_live">Eskuratu OsmAnd Live ezaugarri guztiak desblokeatzeko: Mapen eguneraketak egunero deskarga mugarik gabe, ordainpeko eta doako gehigarri guztiak, Wikipedia, Wikivoyage eta askoz gehiago.</string>
|
||||||
|
<string name="unirs_render_descr">Lehenetsitako itxuraren aldaera, oinezko eta bizikleten bideen kontrastea handitzeko. Mapnik kolore zaharrak erabiltzen ditu.</string>
|
||||||
|
<string name="off_road_render_descr">Errepidetik kanpo gidatzean erabilgarria. Atzealdeko mapa gisa satelite irudiak erabiltzeko egokia. Gakoak: Errepideen zabalera murriztua, eta bide, bidexka eta bidegorrien zabalera handitua.</string>
|
||||||
|
<string name="nautical_render_descr">Nabigazio nautikorako estiloa. Ezaugarri nagusiak: Boiak, faroak, ibai bideak, itxas erreiak eta markak, portuak, itsas zerbitzuak, sakonera marrak.</string>
|
||||||
|
<string name="ski_map_render_descr">Eskiatzeko estiloa. Ezaugarri nagusiak: Pisten marrazketa, arrastreak eta bestelako eskiatzeko ezaugarriak eroso jarrita. Bestelako ezaugarriak leunduak ez distraitzeko.</string>
|
||||||
|
<string name="light_rs_render_descr">Kotxe nabigaziorako estilo sinple eta kontraste handikoa. Begietara xamurra gau moduan. Ezaugarri nagusiak. Sestra-kurbak, kontraste handiko errepideak, bestelako ezaugarriak leunduak ez distraitzeko.</string>
|
||||||
|
<string name="topo_render_descr">Bidezidor kirol eta mendiko bizikletarako kontraste-estiloa. Irakurgarritasun ona argi egoera konplexuetan. Ezaugarri nagusiak: Bide eta objektu naturalen kontrastea, ibilbide mota desberdinak, sestra-kurbak ezarpen aurreratuekin, lehenetsitako estiloa baino xehetasun gehiago dagokion zoom mailetan. Azaleraren egonkortasunaren aukerak bidearen zoladuraren kalitatea bereiztea ahalbidetzen dizu. Gau modurik ez.</string>
|
||||||
|
<string name="mapnik_render_descr">\'Mapnik\' lehenetsitako marrazketa estilo zaharra. Ezaugarri nagusiak: Koloreak Mapnik estiloaren antzekoak dira.</string>
|
||||||
|
<string name="touring_view_render_descr">Xehetasun handiko estiloa errepiderako. Lehenetsitako estiloaren konfigurazio aukera guztiak ditu, gainera: Ahal beste xehetasun erakusten ditu, bereziki errepideak, bideak eta bestelako garraio-bideak. Bide moten arteko bereizketa bisual argia, errepide-mapa askoren antzekoa. Kontraste handiko eskema naturan erabiltzeko, egun eta gau moduak.</string>
|
||||||
|
<string name="default_render_descr">Erabilera orokorrerako estiloa. Biztanle askoko hirietan estilo sinplifikatua. Ezaugarri nagusiak: estra-kurbak, ibilbideak, zuladuraren kalitatea, sarbide-mugak, bideak SAC eskalaren arabera marrazten dira.</string>
|
||||||
|
<string name="release_3_0">• Berria: Lineaz kanpoko bidi gida globalentzako euskarria. Aipatutako kokalekuak mapan estekatzen dira. Hasierako datuak Wikivoyage-tik.
|
||||||
|
\n
|
||||||
|
\n • Wikipedia: Itxura berria, esteka aktiboak, irudiak onartzen dira
|
||||||
|
\n
|
||||||
|
\n • Open Track UI: Bide-puntu taldeentzako euskarria
|
||||||
|
\n
|
||||||
|
\n • Mapa-markatzaileak: Inportatu hautatutako taldeak GPX fitxategietatik, korrdenatuen sarrera, itxura berria
|
||||||
|
\n
|
||||||
|
\n • OsmAnd Live harpidetzak orain OsmAnd ezaugarri guztiak onartzen ditu
|
||||||
|
\n
|
||||||
|
\n</string>
|
||||||
|
<string name="shared_string_gpx_files">GPX fitxategiak</string>
|
||||||
|
<string name="access_intermediate_arrival_time">Tarteko iritsiera ordua</string>
|
||||||
|
<string name="map_widget_intermediate_time">Tarteko denbora</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -526,7 +526,7 @@
|
||||||
<string name="poi_craft_roofer">ایزوگام</string>
|
<string name="poi_craft_roofer">ایزوگام</string>
|
||||||
<string name="poi_craft_saddler">سراج</string>
|
<string name="poi_craft_saddler">سراج</string>
|
||||||
<string name="poi_craft_sailmaker">لوازم قایق</string>
|
<string name="poi_craft_sailmaker">لوازم قایق</string>
|
||||||
<string name="poi_craft_sawmill">پوب بری</string>
|
<string name="poi_craft_sawmill">چوب بری</string>
|
||||||
<string name="poi_craft_scaffolder"/>
|
<string name="poi_craft_scaffolder"/>
|
||||||
<string name="poi_craft_sculptor">مجسمه ساز</string>
|
<string name="poi_craft_sculptor">مجسمه ساز</string>
|
||||||
<string name="poi_craft_shoemaker">کفاش</string>
|
<string name="poi_craft_shoemaker">کفاش</string>
|
||||||
|
@ -818,7 +818,7 @@
|
||||||
<string name="poi_healthcare">سلامت</string>
|
<string name="poi_healthcare">سلامت</string>
|
||||||
<string name="poi_office">اداره</string>
|
<string name="poi_office">اداره</string>
|
||||||
<string name="poi_tourism">گردشگری</string>
|
<string name="poi_tourism">گردشگری</string>
|
||||||
<string name="poi_sightseeing">دیدن دیدنیها</string>
|
<string name="poi_sightseeing">دیدنیها</string>
|
||||||
<string name="poi_accomodation">محل اسکان</string>
|
<string name="poi_accomodation">محل اسکان</string>
|
||||||
<string name="poi_internet_access">اینترنت</string>
|
<string name="poi_internet_access">اینترنت</string>
|
||||||
<string name="poi_entertainment">اوقات فراغت</string>
|
<string name="poi_entertainment">اوقات فراغت</string>
|
||||||
|
|
|
@ -2569,7 +2569,7 @@
|
||||||
<string name="retry">تلاش مجدد</string>
|
<string name="retry">تلاش مجدد</string>
|
||||||
<string name="add_line">افزودن خط</string>
|
<string name="add_line">افزودن خط</string>
|
||||||
<string name="empty_state_favourites">افزودن نقاط برگزیده</string>
|
<string name="empty_state_favourites">افزودن نقاط برگزیده</string>
|
||||||
<string name="empty_state_favourites_desc">نقاط برگزیده را روی نقشه علامت بزنید یا آنها را از یک فایل وارد کنید.</string>
|
<string name="empty_state_favourites_desc">نقاط موردعلاقهتان را روی نقشه علامت بزنید یا آنها را از یک فایل وارد کنید.</string>
|
||||||
<string name="move_point">جابهجاکردن نقطه</string>
|
<string name="move_point">جابهجاکردن نقطه</string>
|
||||||
<string name="make_round_trip_descr">نقطهٔ شروع را بهعنوان مقصد هم در نظر بگیر.</string>
|
<string name="make_round_trip_descr">نقطهٔ شروع را بهعنوان مقصد هم در نظر بگیر.</string>
|
||||||
<string name="make_round_trip">ایجاد سفر رفتوبرگشتی</string>
|
<string name="make_round_trip">ایجاد سفر رفتوبرگشتی</string>
|
||||||
|
@ -2583,7 +2583,7 @@
|
||||||
<string name="my_location">موقعیت من</string>
|
<string name="my_location">موقعیت من</string>
|
||||||
<string name="shared_string_finish">پایان</string>
|
<string name="shared_string_finish">پایان</string>
|
||||||
<string name="plan_route">طراحی مسیر</string>
|
<string name="plan_route">طراحی مسیر</string>
|
||||||
<string name="shared_string_sort">مرتبکردن</string>
|
<string name="shared_string_sort">مرتبسازی</string>
|
||||||
<string name="coordinate_input">واردکردن مختصات</string>
|
<string name="coordinate_input">واردکردن مختصات</string>
|
||||||
<string name="is_saved">ذخیره شد</string>
|
<string name="is_saved">ذخیره شد</string>
|
||||||
<string name="marker_save_as_track_descr">نشانههایتان را در این فایل GPX ذخیره کنید:</string>
|
<string name="marker_save_as_track_descr">نشانههایتان را در این فایل GPX ذخیره کنید:</string>
|
||||||
|
@ -2592,7 +2592,7 @@
|
||||||
<string name="descendingly">نزولی</string>
|
<string name="descendingly">نزولی</string>
|
||||||
<string name="marker_show_distance_descr">مسافت تا نشانهها و جهتگیری بهسمت آنها چگونه روی نقشه نشان داده شود:</string>
|
<string name="marker_show_distance_descr">مسافت تا نشانهها و جهتگیری بهسمت آنها چگونه روی نقشه نشان داده شود:</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed">آستانهٔ تغییر جهت نقشه</string>
|
<string name="map_orientation_change_in_accordance_with_speed">آستانهٔ تغییر جهت نقشه</string>
|
||||||
<string name="map_orientation_change_in_accordance_with_speed_descr">مشخص کنید که در چه سرعتی جهت نقشه از «در جهت حرکت» به «در جهت قطبنما» تغییر کند.</string>
|
<string name="map_orientation_change_in_accordance_with_speed_descr">مشخص کنید در چه سرعتی جهت نقشه از «در جهت حرکت» به «در جهت قطبنما» تغییر کند.</string>
|
||||||
<string name="all_markers_moved_to_history">همهٔ نشانههای نقشه به سابقه منتقل شد</string>
|
<string name="all_markers_moved_to_history">همهٔ نشانههای نقشه به سابقه منتقل شد</string>
|
||||||
<string name="marker_moved_to_history">نشانهٔ نقشه به سابقه منتقل شد</string>
|
<string name="marker_moved_to_history">نشانهٔ نقشه به سابقه منتقل شد</string>
|
||||||
<string name="marker_moved_to_active">نشانهٔ نقشه به قسمت فعال منتقل شد</string>
|
<string name="marker_moved_to_active">نشانهٔ نقشه به قسمت فعال منتقل شد</string>
|
||||||
|
@ -2885,7 +2885,7 @@
|
||||||
\n • رابط کاربری و شیوهٔ دانلود اطلاعات نقشهها بازسازی شده است
|
\n • رابط کاربری و شیوهٔ دانلود اطلاعات نقشهها بازسازی شده است
|
||||||
\n
|
\n
|
||||||
\n و…</string>
|
\n و…</string>
|
||||||
<string name="av_locations_descr">فایل GPX با مکانهای یادداشتدار.</string>
|
<string name="av_locations_descr">فایل GPX از مکانهای یادداشتدار.</string>
|
||||||
<string name="osmand_plus_extended_description_part1">برنامهٔ OsmAnd+ (مخفف OSM Automated Navigation Directions بهمعنی راهبری خودکار با نقشهٔ OSM) یک نرمافزار نقشه و راهبری است که به گسترهٔ وسیعی از دادههای نقشهٔ باز شهری (OpenStreetMap یا بهصورت خلاصه OSM) دسترسی دارد. این دادههای رایگان و جهانی با بالاترین کیفیت ارائه میشوند.
|
<string name="osmand_plus_extended_description_part1">برنامهٔ OsmAnd+ (مخفف OSM Automated Navigation Directions بهمعنی راهبری خودکار با نقشهٔ OSM) یک نرمافزار نقشه و راهبری است که به گسترهٔ وسیعی از دادههای نقشهٔ باز شهری (OpenStreetMap یا بهصورت خلاصه OSM) دسترسی دارد. این دادههای رایگان و جهانی با بالاترین کیفیت ارائه میشوند.
|
||||||
\n
|
\n
|
||||||
\nراهبر دیداری و شنیداری، مشاهدهٔ مکانهای محبوب (POIها یا Points of interest)، ایجاد و مدیریت ردهای GPX، استفاده از تصویرسازی منحنیهای تراز و اطلاعات ارتفاع، انتخاب حالتهای پیاده، دوچرخه، خودرو، امکان ویرایش مکانها و... چیزهایی هستند که تجربهٔ مؤثر و لذتبخشی را در کار با نقشه برایتان به ارمغان میآورد.
|
\nراهبر دیداری و شنیداری، مشاهدهٔ مکانهای محبوب (POIها یا Points of interest)، ایجاد و مدیریت ردهای GPX، استفاده از تصویرسازی منحنیهای تراز و اطلاعات ارتفاع، انتخاب حالتهای پیاده، دوچرخه، خودرو، امکان ویرایش مکانها و... چیزهایی هستند که تجربهٔ مؤثر و لذتبخشی را در کار با نقشه برایتان به ارمغان میآورد.
|
||||||
|
@ -3021,7 +3021,7 @@
|
||||||
<string name="shared_string_one">یک</string>
|
<string name="shared_string_one">یک</string>
|
||||||
<string name="show_guide_line_descr">خطوط جهتداری را از موقعیت شما بهسمت نشانههای فعال نمایش میدهد.</string>
|
<string name="show_guide_line_descr">خطوط جهتداری را از موقعیت شما بهسمت نشانههای فعال نمایش میدهد.</string>
|
||||||
<string name="show_arrows_descr">با یک یا دو پیکان، سمت قرارگیری نشانههای فعال روی نقشه را نمایش میدهد.</string>
|
<string name="show_arrows_descr">با یک یا دو پیکان، سمت قرارگیری نشانههای فعال روی نقشه را نمایش میدهد.</string>
|
||||||
<string name="distance_indication_descr">مشخص کنید که مسافت شما تا نشانههای فعال چگونه نشان داده شود.</string>
|
<string name="distance_indication_descr">مشخص کنید مسافت شما تا نشانههای فعال کجا نشان داده شود.</string>
|
||||||
<string name="active_markers_descr">تعداد نشانههای فعال روی نقشه را مشخص کنید.</string>
|
<string name="active_markers_descr">تعداد نشانههای فعال روی نقشه را مشخص کنید.</string>
|
||||||
<string name="appearance_on_the_map">تنظیمات ظاهری</string>
|
<string name="appearance_on_the_map">تنظیمات ظاهری</string>
|
||||||
<string name="add_track_to_markers_descr">مسیری را انتخاب کنید تا نقاط بینراهیِ آن را به نشانهها اضافه کنید.</string>
|
<string name="add_track_to_markers_descr">مسیری را انتخاب کنید تا نقاط بینراهیِ آن را به نشانهها اضافه کنید.</string>
|
||||||
|
@ -3032,13 +3032,13 @@
|
||||||
<string name="add_group_descr">گروهی از نقاط برگزیده یا نقاط بینراهی GPX را وارد کنید.</string>
|
<string name="add_group_descr">گروهی از نقاط برگزیده یا نقاط بینراهی GPX را وارد کنید.</string>
|
||||||
<string name="empty_state_markers_active">روی نقشه نشانهگذاری کنید!</string>
|
<string name="empty_state_markers_active">روی نقشه نشانهگذاری کنید!</string>
|
||||||
<string name="empty_state_markers_active_desc">مکانها را بهصورت کوتاه یا طولانی لمس کنید و سپس دکمهٔ پرچم را بزنید.</string>
|
<string name="empty_state_markers_active_desc">مکانها را بهصورت کوتاه یا طولانی لمس کنید و سپس دکمهٔ پرچم را بزنید.</string>
|
||||||
<string name="empty_state_markers_groups">واردکردن گروهها</string>
|
<string name="empty_state_markers_groups">گروه وارد کنید</string>
|
||||||
<string name="empty_state_markers_groups_desc">گروههای نقاط برگزیده یا نقاط بینراهی را بهعنوان نشانه وارد کنید.</string>
|
<string name="empty_state_markers_groups_desc">گروههای نقاط برگزیده یا نقاط بینراهی را بهعنوان نشانه وارد کنید.</string>
|
||||||
<string name="empty_state_markers_history_desc">نشانههایی که بهعنوان عبورکرده مشخص شدهاند در این صفحه نشان داده میشوند.</string>
|
<string name="empty_state_markers_history_desc">نشانههایی که بهعنوان عبورکرده مشخص شدهاند در این صفحه نشان داده میشوند.</string>
|
||||||
<string name="shared_string_more_without_dots">بیشتر</string>
|
<string name="shared_string_more_without_dots">بیشتر</string>
|
||||||
<string name="looking_for_tracks_with_waypoints">در جستوجوی مسیرهای دارای نقطهٔ بینراهی</string>
|
<string name="looking_for_tracks_with_waypoints">در جستوجوی مسیرهای دارای نقطهٔ بینراهی</string>
|
||||||
<string name="empty_state_osm_edits">ایجاد یا ویرایش اشیای OSM</string>
|
<string name="empty_state_osm_edits">اشیای OSM را بسازید یا ویرایش کنید</string>
|
||||||
<string name="empty_state_osm_edits_descr">ایجاد یا ویرایش POIها، بازگشایی توضیحات ویرایشی و نظردادن روی آنها و آپلود فایلهای ذخیرهشدهٔ GPX.</string>
|
<string name="empty_state_osm_edits_descr">نقاط پرکاربرد (POI) را اضافه یا ویرایش کنید، توضیح ویرایشی اضافه کنید یا روی آنها نظر بدهید و فایلهای GPX ضبطشده را آپلود کنید.</string>
|
||||||
<string name="shared_string_deleted">حذف شد</string>
|
<string name="shared_string_deleted">حذف شد</string>
|
||||||
<string name="shared_string_edited">ویرایش شد</string>
|
<string name="shared_string_edited">ویرایش شد</string>
|
||||||
<string name="shared_string_added">افزوده شد</string>
|
<string name="shared_string_added">افزوده شد</string>
|
||||||
|
@ -3074,8 +3074,8 @@
|
||||||
<string name="will_open_at">ساعت بازکردن</string>
|
<string name="will_open_at">ساعت بازکردن</string>
|
||||||
<string name="will_open_on">زمان بازشدن</string>
|
<string name="will_open_on">زمان بازشدن</string>
|
||||||
<string name="additional_actions">عملیات بیشتر</string>
|
<string name="additional_actions">عملیات بیشتر</string>
|
||||||
<string name="av_locations_selected_desc">فایل GPX با مختصات و دادههای یادداشتهایی که انتخاب شده است.</string>
|
<string name="av_locations_selected_desc">فایل GPX از مختصات و اطلاعات یادداشتهای انتخابی.</string>
|
||||||
<string name="av_locations_all_desc">فایل GPX با مختصات و دادههای یادداشتهایی که انتخاب شده است.</string>
|
<string name="av_locations_all_desc">فایل GPX از مختصات و اطلاعات همهٔ یادداشتها.</string>
|
||||||
<string name="shared_string_actions">عملیات</string>
|
<string name="shared_string_actions">عملیات</string>
|
||||||
<string name="shared_string_marker">نشانه</string>
|
<string name="shared_string_marker">نشانه</string>
|
||||||
<string name="osm_recipient_stat">ویرایشها: %1$s، مبلغ: %2$s هزارم بیتکوین</string>
|
<string name="osm_recipient_stat">ویرایشها: %1$s، مبلغ: %2$s هزارم بیتکوین</string>
|
||||||
|
|
|
@ -823,8 +823,8 @@
|
||||||
|
|
||||||
Ces informations sont visibles sur le Tableau de bord comme sur la carte. Un rappel peut même être ajouté à votre calendrier.</string>
|
Ces informations sont visibles sur le Tableau de bord comme sur la carte. Un rappel peut même être ajouté à votre calendrier.</string>
|
||||||
<string name="osmand_parking_plugin_name">Emplacement de stationnement</string>
|
<string name="osmand_parking_plugin_name">Emplacement de stationnement</string>
|
||||||
<string name="context_menu_item_add_parking_point">Marquer comme emplacement de stationnement</string>
|
<string name="context_menu_item_add_parking_point">Marquer comme stationnement</string>
|
||||||
<string name="context_menu_item_delete_parking_point">Supprimer un emplacement de stationnement</string>
|
<string name="context_menu_item_delete_parking_point">Supprimer l\'emplacement de stationnement</string>
|
||||||
<string name="starting_point_too_far">Point de départ trop éloigné de la route la plus proche.</string>
|
<string name="starting_point_too_far">Point de départ trop éloigné de la route la plus proche.</string>
|
||||||
<string name="shared_location">Lieu partagé</string>
|
<string name="shared_location">Lieu partagé</string>
|
||||||
<string name="select_animate_speedup">Sélectionner la vitesse de l\'animation</string>
|
<string name="select_animate_speedup">Sélectionner la vitesse de l\'animation</string>
|
||||||
|
@ -2315,7 +2315,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
|
||||||
<string name="lang_hu_formal">Hongrois (formel)</string>
|
<string name="lang_hu_formal">Hongrois (formel)</string>
|
||||||
<string name="move_marker_bottom_sheet_title">Déplacez la carte pour modifier la position de la marque</string>
|
<string name="move_marker_bottom_sheet_title">Déplacez la carte pour modifier la position de la marque</string>
|
||||||
<string name="current_track">Trace courante</string>
|
<string name="current_track">Trace courante</string>
|
||||||
<string name="change_markers_position">Modifier la position de la marque</string>
|
<string name="change_markers_position">Déplacer la marque</string>
|
||||||
<string name="lang_es_us">Espagnol (américain)</string>
|
<string name="lang_es_us">Espagnol (américain)</string>
|
||||||
<string name="lang_en_gb">Anglais (Royaume-Uni)</string>
|
<string name="lang_en_gb">Anglais (Royaume-Uni)</string>
|
||||||
<string name="access_direction_audio_feedback_descr">Indiquer la direction de la cible par des sons</string>
|
<string name="access_direction_audio_feedback_descr">Indiquer la direction de la cible par des sons</string>
|
||||||
|
|
|
@ -2787,12 +2787,12 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="mapillary_menu_edit_text_hint">Scrivi il nome utente</string>
|
<string name="mapillary_menu_edit_text_hint">Scrivi il nome utente</string>
|
||||||
<string name="mapillary_menu_descr_username">Visualizza le immagini aggiunte da</string>
|
<string name="mapillary_menu_descr_username">Visualizza le immagini aggiunte da</string>
|
||||||
<string name="mapillary_menu_title_username">Nome utente</string>
|
<string name="mapillary_menu_title_username">Nome utente</string>
|
||||||
<string name="mapillary_menu_filter_description">Puoi filtrare le immagini per contributore o per data. I filtri si possono applicare solo per gli zoom più elevati.</string>
|
<string name="mapillary_menu_filter_description">Filtra le immagini per contributore o per data. I filtri sono attivi per gli zoom più elevati.</string>
|
||||||
<string name="store_tracks_in_monthly_directories">Salva le tracce registrate in cartelle mensili</string>
|
<string name="store_tracks_in_monthly_directories">Salva le tracce registrate in cartelle mensili</string>
|
||||||
<string name="store_tracks_in_monthly_directories_descrp">Salva le tracce registrate in sottocartelle per mese di registrazione (come 2018-01).</string>
|
<string name="store_tracks_in_monthly_directories_descrp">Salva le tracce registrate in sottocartelle per mese di registrazione (come 2018-01).</string>
|
||||||
<string name="shared_string_reset">Reimposta</string>
|
<string name="shared_string_reset">Reimposta</string>
|
||||||
<string name="quick_action_resume_pause_navigation_descr">Premi questo pulsante per mettere in pausa o riprendere la navigazione.</string>
|
<string name="quick_action_resume_pause_navigation_descr">Premi questo pulsante per mettere in pausa o riprendere la navigazione.</string>
|
||||||
<string name="quick_action_show_navigation_finish_dialog">Mostra la finestra di dialogo Fine navigazione</string>
|
<string name="quick_action_show_navigation_finish_dialog">Mostra la finestra di dialogo Navigazione terminata</string>
|
||||||
<string name="quick_action_start_stop_navigation">Avvia/ferma navigazione</string>
|
<string name="quick_action_start_stop_navigation">Avvia/ferma navigazione</string>
|
||||||
<string name="quick_action_start_stop_navigation_descr">Premi questo pulsante per avviare o fermare la navigazione.</string>
|
<string name="quick_action_start_stop_navigation_descr">Premi questo pulsante per avviare o fermare la navigazione.</string>
|
||||||
<string name="rendering_value_translucent_pink_name">Rosa traslucido</string>
|
<string name="rendering_value_translucent_pink_name">Rosa traslucido</string>
|
||||||
|
@ -2832,10 +2832,10 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="add_point_after">Aggiungi un punto dopo</string>
|
<string name="add_point_after">Aggiungi un punto dopo</string>
|
||||||
<string name="shared_string_options">Opzioni</string>
|
<string name="shared_string_options">Opzioni</string>
|
||||||
<string name="measurement_tool_snap_to_road_descr">OsmAnd collegherà i punti ai percorso in base al profilo di navigazione.</string>
|
<string name="measurement_tool_snap_to_road_descr">OsmAnd collegherà i punti ai percorso in base al profilo di navigazione.</string>
|
||||||
<string name="measurement_tool_save_as_new_track_descr">Puoi salvare i punti sia come punti di un percorso che come linea.</string>
|
<string name="measurement_tool_save_as_new_track_descr">Salva i punti sia come punti di un percorso che come linea.</string>
|
||||||
<string name="choose_navigation_type">Scegli il profilo di navigazione</string>
|
<string name="choose_navigation_type">Scegli il profilo di navigazione</string>
|
||||||
<string name="exit_without_saving">Uscire senza salvare?</string>
|
<string name="exit_without_saving">Uscire senza salvare?</string>
|
||||||
<string name="do_not_use_animations">No animazioni</string>
|
<string name="do_not_use_animations">Non usare animazioni</string>
|
||||||
<string name="do_not_use_animations_descr">Disabilita le animazioni nell\'app.</string>
|
<string name="do_not_use_animations_descr">Disabilita le animazioni nell\'app.</string>
|
||||||
<string name="keep_showing_on_map">Mantieni visualizzato nella mappa</string>
|
<string name="keep_showing_on_map">Mantieni visualizzato nella mappa</string>
|
||||||
<string name="live_monitoring_max_interval_to_send">Tempo tampone per il tracciamento online</string>
|
<string name="live_monitoring_max_interval_to_send">Tempo tampone per il tracciamento online</string>
|
||||||
|
@ -2884,11 +2884,11 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="shared_string_sort">Ordina</string>
|
<string name="shared_string_sort">Ordina</string>
|
||||||
<string name="coordinate_input">Inserimento coordinate</string>
|
<string name="coordinate_input">Inserimento coordinate</string>
|
||||||
<string name="is_saved">è salvato</string>
|
<string name="is_saved">è salvato</string>
|
||||||
<string name="marker_save_as_track_descr">Esporta i marcatori in un file, puoi indicarlo qui:</string>
|
<string name="marker_save_as_track_descr">Esporta i tuoi marcatori nel seguente file GPX:</string>
|
||||||
<string name="marker_save_as_track">Salva come traccia</string>
|
<string name="marker_save_as_track">Salva come file GPX</string>
|
||||||
<string name="move_to_history">Sposta nella cronologia</string>
|
<string name="move_to_history">Sposta nella cronologia</string>
|
||||||
<string name="group_will_be_removed_after_restart">Il gruppo verrà rimosso al prossimo riavvio dell\'app.</string>
|
<string name="group_will_be_removed_after_restart">Il gruppo verrà rimosso al prossimo riavvio dell\'app.</string>
|
||||||
<string name="show_guide_line">Mostra le linee guida</string>
|
<string name="show_guide_line">Mostra le linee di direzione</string>
|
||||||
<string name="show_arrows_on_the_map">Mostra le frecce nella mappa</string>
|
<string name="show_arrows_on_the_map">Mostra le frecce nella mappa</string>
|
||||||
<string name="show_passed">Mostra superati</string>
|
<string name="show_passed">Mostra superati</string>
|
||||||
<string name="hide_passed">Nascondi i superati</string>
|
<string name="hide_passed">Nascondi i superati</string>
|
||||||
|
@ -2910,7 +2910,7 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="import_track_desc">Il file %1$s non contiene punti intermedi, importarlo come traccia?</string>
|
<string name="import_track_desc">Il file %1$s non contiene punti intermedi, importarlo come traccia?</string>
|
||||||
<string name="move_point">Sposta il punto</string>
|
<string name="move_point">Sposta il punto</string>
|
||||||
<string name="add_segment_to_the_track">Aggiungi a una traccia GPX</string>
|
<string name="add_segment_to_the_track">Aggiungi a una traccia GPX</string>
|
||||||
<string name="osn_modify_dialog_error">Si è verificato un errore: la nota non è stata modificata</string>
|
<string name="osn_modify_dialog_error">Non è possibile modificare la nota</string>
|
||||||
<string name="shared_string_road">Strada</string>
|
<string name="shared_string_road">Strada</string>
|
||||||
<string name="show_map">Mostra la mappa</string>
|
<string name="show_map">Mostra la mappa</string>
|
||||||
<string name="route_is_calculated">Percorso calcolato</string>
|
<string name="route_is_calculated">Percorso calcolato</string>
|
||||||
|
@ -2931,31 +2931,31 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
\n</string>
|
\n</string>
|
||||||
<string name="rendering_value_darkyellow_name">Giallo scuro</string>
|
<string name="rendering_value_darkyellow_name">Giallo scuro</string>
|
||||||
<string name="import_as_gpx">Importa come file GPX</string>
|
<string name="import_as_gpx">Importa come file GPX</string>
|
||||||
<string name="import_as_favorites">Importa come Preferito</string>
|
<string name="import_as_favorites">Importa come preferito</string>
|
||||||
<string name="import_file">Importa file</string>
|
<string name="import_file">Importa file</string>
|
||||||
<string name="tap_on_map_to_hide_interface_descr">Un tap sulla mappa per nascondere/visualizzare i pulsanti di controllo e i widgets.</string>
|
<string name="tap_on_map_to_hide_interface_descr">Un tap sulla mappa per nascondere/visualizzare i pulsanti di controllo e i widgets.</string>
|
||||||
<string name="tap_on_map_to_hide_interface">Modalità a schermo intero</string>
|
<string name="tap_on_map_to_hide_interface">Modalità a schermo intero</string>
|
||||||
|
|
||||||
<string name="mark_passed">Marcatore superato</string>
|
<string name="mark_passed">Marcatore superato</string>
|
||||||
<string name="import_gpx_file_description">può essere importato come Preferito oppure come file traccia.</string>
|
<string name="import_gpx_file_description">può essere importato come preferito oppure come file GPX.</string>
|
||||||
<string name="appearance_on_the_map">Visualizzazione nella mappa</string>
|
<string name="appearance_on_the_map">Visualizzazione nella mappa</string>
|
||||||
<string name="add_track_to_markers_descr">I punti intermedi possono essere aggiunti ai marcatori selezionando una traccia che ne contiene.</string>
|
<string name="add_track_to_markers_descr">Scegli una traccia per aggiornare i suoi punti intermedi ai marcatori.</string>
|
||||||
<string name="add_favourites_group_to_markers_descr">Scegli una categoria di luoghi preferiti da aggiungere ai marcatori.</string>
|
<string name="add_favourites_group_to_markers_descr">Scegli una categoria di luoghi preferiti da aggiungere ai marcatori.</string>
|
||||||
<string name="shared_string_gpx_waypoints">Punti intermedi della traccia</string>
|
<string name="shared_string_gpx_waypoints">Punti intermedi della traccia</string>
|
||||||
<string name="favourites_group">Categoria di luoghi preferiti</string>
|
<string name="favourites_group">Categoria di luoghi preferiti</string>
|
||||||
<string name="add_group">Aggiungi un gruppo</string>
|
<string name="add_group">Aggiungi un gruppo</string>
|
||||||
<string name="add_group_descr">Puoi importare un gruppo dai preferiti o i punti intermedi di una traccia.</string>
|
<string name="add_group_descr">Importa gruppi dai preferiti o i punti intermedi GPX.</string>
|
||||||
<string name="empty_state_markers_active">Crea i marcatori della mappa!</string>
|
<string name="empty_state_markers_active">Crea i marcatori della mappa!</string>
|
||||||
<string name="empty_state_markers_active_desc">Tap lungo o breve su \'Luoghi\', poi tappa il pulsante bandiera del marcatore.</string>
|
<string name="empty_state_markers_active_desc">Tap lungo o breve su Luoghi, poi tappa il pulsante bandiera del marcatore.</string>
|
||||||
<string name="empty_state_markers_groups">Importa gruppi</string>
|
<string name="empty_state_markers_groups">Importa gruppi</string>
|
||||||
<string name="empty_state_markers_groups_desc">Puoi importare, come marcatori, gruppi di luoghi preferiti o punti intermedi di tracce.</string>
|
<string name="empty_state_markers_groups_desc">Importa gruppi di preferiti o punti intermedi come marcatori.</string>
|
||||||
<string name="empty_state_markers_history_desc">Marcatori indicati come passati appariranno su questa schermata.</string>
|
<string name="empty_state_markers_history_desc">Marcatori indicati come passati appariranno su questa schermata.</string>
|
||||||
<string name="shared_string_two">Due</string>
|
<string name="shared_string_two">Due</string>
|
||||||
<string name="shared_string_one">Uno</string>
|
<string name="shared_string_one">Uno</string>
|
||||||
<string name="show_guide_line_descr">Una linea-guida fra la tua posizione e le posizioni dei marcatori attivi verrà visualizzata sulla mappa.</string>
|
<string name="show_guide_line_descr">Mostra la linea di direzione dalla tua posizione alle posizioni dei marcatori attivi.</string>
|
||||||
<string name="show_arrows_descr">Visualizza una o due frecce, indicanti la direzione verso i marcatori attivi.</string>
|
<string name="show_arrows_descr">Visualizza una o due frecce, indicanti la direzione verso i marcatori attivi.</string>
|
||||||
<string name="distance_indication_descr">Scegli come visualizzare la distanza verso marcatori attivi.</string>
|
<string name="distance_indication_descr">Scegli come visualizzare la distanza verso marcatori attivi.</string>
|
||||||
<string name="active_markers_descr">Scegli quante indicazioni di direzione sono visualizzate.</string>
|
<string name="active_markers_descr">Scegli il numero di marcatori attivi da visualizzare.</string>
|
||||||
<string name="digits_quantity">Numero di cifre decimali</string>
|
<string name="digits_quantity">Numero di cifre decimali</string>
|
||||||
<string name="shared_string_right">Destra</string>
|
<string name="shared_string_right">Destra</string>
|
||||||
<string name="shared_string_left">Sinistra</string>
|
<string name="shared_string_left">Sinistra</string>
|
||||||
|
@ -3022,7 +3022,7 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="shared_string_current">Attuale</string>
|
<string name="shared_string_current">Attuale</string>
|
||||||
<string name="last_intermediate_dest_description">Aggiunge una fermata intermedia</string>
|
<string name="last_intermediate_dest_description">Aggiunge una fermata intermedia</string>
|
||||||
<string name="first_intermediate_dest_description">Aggiunge la prima fermata</string>
|
<string name="first_intermediate_dest_description">Aggiunge la prima fermata</string>
|
||||||
<string name="subsequent_dest_description">Sposta in alto la destinazione e crea la destinazione</string>
|
<string name="subsequent_dest_description">Sposta in alto la destinazione e crealo</string>
|
||||||
<string name="show_closed_notes">Mostra le note chiuse</string>
|
<string name="show_closed_notes">Mostra le note chiuse</string>
|
||||||
<string name="switch_osm_notes_visibility_desc">Mostra/nascondi le note OSM sulla mappa.</string>
|
<string name="switch_osm_notes_visibility_desc">Mostra/nascondi le note OSM sulla mappa.</string>
|
||||||
<string name="gpx_file_desc">GPX - adatto all\'esportazione in JOSM o altri editor OSM.</string>
|
<string name="gpx_file_desc">GPX - adatto all\'esportazione in JOSM o altri editor OSM.</string>
|
||||||
|
@ -3053,8 +3053,8 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="south_abbreviation">S</string>
|
<string name="south_abbreviation">S</string>
|
||||||
<string name="north_abbreviation">N</string>
|
<string name="north_abbreviation">N</string>
|
||||||
<string name="optional_point_name">Nome del punto facoltativo</string>
|
<string name="optional_point_name">Nome del punto facoltativo</string>
|
||||||
<string name="transport_nearby_routes_within">Percorsi vicini in</string>
|
<string name="transport_nearby_routes_within">Percorsi vicini entro</string>
|
||||||
<string name="transport_nearby_routes">Vicino</string>
|
<string name="transport_nearby_routes">Entro</string>
|
||||||
<string name="enter_the_file_name">Immetti il nome del file.</string>
|
<string name="enter_the_file_name">Immetti il nome del file.</string>
|
||||||
<string name="map_import_error">Errore importazione mappa</string>
|
<string name="map_import_error">Errore importazione mappa</string>
|
||||||
<string name="map_imported_successfully">Mappa importata</string>
|
<string name="map_imported_successfully">Mappa importata</string>
|
||||||
|
@ -3068,13 +3068,13 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="shared_string_total">Totale</string>
|
<string name="shared_string_total">Totale</string>
|
||||||
<string name="use_two_digits_longitude">"Usa due cifre per la longitudine"</string>
|
<string name="use_two_digits_longitude">"Usa due cifre per la longitudine"</string>
|
||||||
<string name="shared_string_travel_guides">Viaggio</string>
|
<string name="shared_string_travel_guides">Viaggio</string>
|
||||||
<string name="select_waypoints_category_description">Puoi aggiungere tutti i punti intermedi delle tracce o per categorie separate.</string>
|
<string name="select_waypoints_category_description">Aggiungi tutti i punti intermedi della traccia oppure scegli una categoria separata.</string>
|
||||||
<string name="shared_string_dont">Non fare</string>
|
<string name="shared_string_dont">Non fare</string>
|
||||||
<string name="shared_string_do">Fai</string>
|
<string name="shared_string_do">Fai</string>
|
||||||
<string name="shared_string_only_with_wifi">Solo da WiFi</string>
|
<string name="shared_string_only_with_wifi">Solo da WiFi</string>
|
||||||
<string name="wikivoyage_download_pics">Scarica le immagini</string>
|
<string name="wikivoyage_download_pics">Scarica le immagini</string>
|
||||||
<string name="shared_string_wifi_only">Solo con WiFi</string>
|
<string name="shared_string_wifi_only">Solo con WiFi</string>
|
||||||
<string name="select_travel_book">Scegli il libro di viaggio</string>
|
<string name="select_travel_book">Scegli un libro di viaggio</string>
|
||||||
<string name="shared_string_travel_book">Libro di viaggio</string>
|
<string name="shared_string_travel_book">Libro di viaggio</string>
|
||||||
<string name="online_webpage_warning">Pagina disponibile solo online. Aprirla in un browser?</string>
|
<string name="online_webpage_warning">Pagina disponibile solo online. Aprirla in un browser?</string>
|
||||||
<string name="images_cache">Cache delle immagini</string>
|
<string name="images_cache">Cache delle immagini</string>
|
||||||
|
@ -3090,7 +3090,7 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="start_editing">Iniza a modificare</string>
|
<string name="start_editing">Iniza a modificare</string>
|
||||||
<string name="get_unlimited_access">Ottieni l\'accesso illimitato</string>
|
<string name="get_unlimited_access">Ottieni l\'accesso illimitato</string>
|
||||||
<string name="welcome_to_open_beta">Benvenuti alla open beta</string>
|
<string name="welcome_to_open_beta">Benvenuti alla open beta</string>
|
||||||
<string name="wikivoyage_travel_guide">Guida di Viaggio Wikivoyage</string>
|
<string name="wikivoyage_travel_guide">Guide Viaggi</string>
|
||||||
<string name="monthly_map_updates">Aggiornamenti delle mappe: <b>Ogni mese</b></string>
|
<string name="monthly_map_updates">Aggiornamenti delle mappe: <b>Ogni mese</b></string>
|
||||||
<string name="daily_map_updates">Aggiornamenti delle mappe: <b>Ogni ora</b></string>
|
<string name="daily_map_updates">Aggiornamenti delle mappe: <b>Ogni ora</b></string>
|
||||||
<string name="in_app_purchase">Acquisto In-app</string>
|
<string name="in_app_purchase">Acquisto In-app</string>
|
||||||
|
@ -3116,14 +3116,14 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
<string name="wikivoyage_travel_guide_descr">Guide dei luoghi più interessanti del pianeta, integrata in OsmAnd, senza connessione a Internet.</string>
|
<string name="wikivoyage_travel_guide_descr">Guide dei luoghi più interessanti del pianeta, integrata in OsmAnd, senza connessione a Internet.</string>
|
||||||
<string name="contour_lines_hillshade_maps">Linee Isoipse e Ombreggiamento dei rilievi</string>
|
<string name="contour_lines_hillshade_maps">Linee Isoipse e Ombreggiamento dei rilievi</string>
|
||||||
<string name="purchase_dialog_title">Scegli il piano</string>
|
<string name="purchase_dialog_title">Scegli il piano</string>
|
||||||
<string name="purchase_dialog_travel_description">Acquista uno dei seguenti articoli di viaggio da leggere offline:</string>
|
<string name="purchase_dialog_travel_description">Acquista uno dei seguenti per ricevere la funzionalità delle guide di viaggio offline:</string>
|
||||||
<string name="purchase_dialog_subtitle">Scegli uno degli oggetti disponibili:</string>
|
<string name="purchase_dialog_subtitle">Scegli uno degli oggetti disponibili:</string>
|
||||||
<string name="wikivoyage_download_pics_descr">Immagini dagli articoli possono essere per l\'uso offline.
|
<string name="wikivoyage_download_pics_descr">Immagini dagli articoli possono essere per l\'uso offline.
|
||||||
\n Puoi sempre modificare le impostazioni in \'Esplora\' → \'Opzioni\'.</string>
|
\n Puoi sempre modificare le impostazioni in \'Esplora\' → \'Opzioni\'.</string>
|
||||||
<string name="delete_search_history">Cancella la cronologia di ricerca</string>
|
<string name="delete_search_history">Cancella la cronologia di ricerca</string>
|
||||||
<string name="shared_string_restart">Riavvia</string>
|
<string name="shared_string_restart">Riavvia</string>
|
||||||
<string name="download_images">Scarica immagini</string>
|
<string name="download_images">Scarica immagini</string>
|
||||||
<string name="download_maps_travel">Mappe turistiche</string>
|
<string name="download_maps_travel">Guide di turistiche</string>
|
||||||
<string name="shared_string_wikivoyage">Wikivoyage</string>
|
<string name="shared_string_wikivoyage">Wikivoyage</string>
|
||||||
<string name="article_removed">Articolo rimosso</string>
|
<string name="article_removed">Articolo rimosso</string>
|
||||||
<string name="wikivoyage_search_hint">Cerca: Nazione, città, provincia</string>
|
<string name="wikivoyage_search_hint">Cerca: Nazione, città, provincia</string>
|
||||||
|
@ -3196,7 +3196,8 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
||||||
\n • Scegli se registrare la tua visita su un file GPX locale oppure su di un servizio online
|
\n • Scegli se registrare la tua visita su un file GPX locale oppure su di un servizio online
|
||||||
\n • Scegli se mostrare la velocità e l’altitudine
|
\n • Scegli se mostrare la velocità e l’altitudine
|
||||||
\n • Mostra le curve di livello e l’ombreggiatura dei rilievi</string>
|
\n • Mostra le curve di livello e l’ombreggiatura dei rilievi</string>
|
||||||
<string name="unirs_render_descr">Modifica dello stile standard per fornire un maggior contrasto alle strade pedonali e piste ciclabili. Utilizza i colori della versione vecchia di Mapnik.</string>
|
<string name="unirs_render_descr">Modifica dello stile standard per un maggior contrasto delle strade pedonali e piste ciclabili. Utilizza i colori della versione vecchia di Mapnik.</string>
|
||||||
<string name="access_intermediate_arrival_time">Orario di arrivo intermedio</string>
|
<string name="access_intermediate_arrival_time">Orario di arrivo intermedio</string>
|
||||||
<string name="map_widget_intermediate_time">orario intermedio</string>
|
<string name="map_widget_intermediate_time">orario intermedio</string>
|
||||||
|
<string name="get_osmand_live">Acquista OsmAnd Live per sbloccare tutte le funzionalità: aggiornamenti quotidiani delle mappe con download illimitati, tutti i componenti aggiuntivi gratuiti e a pagamento, Wikipedia, Wikivoyage è molto altro.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1483,7 +1483,7 @@ Pôr do Sol: %2$s</string>
|
||||||
<string name="show_transport_over_map">Mostrar paradas de transporte</string>
|
<string name="show_transport_over_map">Mostrar paradas de transporte</string>
|
||||||
<string name="hello">Aplicativo de navegação OsmAnd</string>
|
<string name="hello">Aplicativo de navegação OsmAnd</string>
|
||||||
<string name="update_poi_success">Dados de POI foram atualizados ({0} foram carregados)</string>
|
<string name="update_poi_success">Dados de POI foram atualizados ({0} foram carregados)</string>
|
||||||
<string name="update_poi_error_local">Erro ao atualizar a lista local de POI</string>
|
<string name="update_poi_error_local">Não pôde atualizar a lista local de POIs</string>
|
||||||
<string name="update_poi_error_loading">Erro ao carregar dados do servidor</string>
|
<string name="update_poi_error_loading">Erro ao carregar dados do servidor</string>
|
||||||
<string name="update_poi_no_offline_poi_index">Não há dados de POI off-line para esta região</string>
|
<string name="update_poi_no_offline_poi_index">Não há dados de POI off-line para esta região</string>
|
||||||
<string name="update_poi_is_not_available_for_zoom">Aproximar zoom permite atualizar POIs</string>
|
<string name="update_poi_is_not_available_for_zoom">Aproximar zoom permite atualizar POIs</string>
|
||||||
|
@ -1547,7 +1547,7 @@ Pôr do Sol: %2$s</string>
|
||||||
<string name="use_online_routing_descr">Usar a Internet para calcular a rota</string>
|
<string name="use_online_routing_descr">Usar a Internet para calcular a rota</string>
|
||||||
<string name="use_online_routing">Usar a navegação on-line</string>
|
<string name="use_online_routing">Usar a navegação on-line</string>
|
||||||
<string name="osm_settings_descr">Especificar configurações de Openstreetmap.org (OSM) necessárias para envios ao OSM</string>
|
<string name="osm_settings_descr">Especificar configurações de Openstreetmap.org (OSM) necessárias para envios ao OSM</string>
|
||||||
<string name="data_settings_descr">Especificar o idioma, baixar/atualizar dados</string>
|
<string name="data_settings_descr">Especificar o idioma, baixar/atualizar dados.</string>
|
||||||
<string name="data_settings">Dados</string>
|
<string name="data_settings">Dados</string>
|
||||||
<string name="additional_settings">Configurações adicionais</string>
|
<string name="additional_settings">Configurações adicionais</string>
|
||||||
<string name="update_tile">Atualizar mapa</string>
|
<string name="update_tile">Atualizar mapa</string>
|
||||||
|
@ -1960,10 +1960,10 @@ Pôr do Sol: %2$s</string>
|
||||||
<string name="no_address_found">Sem endereço determinado</string>
|
<string name="no_address_found">Sem endereço determinado</string>
|
||||||
<string name="looking_up_address">Procurando endereço</string>
|
<string name="looking_up_address">Procurando endereço</string>
|
||||||
<string name="rendering_attr_horseRoutes_name">Rotas a cavalo</string>
|
<string name="rendering_attr_horseRoutes_name">Rotas a cavalo</string>
|
||||||
<string name="update">Atualizar tudo</string>
|
<string name="update">Atualizar</string>
|
||||||
<string name="only_download_over_wifi">Somente baixar via Wi-Fi</string>
|
<string name="only_download_over_wifi">Somente baixar via Wi-Fi</string>
|
||||||
<string name="live_update">Atualização ao vivo</string>
|
<string name="live_update">Atualização ao vivo</string>
|
||||||
<string name="update_now">Atualizar já</string>
|
<string name="update_now">Atualizar</string>
|
||||||
<string name="route_distance">Distância:</string>
|
<string name="route_distance">Distância:</string>
|
||||||
<string name="route_duration">Tempo:</string>
|
<string name="route_duration">Tempo:</string>
|
||||||
<string name="missing_write_external_storage_permission">App não tem permissão para usar o cartão SD</string>
|
<string name="missing_write_external_storage_permission">App não tem permissão para usar o cartão SD</string>
|
||||||
|
@ -2077,7 +2077,7 @@ Pôr do Sol: %2$s</string>
|
||||||
<string name="search_my_location">Encontrar a minha posição</string>
|
<string name="search_my_location">Encontrar a minha posição</string>
|
||||||
<string name="no_update_info_desc">Não verificar se há atualizações de versão ou descontos relacionados ao OsmAnd.</string>
|
<string name="no_update_info_desc">Não verificar se há atualizações de versão ou descontos relacionados ao OsmAnd.</string>
|
||||||
<string name="no_update_info">Não mostrar atualizações</string>
|
<string name="no_update_info">Não mostrar atualizações</string>
|
||||||
<string name="update_all_maps_now">Você deseja atualizar todos os seus mapas agora?</string>
|
<string name="update_all_maps_now">Atualizar todos os mapas agora?</string>
|
||||||
<string name="clear_tile_data">Limpar todos os títulos</string>
|
<string name="clear_tile_data">Limpar todos os títulos</string>
|
||||||
<string name="replace_favorite_confirmation">Você tem certeza que deseja substituir seu favorito %1$s?</string>
|
<string name="replace_favorite_confirmation">Você tem certeza que deseja substituir seu favorito %1$s?</string>
|
||||||
<string name="shared_string_change">Mudar</string>
|
<string name="shared_string_change">Mudar</string>
|
||||||
|
@ -2904,4 +2904,15 @@ Pôr do Sol: %2$s</string>
|
||||||
\ne muito mais…</string>
|
\ne muito mais…</string>
|
||||||
<string name="download_wikipedia_description">Baixe artigos da Wikipédia por %1$s para lê-los offline.</string>
|
<string name="download_wikipedia_description">Baixe artigos da Wikipédia por %1$s para lê-los offline.</string>
|
||||||
<string name="wiki_article_search_text">Procurando o artigo wiki necessário</string>
|
<string name="wiki_article_search_text">Procurando o artigo wiki necessário</string>
|
||||||
|
<string name="shared_string_bookmark">Marcador</string>
|
||||||
|
<string name="hide_full_description">Ocultar descrição completa</string>
|
||||||
|
<string name="show_full_description">Mostrar descrição completa</string>
|
||||||
|
<string name="open_wikipedia_link_online_description">O link será aberto em um navegador web.</string>
|
||||||
|
<string name="how_to_open_link">Como abrir o link?</string>
|
||||||
|
<string name="read_wikipedia_offline">Ler a Wikipédia offline</string>
|
||||||
|
<string name="download_all">Baixar tudo</string>
|
||||||
|
<string name="purchase_cancelled_dialog_title">Você cancelou a sua assinatura OsmAnd Live</string>
|
||||||
|
<string name="shared_string_gpx_files">Arquivos GPX</string>
|
||||||
|
<string name="access_intermediate_arrival_time">Hora de chegada intermediária</string>
|
||||||
|
<string name="map_widget_intermediate_time">Hora intermediária</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -13,7 +13,6 @@ import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
|
@ -27,6 +26,7 @@ import net.osmand.plus.activities.DayNightHelper;
|
||||||
import net.osmand.plus.activities.LocalIndexHelper;
|
import net.osmand.plus.activities.LocalIndexHelper;
|
||||||
import net.osmand.plus.activities.LocalIndexInfo;
|
import net.osmand.plus.activities.LocalIndexInfo;
|
||||||
import net.osmand.plus.activities.SavingTrackHelper;
|
import net.osmand.plus.activities.SavingTrackHelper;
|
||||||
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.ui.AbstractLoadLocalIndexTask;
|
import net.osmand.plus.download.ui.AbstractLoadLocalIndexTask;
|
||||||
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
||||||
|
@ -67,7 +67,6 @@ import java.util.Locale;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import btools.routingapp.BRouterServiceConnection;
|
import btools.routingapp.BRouterServiceConnection;
|
||||||
|
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn;
|
||||||
|
@ -448,6 +447,7 @@ public class AppInitializer implements IProgress {
|
||||||
app.mapMarkersDbHelper = startupInit(new MapMarkersDbHelper(app), MapMarkersDbHelper.class);
|
app.mapMarkersDbHelper = startupInit(new MapMarkersDbHelper(app), MapMarkersDbHelper.class);
|
||||||
app.mapMarkersHelper = startupInit(new MapMarkersHelper(app), MapMarkersHelper.class);
|
app.mapMarkersHelper = startupInit(new MapMarkersHelper(app), MapMarkersHelper.class);
|
||||||
app.searchUICore = startupInit(new QuickSearchHelper(app), QuickSearchHelper.class);
|
app.searchUICore = startupInit(new QuickSearchHelper(app), QuickSearchHelper.class);
|
||||||
|
app.mapViewTrackingUtilities = startupInit(new MapViewTrackingUtilities(app), MapViewTrackingUtilities.class);
|
||||||
app.travelDbHelper = new TravelDbHelper(app);
|
app.travelDbHelper = new TravelDbHelper(app);
|
||||||
if (app.getSettings().SELECTED_TRAVEL_BOOK.get() != null) {
|
if (app.getSettings().SELECTED_TRAVEL_BOOK.get() != null) {
|
||||||
app.travelDbHelper.initTravelBooks();
|
app.travelDbHelper.initTravelBooks();
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class ContextMenuAdapter {
|
||||||
@LayoutRes
|
@LayoutRes
|
||||||
private int layoutId;
|
private int layoutId;
|
||||||
private final ConfigureMapMenu.OnClickListener changeAppModeListener;
|
private final ConfigureMapMenu.OnClickListener changeAppModeListener;
|
||||||
private final IconsCache mIconsCache;
|
private final UiUtilities mIconsCache;
|
||||||
|
|
||||||
public ContextMenuArrayAdapter(Activity context,
|
public ContextMenuArrayAdapter(Activity context,
|
||||||
@LayoutRes int layoutRes,
|
@LayoutRes int layoutRes,
|
||||||
|
@ -124,7 +124,7 @@ public class ContextMenuAdapter {
|
||||||
this.lightTheme = lightTheme;
|
this.lightTheme = lightTheme;
|
||||||
this.layoutId = layoutRes;
|
this.layoutId = layoutRes;
|
||||||
this.changeAppModeListener = changeAppModeListener;
|
this.changeAppModeListener = changeAppModeListener;
|
||||||
mIconsCache = app.getIconsCache();
|
mIconsCache = app.getUIUtilities();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -169,7 +169,7 @@ public class ContextMenuAdapter {
|
||||||
}
|
}
|
||||||
if (layoutId == R.layout.help_to_improve_item) {
|
if (layoutId == R.layout.help_to_improve_item) {
|
||||||
TextView feedbackButton = (TextView) convertView.findViewById(R.id.feedbackButton);
|
TextView feedbackButton = (TextView) convertView.findViewById(R.id.feedbackButton);
|
||||||
Drawable pollIcon = app.getIconsCache().getThemedIcon(R.drawable.ic_action_big_poll);
|
Drawable pollIcon = app.getUIUtilities().getThemedIcon(R.drawable.ic_action_big_poll);
|
||||||
feedbackButton.setCompoundDrawablesWithIntrinsicBounds(null, pollIcon, null, null);
|
feedbackButton.setCompoundDrawablesWithIntrinsicBounds(null, pollIcon, null, null);
|
||||||
feedbackButton.setOnClickListener(new View.OnClickListener() {
|
feedbackButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -181,7 +181,7 @@ public class ContextMenuAdapter {
|
||||||
});
|
});
|
||||||
TextView contactUsButton = (TextView) convertView.findViewById(R.id.contactUsButton);
|
TextView contactUsButton = (TextView) convertView.findViewById(R.id.contactUsButton);
|
||||||
Drawable contactUsIcon =
|
Drawable contactUsIcon =
|
||||||
app.getIconsCache().getThemedIcon(R.drawable.ic_action_big_feedback);
|
app.getUIUtilities().getThemedIcon(R.drawable.ic_action_big_feedback);
|
||||||
contactUsButton.setCompoundDrawablesWithIntrinsicBounds(null, contactUsIcon, null,
|
contactUsButton.setCompoundDrawablesWithIntrinsicBounds(null, contactUsIcon, null,
|
||||||
null);
|
null);
|
||||||
final String email = app.getString(R.string.support_email);
|
final String email = app.getString(R.string.support_email);
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class ContextMenuItem {
|
||||||
if (skipPaintingWithoutColor || getColorRes() != INVALID_ID) {
|
if (skipPaintingWithoutColor || getColorRes() != INVALID_ID) {
|
||||||
return getColorRes();
|
return getColorRes();
|
||||||
} else {
|
} else {
|
||||||
return IconsCache.getDefaultColorRes(context);
|
return UiUtilities.getDefaultColorRes(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
package net.osmand.plus;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.graphics.drawable.LayerDrawable;
|
|
||||||
import android.support.annotation.ColorInt;
|
|
||||||
import android.support.annotation.ColorRes;
|
|
||||||
import android.support.annotation.DrawableRes;
|
|
||||||
import android.support.v4.content.ContextCompat;
|
|
||||||
import android.support.v4.graphics.drawable.DrawableCompat;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
|
|
||||||
import gnu.trove.map.hash.TLongObjectHashMap;
|
|
||||||
|
|
||||||
public class IconsCache {
|
|
||||||
|
|
||||||
private TLongObjectHashMap<Drawable> drawable = new TLongObjectHashMap<>();
|
|
||||||
private OsmandApplication app;
|
|
||||||
|
|
||||||
public IconsCache(OsmandApplication app) {
|
|
||||||
this.app = app;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Drawable getDrawable(@DrawableRes int resId, @ColorRes int clrId) {
|
|
||||||
long hash = ((long)resId << 31l) + clrId;
|
|
||||||
Drawable d = drawable.get(hash);
|
|
||||||
if (d == null) {
|
|
||||||
d = ContextCompat.getDrawable(app, resId);
|
|
||||||
d = DrawableCompat.wrap(d);
|
|
||||||
d.mutate();
|
|
||||||
if (clrId != 0) {
|
|
||||||
DrawableCompat.setTint(d, ContextCompat.getColor(app, clrId));
|
|
||||||
}
|
|
||||||
drawable.put(hash, d);
|
|
||||||
}
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Drawable getPaintedDrawable(@DrawableRes int resId, @ColorInt int color){
|
|
||||||
long hash = ((long)resId << 31l) + color;
|
|
||||||
Drawable d = drawable.get(hash);
|
|
||||||
if(d == null) {
|
|
||||||
d = ContextCompat.getDrawable(app, resId);
|
|
||||||
d = DrawableCompat.wrap(d);
|
|
||||||
d.mutate();
|
|
||||||
DrawableCompat.setTint(d, color);
|
|
||||||
|
|
||||||
drawable.put(hash, d);
|
|
||||||
}
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getPaintedIcon(@DrawableRes int id, @ColorInt int color){
|
|
||||||
return getPaintedDrawable(id, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getIcon(@DrawableRes int id, @ColorRes int colorId) {
|
|
||||||
return getDrawable(id, colorId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getIcon(@DrawableRes int backgroundId, @DrawableRes int id, @ColorRes int colorId) {
|
|
||||||
Drawable b = getDrawable(backgroundId, 0);
|
|
||||||
Drawable f = getDrawable(id, colorId);
|
|
||||||
Drawable[] layers = new Drawable[2];
|
|
||||||
layers[0] = b;
|
|
||||||
layers[1] = f;
|
|
||||||
return new LayerDrawable(layers);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getThemedIcon(@DrawableRes int id) {
|
|
||||||
return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getIcon(@DrawableRes int id) {
|
|
||||||
return getDrawable(id, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Drawable getIcon(@DrawableRes int id, boolean light) {
|
|
||||||
return getDrawable(id, light ? R.color.icon_color : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ColorRes
|
|
||||||
public static int getDefaultColorRes(Context context) {
|
|
||||||
final OsmandApplication app = (OsmandApplication) context.getApplicationContext();
|
|
||||||
boolean light = app.getSettings().isLightContent();
|
|
||||||
return light ? R.color.icon_color : R.color.color_white;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -556,14 +556,7 @@ public class OsmAndLocationProvider implements SensorEventListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized Float getHeading() {
|
public Float getHeading() {
|
||||||
// if (heading != null && lastValSin != avgValSin && System.currentTimeMillis() - lastHeadingCalcTime > 700) {
|
|
||||||
// avgValSin = lastValSin;
|
|
||||||
// avgValCos = lastValCos;
|
|
||||||
// Arrays.fill(previousCompassValuesA, avgValSin);
|
|
||||||
// Arrays.fill(previousCompassValuesB, avgValCos);
|
|
||||||
// updateCompassVal();
|
|
||||||
// }
|
|
||||||
return heading;
|
return heading;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.SavingTrackHelper;
|
import net.osmand.plus.activities.SavingTrackHelper;
|
||||||
import net.osmand.plus.api.SQLiteAPI;
|
import net.osmand.plus.api.SQLiteAPI;
|
||||||
import net.osmand.plus.api.SQLiteAPIImpl;
|
import net.osmand.plus.api.SQLiteAPIImpl;
|
||||||
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
import net.osmand.plus.dialogs.RateUsBottomSheetDialog;
|
import net.osmand.plus.dialogs.RateUsBottomSheetDialog;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread;
|
import net.osmand.plus.download.DownloadIndexesThread;
|
||||||
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
||||||
|
@ -87,7 +88,7 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
OsmAndAppCustomization appCustomization;
|
OsmAndAppCustomization appCustomization;
|
||||||
private final SQLiteAPI sqliteAPI = new SQLiteAPIImpl(this);
|
private final SQLiteAPI sqliteAPI = new SQLiteAPIImpl(this);
|
||||||
private final OsmAndTaskManager taskManager = new OsmAndTaskManager(this);
|
private final OsmAndTaskManager taskManager = new OsmAndTaskManager(this);
|
||||||
private final IconsCache iconsCache = new IconsCache(this);
|
private final UiUtilities iconsCache = new UiUtilities(this);
|
||||||
Handler uiHandler;
|
Handler uiHandler;
|
||||||
private boolean plusVersionInApp;
|
private boolean plusVersionInApp;
|
||||||
|
|
||||||
|
@ -122,6 +123,7 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
QuickSearchHelper searchUICore;
|
QuickSearchHelper searchUICore;
|
||||||
TravelDbHelper travelDbHelper;
|
TravelDbHelper travelDbHelper;
|
||||||
InAppPurchaseHelper inAppPurchaseHelper;
|
InAppPurchaseHelper inAppPurchaseHelper;
|
||||||
|
MapViewTrackingUtilities mapViewTrackingUtilities;
|
||||||
|
|
||||||
RoutingConfiguration.Builder defaultRoutingConfig;
|
RoutingConfiguration.Builder defaultRoutingConfig;
|
||||||
private Locale preferredLocale = null;
|
private Locale preferredLocale = null;
|
||||||
|
@ -214,10 +216,11 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IconsCache getIconsCache() {
|
public UiUtilities getUIUtilities() {
|
||||||
return iconsCache;
|
return iconsCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTerminate() {
|
public void onTerminate() {
|
||||||
super.onTerminate();
|
super.onTerminate();
|
||||||
|
@ -420,7 +423,7 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
View view = uiContext.getLayoutInflater().inflate(R.layout.select_voice_first, null);
|
View view = uiContext.getLayoutInflater().inflate(R.layout.select_voice_first, null);
|
||||||
|
|
||||||
((ImageView) view.findViewById(R.id.icon))
|
((ImageView) view.findViewById(R.id.icon))
|
||||||
.setImageDrawable(getIconsCache().getIcon(R.drawable.ic_action_volume_up, getSettings().isLightContent()));
|
.setImageDrawable(getUIUtilities().getIcon(R.drawable.ic_action_volume_up, getSettings().isLightContent()));
|
||||||
|
|
||||||
view.findViewById(R.id.spinner).setOnClickListener(new View.OnClickListener() {
|
view.findViewById(R.id.spinner).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -441,7 +444,7 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
});
|
});
|
||||||
|
|
||||||
((ImageView) view.findViewById(R.id.dropDownIcon))
|
((ImageView) view.findViewById(R.id.dropDownIcon))
|
||||||
.setImageDrawable(getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, getSettings().isLightContent()));
|
.setImageDrawable(getUIUtilities().getIcon(R.drawable.ic_action_arrow_drop_down, getSettings().isLightContent()));
|
||||||
|
|
||||||
builder.setCancelable(true);
|
builder.setCancelable(true);
|
||||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||||
|
@ -1003,4 +1006,8 @@ public class OsmandApplication extends MultiDexApplication {
|
||||||
});
|
});
|
||||||
bld.show();
|
bld.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MapViewTrackingUtilities getMapViewTrackingUtilities() {
|
||||||
|
return mapViewTrackingUtilities;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
225
OsmAnd/src/net/osmand/plus/UiUtilities.java
Normal file
225
OsmAnd/src/net/osmand/plus/UiUtilities.java
Normal file
|
@ -0,0 +1,225 @@
|
||||||
|
package net.osmand.plus;
|
||||||
|
|
||||||
|
import gnu.trove.map.hash.TLongObjectHashMap;
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.plus.views.DirectionDrawable;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.graphics.drawable.LayerDrawable;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
import android.support.annotation.ColorInt;
|
||||||
|
import android.support.annotation.ColorRes;
|
||||||
|
import android.support.annotation.DrawableRes;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.support.v4.graphics.drawable.DrawableCompat;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
public class UiUtilities {
|
||||||
|
|
||||||
|
private TLongObjectHashMap<Drawable> drawableCache = new TLongObjectHashMap<>();
|
||||||
|
private OsmandApplication app;
|
||||||
|
private static final int ORIENTATION_0 = 0;
|
||||||
|
private static final int ORIENTATION_90 = 3;
|
||||||
|
private static final int ORIENTATION_270 = 1;
|
||||||
|
private static final int ORIENTATION_180 = 2;
|
||||||
|
|
||||||
|
|
||||||
|
public UiUtilities(OsmandApplication app) {
|
||||||
|
this.app = app;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Drawable getDrawable(@DrawableRes int resId, @ColorRes int clrId) {
|
||||||
|
long hash = ((long) resId << 31l) + clrId;
|
||||||
|
Drawable d = drawableCache.get(hash);
|
||||||
|
if (d == null) {
|
||||||
|
d = ContextCompat.getDrawable(app, resId);
|
||||||
|
d = DrawableCompat.wrap(d);
|
||||||
|
d.mutate();
|
||||||
|
if (clrId != 0) {
|
||||||
|
DrawableCompat.setTint(d, ContextCompat.getColor(app, clrId));
|
||||||
|
}
|
||||||
|
drawableCache.put(hash, d);
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Drawable getPaintedDrawable(@DrawableRes int resId, @ColorInt int color) {
|
||||||
|
long hash = ((long) resId << 31l) + color;
|
||||||
|
Drawable d = drawableCache.get(hash);
|
||||||
|
if (d == null) {
|
||||||
|
d = ContextCompat.getDrawable(app, resId);
|
||||||
|
d = DrawableCompat.wrap(d);
|
||||||
|
d.mutate();
|
||||||
|
DrawableCompat.setTint(d, color);
|
||||||
|
|
||||||
|
drawableCache.put(hash, d);
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getPaintedIcon(@DrawableRes int id, @ColorInt int color) {
|
||||||
|
return getPaintedDrawable(id, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getIcon(@DrawableRes int id, @ColorRes int colorId) {
|
||||||
|
return getDrawable(id, colorId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getIcon(@DrawableRes int backgroundId, @DrawableRes int id, @ColorRes int colorId) {
|
||||||
|
Drawable b = getDrawable(backgroundId, 0);
|
||||||
|
Drawable f = getDrawable(id, colorId);
|
||||||
|
Drawable[] layers = new Drawable[2];
|
||||||
|
layers[0] = b;
|
||||||
|
layers[1] = f;
|
||||||
|
return new LayerDrawable(layers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getThemedIcon(@DrawableRes int id) {
|
||||||
|
return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getIcon(@DrawableRes int id) {
|
||||||
|
return getDrawable(id, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Drawable getIcon(@DrawableRes int id, boolean light) {
|
||||||
|
return getDrawable(id, light ? R.color.icon_color : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ColorRes
|
||||||
|
public static int getDefaultColorRes(Context context) {
|
||||||
|
final OsmandApplication app = (OsmandApplication) context.getApplicationContext();
|
||||||
|
boolean light = app.getSettings().isLightContent();
|
||||||
|
return light ? R.color.icon_color : R.color.color_white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public UpdateLocationViewCache getUpdateLocationViewCache(){
|
||||||
|
UpdateLocationViewCache uvc = new UpdateLocationViewCache();
|
||||||
|
uvc.screenOrientation = getScreenOrientation();
|
||||||
|
return uvc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class UpdateLocationViewCache {
|
||||||
|
int screenOrientation;
|
||||||
|
public boolean paintTxt = true;
|
||||||
|
public int arrowResId;
|
||||||
|
public int arrowColor;
|
||||||
|
public int textColor;
|
||||||
|
public LatLon specialFrom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateLocationView(UpdateLocationViewCache cache, ImageView arrow, TextView txt,
|
||||||
|
double toLat, double toLon) {
|
||||||
|
updateLocationView(cache, arrow, txt, new LatLon(toLat, toLon));
|
||||||
|
}
|
||||||
|
public void updateLocationView(UpdateLocationViewCache cache, ImageView arrow, TextView txt,
|
||||||
|
LatLon toLoc) {
|
||||||
|
float[] mes = new float[2];
|
||||||
|
boolean stale = false;
|
||||||
|
LatLon fromLoc = cache == null ? null : cache.specialFrom;
|
||||||
|
boolean useCenter = fromLoc != null;
|
||||||
|
Float h = null;
|
||||||
|
if (fromLoc == null) {
|
||||||
|
Location loc = app.getLocationProvider().getLastKnownLocation();
|
||||||
|
h = app.getLocationProvider().getHeading();
|
||||||
|
if (loc == null) {
|
||||||
|
loc = app.getLocationProvider().getLastStaleKnownLocation();
|
||||||
|
stale = true;
|
||||||
|
}
|
||||||
|
if (loc != null) {
|
||||||
|
fromLoc = new LatLon(loc.getLatitude(), loc.getLongitude());
|
||||||
|
} else {
|
||||||
|
useCenter = true;
|
||||||
|
fromLoc = app.getMapViewTrackingUtilities().getMapLocation();
|
||||||
|
h = app.getMapViewTrackingUtilities().getMapRotate();
|
||||||
|
if(h != null) {
|
||||||
|
h = -h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fromLoc != null && toLoc != null) {
|
||||||
|
Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(),
|
||||||
|
fromLoc.getLongitude(), mes);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arrow != null) {
|
||||||
|
boolean newImage = false;
|
||||||
|
int arrowResId = cache == null ? 0 : cache.arrowResId;
|
||||||
|
if (arrowResId == 0) {
|
||||||
|
arrowResId = R.drawable.ic_direction_arrow;
|
||||||
|
}
|
||||||
|
DirectionDrawable dd;
|
||||||
|
if (!(arrow.getDrawable() instanceof DirectionDrawable)) {
|
||||||
|
newImage = true;
|
||||||
|
dd = new DirectionDrawable(app, arrow.getWidth(), arrow.getHeight());
|
||||||
|
} else {
|
||||||
|
dd = (DirectionDrawable) arrow.getDrawable();
|
||||||
|
}
|
||||||
|
int imgColorSet = cache == null ? 0 : cache.arrowColor;
|
||||||
|
if (imgColorSet == 0) {
|
||||||
|
imgColorSet = useCenter ? R.color.color_distance : R.color.color_myloc_distance;
|
||||||
|
if (stale) {
|
||||||
|
imgColorSet = R.color.icon_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dd.setImage(arrowResId, imgColorSet);
|
||||||
|
if (fromLoc == null || h == null || toLoc == null) {
|
||||||
|
dd.setAngle(0);
|
||||||
|
} else {
|
||||||
|
float orientation = (cache == null ? 0 : cache.screenOrientation) ;
|
||||||
|
dd.setAngle(mes[1] - h + 180 + orientation);
|
||||||
|
}
|
||||||
|
if (newImage) {
|
||||||
|
arrow.setImageDrawable(dd);
|
||||||
|
}
|
||||||
|
arrow.invalidate();
|
||||||
|
}
|
||||||
|
if (txt != null) {
|
||||||
|
if (fromLoc != null && toLoc != null) {
|
||||||
|
if (cache.paintTxt) {
|
||||||
|
int textColorSet = cache.textColor;
|
||||||
|
if (textColorSet == 0) {
|
||||||
|
textColorSet = useCenter ? R.color.color_distance : R.color.color_myloc_distance;
|
||||||
|
if (stale) {
|
||||||
|
textColorSet = R.color.icon_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
txt.setTextColor(app.getResources().getColor(textColorSet));
|
||||||
|
}
|
||||||
|
txt.setText(OsmAndFormatter.getFormattedDistance(mes[0], app));
|
||||||
|
} else {
|
||||||
|
txt.setText("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getScreenOrientation() {
|
||||||
|
int screenOrientation = ((WindowManager) app.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
|
||||||
|
switch (screenOrientation) {
|
||||||
|
case ORIENTATION_0: // Device default (normally portrait)
|
||||||
|
screenOrientation = 0;
|
||||||
|
break;
|
||||||
|
case ORIENTATION_90: // Landscape right
|
||||||
|
screenOrientation = 90;
|
||||||
|
break;
|
||||||
|
case ORIENTATION_270: // Landscape left
|
||||||
|
screenOrientation = 270;
|
||||||
|
break;
|
||||||
|
case ORIENTATION_180: // Upside down
|
||||||
|
screenOrientation = 180;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Looks like screenOrientation correction must not be applied for devices without compass?
|
||||||
|
Sensor compass = ((SensorManager) app.getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
|
||||||
|
if (compass == null) {
|
||||||
|
screenOrientation = 0;
|
||||||
|
}
|
||||||
|
return screenOrientation;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -44,7 +44,7 @@ public abstract class ActionBarPreferenceActivity extends AppCompatPreferenceAct
|
||||||
shadowView = null;
|
shadowView = null;
|
||||||
}
|
}
|
||||||
tb.setClickable(true);
|
tb.setClickable(true);
|
||||||
tb.setNavigationIcon(((OsmandApplication) getApplication()).getIconsCache().getIcon(R.drawable.ic_arrow_back));
|
tb.setNavigationIcon(((OsmandApplication) getApplication()).getUIUtilities().getIcon(R.drawable.ic_arrow_back));
|
||||||
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
tb.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||||
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
|
tb.setBackgroundColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTabBackground)));
|
||||||
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
|
tb.setTitleTextColor(getResources().getColor(getResIdFromAttribute(this, R.attr.pstsTextColor)));
|
||||||
|
|
|
@ -244,7 +244,7 @@ public class EditFavoriteGroupDialogFragment extends MenuBottomSheetDialogFragme
|
||||||
if (color == 0) {
|
if (color == 0) {
|
||||||
colorImageView.setImageDrawable(getContentIcon(R.drawable.ic_action_circle));
|
colorImageView.setImageDrawable(getContentIcon(R.drawable.ic_action_circle));
|
||||||
} else {
|
} else {
|
||||||
colorImageView.setImageDrawable(getMyApplication().getIconsCache().getPaintedIcon(R.drawable.ic_action_circle, color));
|
colorImageView.setImageDrawable(getMyApplication().getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, color));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ public class EditFavoriteGroupDialogFragment extends MenuBottomSheetDialogFragme
|
||||||
TextView textView = (TextView) v.findViewById(R.id.text1);
|
TextView textView = (TextView) v.findViewById(R.id.text1);
|
||||||
textView.setText(app.getString(ColorDialogs.paletteColors[position]));
|
textView.setText(app.getString(ColorDialogs.paletteColors[position]));
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
||||||
app.getIconsCache().getPaintedIcon(R.drawable.ic_action_circle, color), null);
|
app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, color), null);
|
||||||
textView.setCompoundDrawablePadding(AndroidUtils.dpToPx(getContext(), 10f));
|
textView.setCompoundDrawablePadding(AndroidUtils.dpToPx(getContext(), 10f));
|
||||||
v.findViewById(R.id.divider).setVisibility(View.GONE);
|
v.findViewById(R.id.divider).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,24 @@
|
||||||
*/
|
*/
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
|
import java.text.Collator;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.data.FavouritePoint;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.activities.search.SearchActivity;
|
||||||
|
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||||
|
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||||
|
import net.osmand.plus.base.OsmAndListFragment;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
@ -20,23 +38,6 @@ import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.data.FavouritePoint;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.search.SearchActivity;
|
|
||||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
|
||||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
|
||||||
import net.osmand.plus.base.OsmAndListFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class FavoritesListFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener {
|
public class FavoritesListFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener {
|
||||||
|
|
||||||
public static final String SELECT_FAVORITE_POINT_INTENT_KEY = "SELECT_FAVORITE_POINT_INTENT_KEY";
|
public static final String SELECT_FAVORITE_POINT_INTENT_KEY = "SELECT_FAVORITE_POINT_INTENT_KEY";
|
||||||
|
@ -48,7 +49,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
private OsmandSettings settings;
|
private OsmandSettings settings;
|
||||||
private boolean compassRegistered;
|
private boolean compassRegistered;
|
||||||
|
|
||||||
|
float lastHeading ;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Activity activity) {
|
public void onAttach(Activity activity) {
|
||||||
|
@ -67,7 +68,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
double lat = intent.getDoubleExtra(SearchActivity.SEARCH_LAT, 0);
|
double lat = intent.getDoubleExtra(SearchActivity.SEARCH_LAT, 0);
|
||||||
double lon = intent.getDoubleExtra(SearchActivity.SEARCH_LON, 0);
|
double lon = intent.getDoubleExtra(SearchActivity.SEARCH_LON, 0);
|
||||||
if (lat != 0 || lon != 0) {
|
if (lat != 0 || lon != 0) {
|
||||||
favouritesAdapter.location = new LatLon(lat, lon);
|
favouritesAdapter.cache.specialFrom = new LatLon(lat, lon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,15 +86,10 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
if (getActivity() instanceof SearchActivity && ((SearchActivity) getActivity()).getSearchPoint() != null) {
|
||||||
if (favouritesAdapter.location == null && getActivity() instanceof SearchActivity) {
|
favouritesAdapter.cache.specialFrom = ((SearchActivity) getActivity()).getSearchPoint();
|
||||||
favouritesAdapter.location = ((SearchActivity) getActivity()).getSearchPoint();
|
|
||||||
}
|
}
|
||||||
if (favouritesAdapter.location == null) {
|
locationUpdate(favouritesAdapter.cache.specialFrom);
|
||||||
favouritesAdapter.location = settings.getLastKnownMapLocation();
|
|
||||||
}
|
|
||||||
favouritesAdapter.screenOrientation = DashLocationFragment.getScreenOrientation(getActivity());
|
|
||||||
locationUpdate(favouritesAdapter.location);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -106,13 +102,17 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
app.getLocationProvider().addCompassListener(this);
|
app.getLocationProvider().addCompassListener(this);
|
||||||
compassRegistered = true;
|
compassRegistered = true;
|
||||||
}
|
}
|
||||||
favouritesAdapter.searchAroundLocation = true;
|
favouritesAdapter.cache.specialFrom = null;
|
||||||
} else {
|
} else {
|
||||||
favouritesAdapter.searchAroundLocation = false;
|
favouritesAdapter.cache.specialFrom = ((SearchActivity) getActivity()).getSearchPoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (favouritesAdapter != null) {
|
if (favouritesAdapter != null) {
|
||||||
favouritesAdapter.updateLocation(l);
|
if(l != null) {
|
||||||
|
favouritesAdapter.sortByName();
|
||||||
|
} else {
|
||||||
|
favouritesAdapter.sortByDistance(l);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -156,33 +156,27 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
|
|
||||||
public static class FavouritesAdapter extends ArrayAdapter<FavouritePoint> {
|
public static class FavouritesAdapter extends ArrayAdapter<FavouritePoint> {
|
||||||
private Activity activity;
|
private Activity activity;
|
||||||
private LatLon location;
|
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
private boolean searchAroundLocation;
|
private boolean shouldShowMenuButton;
|
||||||
private int screenOrientation;
|
private UpdateLocationViewCache cache;
|
||||||
private Float heading;
|
|
||||||
private boolean shoudShowMenuButton;
|
|
||||||
|
|
||||||
public FavouritesAdapter(Activity activity, List<FavouritePoint> list,
|
public FavouritesAdapter(Activity activity, List<FavouritePoint> list,
|
||||||
boolean shoudShowMenuButton) {
|
boolean shouldShowMenuButton) {
|
||||||
super(activity, R.layout.favorites_list_item, list);
|
super(activity, R.layout.favorites_list_item, list);
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
this.app = ((OsmandApplication) activity.getApplication());
|
this.app = ((OsmandApplication) activity.getApplication());
|
||||||
this.shoudShowMenuButton = shoudShowMenuButton;
|
this.shouldShowMenuButton = shouldShowMenuButton;
|
||||||
|
cache = app.getUIUtilities().getUpdateLocationViewCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatLon getLocation() {
|
|
||||||
return location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateLocation(LatLon l) {
|
public void updateLocation(final LatLon l) {
|
||||||
location = l;
|
|
||||||
sort(new Comparator<FavouritePoint>() {
|
sort(new Comparator<FavouritePoint>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(FavouritePoint object1, FavouritePoint object2) {
|
public int compare(FavouritePoint object1, FavouritePoint object2) {
|
||||||
if (location != null) {
|
if (l != null) {
|
||||||
double d1 = MapUtils.getDistance(location, object1.getLatitude(), object1.getLongitude());
|
double d1 = MapUtils.getDistance(l, object1.getLatitude(), object1.getLongitude());
|
||||||
double d2 = MapUtils.getDistance(location, object2.getLatitude(), object2.getLongitude());
|
double d2 = MapUtils.getDistance(l, object2.getLatitude(), object2.getLongitude());
|
||||||
if (d1 == d2) {
|
if (d1 == d2) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (d1 > d2) {
|
} else if (d1 > d2) {
|
||||||
|
@ -204,7 +198,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
View row = convertView;
|
View row = convertView;
|
||||||
if (row == null) {
|
if (row == null) {
|
||||||
LayoutInflater inflater = activity.getLayoutInflater(); // favourite dank
|
LayoutInflater inflater = activity.getLayoutInflater();
|
||||||
row = inflater.inflate(R.layout.favorites_list_item, parent, false);
|
row = inflater.inflate(R.layout.favorites_list_item, parent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,14 +206,14 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
||||||
ImageView icon = (ImageView) row.findViewById(R.id.favourite_icon);
|
ImageView icon = (ImageView) row.findViewById(R.id.favourite_icon);
|
||||||
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
||||||
ImageView giImage= (ImageView)row.findViewById(R.id.group_image);
|
ImageView giImage = (ImageView) row.findViewById(R.id.group_image);
|
||||||
direction.setVisibility(View.VISIBLE);
|
direction.setVisibility(View.VISIBLE);
|
||||||
final FavouritePoint favorite = getItem(position);
|
final FavouritePoint favorite = getItem(position);
|
||||||
if (shoudShowMenuButton) {
|
if (shouldShowMenuButton) {
|
||||||
ImageButton options = (ImageButton) row.findViewById(R.id.options);
|
ImageButton options = (ImageButton) row.findViewById(R.id.options);
|
||||||
options.setFocusable(false);
|
options.setFocusable(false);
|
||||||
options.setImageDrawable(((OsmandApplication) activity.getApplication())
|
options.setImageDrawable(((OsmandApplication) activity.getApplication()).getUIUtilities()
|
||||||
.getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
.getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
options.setVisibility(View.VISIBLE);
|
options.setVisibility(View.VISIBLE);
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -230,25 +224,65 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
}
|
}
|
||||||
if (!favorite.getCategory().isEmpty()) {
|
if (!favorite.getCategory().isEmpty()) {
|
||||||
giImage.setVisibility(View.VISIBLE);
|
giImage.setVisibility(View.VISIBLE);
|
||||||
giImage.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_group));
|
giImage.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_small_group));
|
||||||
} else {
|
} else {
|
||||||
giImage.setVisibility(View.GONE);
|
giImage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
((TextView) row.findViewById(R.id.group_name)).setText(favorite.getCategory());
|
((TextView) row.findViewById(R.id.group_name)).setText(favorite.getCategory());
|
||||||
|
|
||||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, favorite.getColor(), false));
|
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, favorite.getColor(), false));
|
||||||
DashLocationFragment.updateLocationView(!searchAroundLocation, location, heading, direction, distanceText,
|
|
||||||
favorite.getLatitude(), favorite.getLongitude(), screenOrientation, app);
|
app.getUIUtilities().updateLocationView(cache, direction, distanceText,
|
||||||
|
favorite.getLatitude(), favorite.getLongitude());
|
||||||
name.setText(getName(favorite));
|
name.setText(getName(favorite));
|
||||||
final CheckBox ch = (CheckBox) row.findViewById(R.id.toggle_item);
|
final CheckBox ch = (CheckBox) row.findViewById(R.id.toggle_item);
|
||||||
icon.setVisibility(View.VISIBLE);
|
icon.setVisibility(View.VISIBLE);
|
||||||
ch.setVisibility(View.GONE);
|
ch.setVisibility(View.GONE);
|
||||||
if (activity instanceof SearchActivity)
|
if (activity instanceof SearchActivity)
|
||||||
ViewCompat.setAccessibilityDelegate(row, ((SearchActivity)activity).getAccessibilityAssistant());
|
ViewCompat.setAccessibilityDelegate(row, ((SearchActivity) activity).getAccessibilityAssistant());
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sortByName() {
|
||||||
|
final Collator inst = Collator.getInstance();
|
||||||
|
sort(new Comparator<FavouritePoint>() {
|
||||||
|
@Override
|
||||||
|
public int compare(FavouritePoint o1, FavouritePoint o2) {
|
||||||
|
return inst.compare(o1.getName(), o2.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
public void sortByDistance(final LatLon loc) {
|
||||||
|
sort(new Comparator<FavouritePoint>() {
|
||||||
|
@Override
|
||||||
|
public int compare(FavouritePoint lhs, FavouritePoint rhs) {
|
||||||
|
if (loc == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
double ld = MapUtils.getDistance(loc, lhs.getLatitude(), lhs.getLongitude());
|
||||||
|
double rd = MapUtils.getDistance(loc, rhs.getLatitude(), rhs.getLongitude());
|
||||||
|
return Double.compare(ld, rd);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void sortByDefault() {
|
||||||
|
Location loc = app.getLocationProvider().getLastStaleKnownLocation();
|
||||||
|
LatLon map = app.getMapViewTrackingUtilities().getMapLocation();
|
||||||
|
if (loc != null) {
|
||||||
|
sortByDistance(new LatLon(loc.getLatitude(), loc.getLongitude()));
|
||||||
|
} else if(map != null){
|
||||||
|
sortByDistance(map);
|
||||||
|
} else{
|
||||||
|
sortByName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public OsmandApplication getMyApplication() {
|
public OsmandApplication getMyApplication() {
|
||||||
|
@ -260,9 +294,8 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
// 99 in next line used to one-time initialize arrows (with reference vs. fixed-north direction) on non-compass
|
// 99 in next line used to one-time initialize arrows (with reference vs. fixed-north direction) on non-compass
|
||||||
// devices
|
// devices
|
||||||
FragmentActivity activity = getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
float lastHeading = favouritesAdapter.heading != null ? favouritesAdapter.heading : 99;
|
if (Math.abs(MapUtils.degreesDiff(lastHeading, value)) > 5) {
|
||||||
favouritesAdapter.heading = value;
|
lastHeading = value;
|
||||||
if (Math.abs(MapUtils.degreesDiff(lastHeading, favouritesAdapter.heading)) > 5) {
|
|
||||||
if (activity instanceof SearchActivity) {
|
if (activity instanceof SearchActivity) {
|
||||||
((SearchActivity)activity).getAccessibilityAssistant().lockEvents();
|
((SearchActivity)activity).getAccessibilityAssistant().lockEvents();
|
||||||
favouritesAdapter.notifyDataSetChanged();
|
favouritesAdapter.notifyDataSetChanged();
|
||||||
|
@ -270,8 +303,6 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
} else {
|
} else {
|
||||||
favouritesAdapter.notifyDataSetChanged();
|
favouritesAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
favouritesAdapter.heading = lastHeading;
|
|
||||||
}
|
}
|
||||||
if (activity instanceof SearchActivity) {
|
if (activity instanceof SearchActivity) {
|
||||||
final View selected = ((SearchActivity)activity).getAccessibilityAssistant().getFocusedView();
|
final View selected = ((SearchActivity)activity).getAccessibilityAssistant().getFocusedView();
|
||||||
|
@ -281,7 +312,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
||||||
if ((position != AdapterView.INVALID_POSITION) && (position >= getListView().getHeaderViewsCount())) {
|
if ((position != AdapterView.INVALID_POSITION) && (position >= getListView().getHeaderViewsCount())) {
|
||||||
FavouritePoint point = favouritesAdapter.getItem(position - getListView().getHeaderViewsCount());
|
FavouritePoint point = favouritesAdapter.getItem(position - getListView().getHeaderViewsCount());
|
||||||
LatLon location = new LatLon(point.getLatitude(), point.getLongitude());
|
LatLon location = new LatLon(point.getLatitude(), point.getLongitude());
|
||||||
((SearchActivity)activity).getNavigationInfo().updateTargetDirection(location, favouritesAdapter.heading.floatValue());
|
((SearchActivity)activity).getNavigationInfo().updateTargetDirection(location, value);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class FavoritesSearchFragment extends DialogFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
||||||
toolbar.setNavigationIcon(app.getIconsCache().getThemedIcon(R.drawable.ic_arrow_back));
|
toolbar.setNavigationIcon(app.getUIUtilities().getThemedIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||||
toolbar.setNavigationOnClickListener(
|
toolbar.setNavigationOnClickListener(
|
||||||
new View.OnClickListener() {
|
new View.OnClickListener() {
|
||||||
|
@ -141,7 +141,7 @@ public class FavoritesSearchFragment extends DialogFragment {
|
||||||
|
|
||||||
progressBar = (ProgressBar) view.findViewById(R.id.searchProgressBar);
|
progressBar = (ProgressBar) view.findViewById(R.id.searchProgressBar);
|
||||||
clearButton = (ImageButton) view.findViewById(R.id.clearButton);
|
clearButton = (ImageButton) view.findViewById(R.id.clearButton);
|
||||||
clearButton.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark));
|
clearButton.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||||
clearButton.setOnClickListener(
|
clearButton.setOnClickListener(
|
||||||
new View.OnClickListener() {
|
new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
View searchView = inflater.inflate(R.layout.search_fav_list_item, null);
|
View searchView = inflater.inflate(R.layout.search_fav_list_item, null);
|
||||||
searchView.setBackgroundResource(light ? R.color.bg_color_light : R.color.bg_color_dark);
|
searchView.setBackgroundResource(light ? R.color.bg_color_light : R.color.bg_color_dark);
|
||||||
TextView title = (TextView) searchView.findViewById(R.id.title);
|
TextView title = (TextView) searchView.findViewById(R.id.title);
|
||||||
title.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
title.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
||||||
title.setHint(R.string.shared_string_search);
|
title.setHint(R.string.shared_string_search);
|
||||||
searchView.setOnClickListener(new View.OnClickListener() {
|
searchView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -783,7 +783,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
|
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
|
||||||
row.findViewById(R.id.group_divider).setVisibility(groupPosition == 0 ? View.GONE : View.VISIBLE);
|
row.findViewById(R.id.group_divider).setVisibility(groupPosition == 0 ? View.GONE : View.VISIBLE);
|
||||||
int color = model.color == 0 || model.color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : model.color;
|
int color = model.color == 0 || model.color == Color.BLACK ? getResources().getColor(R.color.color_favorite) : model.color;
|
||||||
setCategoryIcon(app, app.getIconsCache().getPaintedIcon(
|
setCategoryIcon(app, app.getUIUtilities().getPaintedIcon(
|
||||||
R.drawable.ic_action_fav_dark, visible ? (color | 0xff000000) : getResources().getColor(disabledColor)),
|
R.drawable.ic_action_fav_dark, visible ? (color | 0xff000000) : getResources().getColor(disabledColor)),
|
||||||
groupPosition, isExpanded, row, light);
|
groupPosition, isExpanded, row, light);
|
||||||
adjustIndicator(app, groupPosition, isExpanded, row, light);
|
adjustIndicator(app, groupPosition, isExpanded, row, light);
|
||||||
|
@ -833,7 +833,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
}
|
}
|
||||||
final View ch = row.findViewById(R.id.options);
|
final View ch = row.findViewById(R.id.options);
|
||||||
if (!selectionMode) {
|
if (!selectionMode) {
|
||||||
((ImageView) ch).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
((ImageView) ch).setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
ch.setVisibility(View.VISIBLE);
|
ch.setVisibility(View.VISIBLE);
|
||||||
ch.setContentDescription(getString(R.string.shared_string_settings));
|
ch.setContentDescription(getString(R.string.shared_string_settings));
|
||||||
ch.setOnClickListener(new View.OnClickListener() {
|
ch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -877,7 +877,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
||||||
if (showOptionsButton) {
|
if (showOptionsButton) {
|
||||||
ImageView options = (ImageView) row.findViewById(R.id.options);
|
ImageView options = (ImageView) row.findViewById(R.id.options);
|
||||||
options.setFocusable(false);
|
options.setFocusable(false);
|
||||||
options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(
|
options.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(
|
||||||
R.drawable.ic_overflow_menu_white));
|
R.drawable.ic_overflow_menu_white));
|
||||||
options.setVisibility(View.VISIBLE);
|
options.setVisibility(View.VISIBLE);
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class IntermediatePointsDialog {
|
||||||
} else {
|
} else {
|
||||||
int icon = position == intermediates.size() - 1? R.drawable.ic_action_target:
|
int icon = position == intermediates.size() - 1? R.drawable.ic_action_target:
|
||||||
R.drawable.ic_action_intermediate;
|
R.drawable.ic_action_intermediate;
|
||||||
tv.setCompoundDrawablesWithIntrinsicBounds(app.getIconsCache().getThemedIcon(icon), null, null, null);
|
tv.setCompoundDrawablesWithIntrinsicBounds(app.getUIUtilities().getThemedIcon(icon), null, null, null);
|
||||||
tv.setCompoundDrawablePadding(padding);
|
tv.setCompoundDrawablePadding(padding);
|
||||||
final CheckBox ch = ((CheckBox) v.findViewById(R.id.toggle_item));
|
final CheckBox ch = ((CheckBox) v.findViewById(R.id.toggle_item));
|
||||||
ch.setVisibility(View.VISIBLE);
|
ch.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
|
|
||||||
private static final Log LOG = PlatformUtil.getLog(MapActivity.class);
|
private static final Log LOG = PlatformUtil.getLog(MapActivity.class);
|
||||||
|
|
||||||
private static MapViewTrackingUtilities mapViewTrackingUtilities;
|
private MapViewTrackingUtilities mapViewTrackingUtilities;
|
||||||
private static MapContextMenu mapContextMenu = new MapContextMenu();
|
private static MapContextMenu mapContextMenu = new MapContextMenu();
|
||||||
private static Intent prevActivityIntent = null;
|
private static Intent prevActivityIntent = null;
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
boolean portraitMode = AndroidUiHelper.isOrientationPortrait(this);
|
boolean portraitMode = AndroidUiHelper.isOrientationPortrait(this);
|
||||||
boolean largeDevice = AndroidUiHelper.isXLargeDevice(this);
|
boolean largeDevice = AndroidUiHelper.isXLargeDevice(this);
|
||||||
landscapeLayout = !portraitMode && !largeDevice;
|
landscapeLayout = !portraitMode && !largeDevice;
|
||||||
|
mapViewTrackingUtilities = app.getMapViewTrackingUtilities();
|
||||||
mapContextMenu.setMapActivity(this);
|
mapContextMenu.setMapActivity(this);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -1227,10 +1227,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatLon getMapLocation() {
|
public LatLon getMapLocation() {
|
||||||
if (mapView == null) {
|
return mapViewTrackingUtilities.getMapLocation();
|
||||||
return settings.getLastKnownMapLocation();
|
|
||||||
}
|
|
||||||
return new LatLon(mapView.getLatitude(), mapView.getLongitude());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMapRotate() {
|
public float getMapRotate() {
|
||||||
|
@ -1452,9 +1449,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
return mapViewTrackingUtilities;
|
return mapViewTrackingUtilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapViewTrackingUtilities getSingleMapViewTrackingUtilities() {
|
|
||||||
return mapViewTrackingUtilities;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void parseLaunchIntentLocation() {
|
protected void parseLaunchIntentLocation() {
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
|
|
|
@ -327,7 +327,7 @@ public class MapActivityLayers {
|
||||||
@Override
|
@Override
|
||||||
public void onShow(DialogInterface dialog) {
|
public void onShow(DialogInterface dialog) {
|
||||||
Button neutralButton = alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL);
|
Button neutralButton = alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL);
|
||||||
Drawable drawable = app.getIconsCache().getThemedIcon(R.drawable.ic_action_singleselect);
|
Drawable drawable = app.getUIUtilities().getThemedIcon(R.drawable.ic_action_singleselect);
|
||||||
neutralButton.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
neutralButton.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
||||||
neutralButton.setContentDescription(app.getString(R.string.shared_string_filters));
|
neutralButton.setContentDescription(app.getString(R.string.shared_string_filters));
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ public class MapActivityLayers {
|
||||||
@Override
|
@Override
|
||||||
public void onShow(DialogInterface dialog) {
|
public void onShow(DialogInterface dialog) {
|
||||||
Button neutralButton = alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL);
|
Button neutralButton = alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL);
|
||||||
Drawable drawable = app.getIconsCache().getThemedIcon(R.drawable.ic_action_multiselect);
|
Drawable drawable = app.getUIUtilities().getThemedIcon(R.drawable.ic_action_multiselect);
|
||||||
neutralButton.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
neutralButton.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
||||||
neutralButton.setContentDescription(app.getString(R.string.apply_filters));
|
neutralButton.setContentDescription(app.getString(R.string.apply_filters));
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class NavigatePointFragment extends Fragment implements SearchActivityChi
|
||||||
}
|
}
|
||||||
MenuItem menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
|
MenuItem menuItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
|
||||||
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
MenuItemCompat.setShowAsAction(menuItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
menuItem = menuItem.setIcon(app.getIconsCache().getIcon(R.drawable.ic_action_marker_dark, light));
|
menuItem = menuItem.setIcon(app.getUIUtilities().getIcon(R.drawable.ic_action_marker_dark, light));
|
||||||
|
|
||||||
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
menuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class OpeningHoursView {
|
||||||
}
|
}
|
||||||
TextView label = (TextView)row.findViewById(R.id.label);
|
TextView label = (TextView)row.findViewById(R.id.label);
|
||||||
ImageView icon = (ImageView)row.findViewById(R.id.remove);
|
ImageView icon = (ImageView)row.findViewById(R.id.remove);
|
||||||
icon.setBackgroundDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark));
|
icon.setBackgroundDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||||
if(selectedRule == position){
|
if(selectedRule == position){
|
||||||
label.setTypeface(null, Typeface.BOLD);
|
label.setTypeface(null, Typeface.BOLD);
|
||||||
label.setTextSize(22);
|
label.setTextSize(22);
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class OsmandActionBarActivity extends OsmandInAppPurchaseActivity {
|
||||||
|
|
||||||
//should be called after set content view
|
//should be called after set content view
|
||||||
protected void setupHomeButton(){
|
protected void setupHomeButton(){
|
||||||
Drawable back = ((OsmandApplication)getApplication()).getIconsCache().getIcon(R.drawable.ic_arrow_back);
|
Drawable back = ((OsmandApplication)getApplication()).getUIUtilities().getIcon(R.drawable.ic_arrow_back);
|
||||||
back.setColorFilter(ContextCompat.getColor(this, R.color.color_white), PorterDuff.Mode.MULTIPLY);
|
back.setColorFilter(ContextCompat.getColor(this, R.color.color_white), PorterDuff.Mode.MULTIPLY);
|
||||||
final ActionBar supportActionBar = getSupportActionBar();
|
final ActionBar supportActionBar = getSupportActionBar();
|
||||||
if (supportActionBar != null) {
|
if (supportActionBar != null) {
|
||||||
|
|
|
@ -13,10 +13,10 @@ public abstract class OsmandBaseExpandableListAdapter extends BaseExpandableList
|
||||||
protected void adjustIndicator(OsmandApplication app, int groupPosition, boolean isExpanded, View row, boolean light) {
|
protected void adjustIndicator(OsmandApplication app, int groupPosition, boolean isExpanded, View row, boolean light) {
|
||||||
ImageView indicator = (ImageView) row.findViewById(R.id.explist_indicator);
|
ImageView indicator = (ImageView) row.findViewById(R.id.explist_indicator);
|
||||||
if (!isExpanded) {
|
if (!isExpanded) {
|
||||||
indicator.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_down, light));
|
indicator.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_arrow_down, light));
|
||||||
indicator.setContentDescription(row.getContext().getString(R.string.access_collapsed_list));
|
indicator.setContentDescription(row.getContext().getString(R.string.access_collapsed_list));
|
||||||
} else {
|
} else {
|
||||||
indicator.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_up, light));
|
indicator.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_arrow_up, light));
|
||||||
indicator.setContentDescription(row.getContext().getString(R.string.access_expanded_list));
|
indicator.setContentDescription(row.getContext().getString(R.string.access_expanded_list));
|
||||||
}
|
}
|
||||||
indicator.setVisibility(getChildrenCount(groupPosition) > 0 ? View.VISIBLE : View.GONE);
|
indicator.setVisibility(getChildrenCount(groupPosition) > 0 ? View.VISIBLE : View.GONE);
|
||||||
|
@ -25,9 +25,9 @@ public abstract class OsmandBaseExpandableListAdapter extends BaseExpandableList
|
||||||
protected void setCategoryIcon(OsmandApplication app, int resId, int groupPosition, boolean isExpanded, View row, boolean light) {
|
protected void setCategoryIcon(OsmandApplication app, int resId, int groupPosition, boolean isExpanded, View row, boolean light) {
|
||||||
ImageView icon = (ImageView) row.findViewById(R.id.category_icon);
|
ImageView icon = (ImageView) row.findViewById(R.id.category_icon);
|
||||||
if (resId == 0) {
|
if (resId == 0) {
|
||||||
icon.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_folder_stroke, light));
|
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_folder_stroke, light));
|
||||||
} else {
|
} else {
|
||||||
icon.setImageDrawable(app.getIconsCache().getIcon(resId, light));
|
icon.setImageDrawable(app.getUIUtilities().getIcon(resId, light));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public abstract class OsmandListActivity extends
|
||||||
public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconDark, int menuItemType) {
|
public MenuItem createMenuItem(Menu m, int id, int titleRes, int iconDark, int menuItemType) {
|
||||||
MenuItem menuItem = m.add(0, id, 0, titleRes);
|
MenuItem menuItem = m.add(0, id, 0, titleRes);
|
||||||
if (iconDark != 0) {
|
if (iconDark != 0) {
|
||||||
menuItem.setIcon(getMyApplication().getIconsCache().getIcon(iconDark));
|
menuItem.setIcon(getMyApplication().getUIUtilities().getIcon(iconDark));
|
||||||
}
|
}
|
||||||
menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class PluginActivity extends OsmandActionBarActivity {
|
||||||
Button getButton = (Button)findViewById(R.id.plugin_get);
|
Button getButton = (Button)findViewById(R.id.plugin_get);
|
||||||
Button settingsButton = (Button)findViewById(R.id.plugin_settings);
|
Button settingsButton = (Button)findViewById(R.id.plugin_settings);
|
||||||
settingsButton.setCompoundDrawablesWithIntrinsicBounds(
|
settingsButton.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_settings),
|
getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_settings),
|
||||||
null, null, null);
|
null, null, null);
|
||||||
View installHeader = findViewById(R.id.plugin_install_header);
|
View installHeader = findViewById(R.id.plugin_install_header);
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ public class PluginActivity extends OsmandActionBarActivity {
|
||||||
settingsButton.setVisibility(View.GONE);
|
settingsButton.setVisibility(View.GONE);
|
||||||
installHeader.setVisibility(View.VISIBLE);
|
installHeader.setVisibility(View.VISIBLE);
|
||||||
View worldGlobeIcon = installHeader.findViewById(R.id.ic_world_globe);
|
View worldGlobeIcon = installHeader.findViewById(R.id.ic_world_globe);
|
||||||
Drawable worldGlobeDrawable = getMyApplication().getIconsCache().getThemedIcon(
|
Drawable worldGlobeDrawable = getMyApplication().getUIUtilities().getThemedIcon(
|
||||||
R.drawable.ic_world_globe_dark);
|
R.drawable.ic_world_globe_dark);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
worldGlobeIcon.setBackground(worldGlobeDrawable);
|
worldGlobeIcon.setBackground(worldGlobeDrawable);
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class PluginsActivity extends OsmandListActivity {
|
||||||
|
|
||||||
|
|
||||||
ImageView pluginOptions = (ImageView) view.findViewById(R.id.plugin_options);
|
ImageView pluginOptions = (ImageView) view.findViewById(R.id.plugin_options);
|
||||||
pluginOptions.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
pluginOptions.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
pluginOptions.setOnClickListener(new View.OnClickListener() {
|
pluginOptions.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -1,6 +1,30 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.activities;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.IProgress;
|
||||||
|
import net.osmand.IndexConstants;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.osm.io.NetworkUtils;
|
||||||
|
import net.osmand.plus.ApplicationMode;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.OsmandSettings.DrivingRegion;
|
||||||
|
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.Version;
|
||||||
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
|
import net.osmand.plus.dashboard.DashChooseAppDirFragment;
|
||||||
|
import net.osmand.plus.dashboard.DashChooseAppDirFragment.ChooseAppDirFragment;
|
||||||
|
import net.osmand.plus.dashboard.DashChooseAppDirFragment.MoveFilesToDifferentDirectory;
|
||||||
|
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||||
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
|
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||||
|
import net.osmand.render.RenderingRulesStorage;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
@ -31,32 +55,6 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.IProgress;
|
|
||||||
import net.osmand.IndexConstants;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.osm.io.NetworkUtils;
|
|
||||||
import net.osmand.plus.ApplicationMode;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.OsmandSettings.DrivingRegion;
|
|
||||||
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.Version;
|
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.ChooseAppDirFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashChooseAppDirFragment.MoveFilesToDifferentDirectory;
|
|
||||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
|
||||||
import net.osmand.plus.inapp.InAppPurchaseHelper;
|
|
||||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
|
||||||
import net.osmand.render.RenderingRulesStorage;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public class SettingsGeneralActivity extends SettingsBaseActivity implements OnRequestPermissionsResultCallback {
|
public class SettingsGeneralActivity extends SettingsBaseActivity implements OnRequestPermissionsResultCallback {
|
||||||
|
|
||||||
|
@ -168,7 +166,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (drs.get(which) == null) {
|
if (drs.get(which) == null) {
|
||||||
settings.DRIVING_REGION_AUTOMATIC.set(true);
|
settings.DRIVING_REGION_AUTOMATIC.set(true);
|
||||||
MapViewTrackingUtilities mapViewTrackingUtilities = MapActivity.getSingleMapViewTrackingUtilities();
|
MapViewTrackingUtilities mapViewTrackingUtilities = getMyApplication().getMapViewTrackingUtilities();
|
||||||
if (mapViewTrackingUtilities != null) {
|
if (mapViewTrackingUtilities != null) {
|
||||||
mapViewTrackingUtilities.resetDrivingRegionUpdate();
|
mapViewTrackingUtilities.resetDrivingRegionUpdate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ import net.osmand.plus.GPXUtilities.TrkSegment;
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
@ -108,7 +108,7 @@ public class ShowRouteInfoDialogFragment extends DialogFragment {
|
||||||
view = inflater.inflate(R.layout.route_info_layout, container, false);
|
view = inflater.inflate(R.layout.route_info_layout, container, false);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
||||||
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_arrow_back));
|
toolbar.setNavigationIcon(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setNavigationContentDescription(R.string.shared_string_close);
|
toolbar.setNavigationContentDescription(R.string.shared_string_close);
|
||||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -118,9 +118,9 @@ public class ShowRouteInfoDialogFragment extends DialogFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
((ImageView) view.findViewById(R.id.distance_icon))
|
((ImageView) view.findViewById(R.id.distance_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_route_distance));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_route_distance));
|
||||||
((ImageView) view.findViewById(R.id.time_icon))
|
((ImageView) view.findViewById(R.id.time_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_time_span));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_time_span));
|
||||||
|
|
||||||
buildMenuButtons();
|
buildMenuButtons();
|
||||||
|
|
||||||
|
@ -337,13 +337,13 @@ public class ShowRouteInfoDialogFragment extends DialogFragment {
|
||||||
((TextView) headerView.findViewById(R.id.ascent_text)).setText(asc);
|
((TextView) headerView.findViewById(R.id.ascent_text)).setText(asc);
|
||||||
|
|
||||||
((ImageView) headerView.findViewById(R.id.average_icon))
|
((ImageView) headerView.findViewById(R.id.average_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_altitude_average));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_altitude_average));
|
||||||
((ImageView) headerView.findViewById(R.id.range_icon))
|
((ImageView) headerView.findViewById(R.id.range_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_altitude_average));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_altitude_average));
|
||||||
((ImageView) headerView.findViewById(R.id.descent_icon))
|
((ImageView) headerView.findViewById(R.id.descent_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_altitude_descent));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_altitude_descent));
|
||||||
((ImageView) headerView.findViewById(R.id.ascent_icon))
|
((ImageView) headerView.findViewById(R.id.ascent_icon))
|
||||||
.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_altitude_ascent));
|
.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_altitude_ascent));
|
||||||
|
|
||||||
headerView.findViewById(R.id.details_view).setOnClickListener(new View.OnClickListener() {
|
headerView.findViewById(R.id.details_view).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -415,7 +415,7 @@ public class ShowRouteInfoDialogFragment extends DialogFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildMenuButtons() {
|
private void buildMenuButtons() {
|
||||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMyApplication().getUIUtilities();
|
||||||
ImageButton printRoute = (ImageButton) view.findViewById(R.id.print_route);
|
ImageButton printRoute = (ImageButton) view.findViewById(R.id.print_route);
|
||||||
printRoute.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_gprint_dark));
|
printRoute.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_gprint_dark));
|
||||||
printRoute.setOnClickListener(new View.OnClickListener() {
|
printRoute.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -76,15 +76,15 @@ public class AppModeDialog {
|
||||||
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
|
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
|
||||||
boolean nightMode = isNightMode(ctx, useMapTheme);
|
boolean nightMode = isNightMode(ctx, useMapTheme);
|
||||||
if (checked) {
|
if (checked) {
|
||||||
iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), nightMode ? R.color.route_info_checked_mode_icon_color_dark : R.color.route_info_checked_mode_icon_color_light));
|
iv.setImageDrawable(ctx.getUIUtilities().getIcon(mode.getSmallIconDark(), nightMode ? R.color.route_info_checked_mode_icon_color_dark : R.color.route_info_checked_mode_icon_color_light));
|
||||||
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_checked)));
|
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_checked)));
|
||||||
tb.findViewById(R.id.selection).setVisibility(View.VISIBLE);
|
tb.findViewById(R.id.selection).setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
if (useMapTheme) {
|
if (useMapTheme) {
|
||||||
iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), R.color.route_info_unchecked_mode_icon_color));
|
iv.setImageDrawable(ctx.getUIUtilities().getIcon(mode.getSmallIconDark(), R.color.route_info_unchecked_mode_icon_color));
|
||||||
iv.setBackgroundResource(AndroidUtils.resolveAttribute(ctx, android.R.attr.selectableItemBackground));
|
iv.setBackgroundResource(AndroidUtils.resolveAttribute(ctx, android.R.attr.selectableItemBackground));
|
||||||
} else {
|
} else {
|
||||||
iv.setImageDrawable(ctx.getIconsCache().getThemedIcon(mode.getSmallIconDark()));
|
iv.setImageDrawable(ctx.getUIUtilities().getThemedIcon(mode.getSmallIconDark()));
|
||||||
}
|
}
|
||||||
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_unchecked)));
|
iv.setContentDescription(String.format("%s %s", mode.toHumanString(ctx), ctx.getString(R.string.item_unchecked)));
|
||||||
tb.findViewById(R.id.selection).setVisibility(View.INVISIBLE);
|
tb.findViewById(R.id.selection).setVisibility(View.INVISIBLE);
|
||||||
|
@ -123,7 +123,7 @@ public class AppModeDialog {
|
||||||
int metricsY = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);
|
int metricsY = (int) ctx.getResources().getDimension(R.dimen.route_info_modes_height);
|
||||||
View tb = layoutInflater.inflate(R.layout.mode_view, null);
|
View tb = layoutInflater.inflate(R.layout.mode_view, null);
|
||||||
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
|
ImageView iv = (ImageView) tb.findViewById(R.id.app_mode_icon);
|
||||||
iv.setImageDrawable(ctx.getIconsCache().getIcon(mode.getSmallIconDark(), isNightMode(ctx, useMapTheme) ? R.color.route_info_checked_mode_icon_color_dark : R.color.route_info_checked_mode_icon_color_light));
|
iv.setImageDrawable(ctx.getUIUtilities().getIcon(mode.getSmallIconDark(), isNightMode(ctx, useMapTheme) ? R.color.route_info_checked_mode_icon_color_dark : R.color.route_info_checked_mode_icon_color_light));
|
||||||
iv.setContentDescription(mode.toHumanString(ctx));
|
iv.setContentDescription(mode.toHumanString(ctx));
|
||||||
// tb.setCompoundDrawablesWithIntrinsicBounds(null, ctx.getIconsCache().getIcon(mode.getIconId(), R.color.app_mode_icon_color), null, null);
|
// tb.setCompoundDrawablesWithIntrinsicBounds(null, ctx.getIconsCache().getIcon(mode.getIconId(), R.color.app_mode_icon_color), null, null);
|
||||||
LayoutParams lp = new LinearLayout.LayoutParams(metricsX, metricsY);
|
LayoutParams lp = new LinearLayout.LayoutParams(metricsX, metricsY);
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class SearchAddressFragment extends Fragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
OsmandApplication app = getApplication();
|
OsmandApplication app = getApplication();
|
||||||
Drawable icon = getApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark);
|
Drawable icon = getApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark);
|
||||||
((ImageView)findViewById(R.id.ResetBuilding)).setBackgroundDrawable(icon);
|
((ImageView)findViewById(R.id.ResetBuilding)).setBackgroundDrawable(icon);
|
||||||
findViewById(R.id.ResetBuilding).setOnClickListener(new View.OnClickListener(){
|
findViewById(R.id.ResetBuilding).setOnClickListener(new View.OnClickListener(){
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,22 @@
|
||||||
package net.osmand.plus.activities.search;
|
package net.osmand.plus.activities.search;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||||
|
import net.osmand.plus.base.OsmAndListFragment;
|
||||||
|
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||||
|
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -24,24 +41,6 @@ import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.TextView.BufferType;
|
import android.widget.TextView.BufferType;
|
||||||
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.IconsCache;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
|
||||||
import net.osmand.plus.base.OsmAndListFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
|
||||||
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public class SearchHistoryFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener {
|
public class SearchHistoryFragment extends OsmAndListFragment implements SearchActivityChild, OsmAndCompassListener {
|
||||||
private LatLon location;
|
private LatLon location;
|
||||||
|
@ -51,9 +50,9 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
public static final String SEARCH_LON = SearchActivity.SEARCH_LON;
|
public static final String SEARCH_LON = SearchActivity.SEARCH_LON;
|
||||||
private HistoryAdapter historyAdapter;
|
private HistoryAdapter historyAdapter;
|
||||||
private Float heading;
|
private Float heading;
|
||||||
private boolean searchAroundLocation;
|
|
||||||
private boolean compassRegistered;
|
private boolean compassRegistered;
|
||||||
private int screenOrientation;
|
private UpdateLocationViewCache updateLocationViewCache;
|
||||||
|
private double lastHeading;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
@ -125,19 +124,18 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
//Hardy: onResume() code is needed so that search origin is properly reflected in tab contents when origin has been changed on one tab, then tab is changed to another one.
|
//Hardy: onResume() code is needed so that search origin is properly reflected in tab contents when origin has been changed on one tab, then tab is changed to another one.
|
||||||
location = null;
|
location = null;
|
||||||
FragmentActivity activity = getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
|
updateLocationViewCache = getMyApplication().getUIUtilities().getUpdateLocationViewCache();
|
||||||
Intent intent = activity.getIntent();
|
Intent intent = activity.getIntent();
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
|
double lat = intent.getDoubleExtra(SEARCH_LAT, 0);
|
||||||
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
|
double lon = intent.getDoubleExtra(SEARCH_LON, 0);
|
||||||
if (lat != 0 || lon != 0) {
|
if (lat != 0 || lon != 0) {
|
||||||
historyAdapter.location = new LatLon(lat, lon);
|
updateLocationViewCache.specialFrom = new LatLon(lat, lon);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (location == null && activity instanceof SearchActivity) {
|
if (activity instanceof SearchActivity && ((SearchActivity) activity).getSearchPoint() != null) {
|
||||||
location = ((SearchActivity) activity).getSearchPoint();
|
updateLocationViewCache.specialFrom = ((SearchActivity) activity).getSearchPoint();
|
||||||
}
|
|
||||||
if (location == null) {
|
|
||||||
location = ((OsmandApplication) activity.getApplication()).getSettings().getLastKnownMapLocation();
|
|
||||||
}
|
}
|
||||||
historyAdapter.clear();
|
historyAdapter.clear();
|
||||||
for (HistoryEntry entry : helper.getHistoryEntries()) {
|
for (HistoryEntry entry : helper.getHistoryEntries()) {
|
||||||
|
@ -145,12 +143,11 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
}
|
}
|
||||||
locationUpdate(location);
|
locationUpdate(location);
|
||||||
clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);
|
clearButton.setVisibility(historyAdapter.isEmpty() ? View.GONE : View.VISIBLE);
|
||||||
screenOrientation = DashLocationFragment.getScreenOrientation(getActivity());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void locationUpdate(LatLon l) {
|
public void locationUpdate(LatLon l) {
|
||||||
//location = l;
|
|
||||||
if (getActivity() instanceof SearchActivity) {
|
if (getActivity() instanceof SearchActivity) {
|
||||||
if (((SearchActivity) getActivity()).isSearchAroundCurrentLocation() && l != null) {
|
if (((SearchActivity) getActivity()).isSearchAroundCurrentLocation() && l != null) {
|
||||||
if (!compassRegistered) {
|
if (!compassRegistered) {
|
||||||
|
@ -159,13 +156,13 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
app.getLocationProvider().addCompassListener(this);
|
app.getLocationProvider().addCompassListener(this);
|
||||||
compassRegistered = true;
|
compassRegistered = true;
|
||||||
}
|
}
|
||||||
searchAroundLocation = true;
|
updateLocationViewCache.specialFrom = null;
|
||||||
} else {
|
} else {
|
||||||
searchAroundLocation = false;
|
updateLocationViewCache.specialFrom = ((SearchActivity) getActivity()).getSearchPoint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (historyAdapter != null) {
|
if (historyAdapter != null) {
|
||||||
historyAdapter.updateLocation(l);
|
historyAdapter.updateLocation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +202,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
||||||
MenuItem item = optionsMenu.getMenu().add(
|
MenuItem item = optionsMenu.getMenu().add(
|
||||||
R.string.shared_string_remove).setIcon(
|
R.string.shared_string_remove).setIcon(
|
||||||
getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_delete_dark));
|
getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_delete_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
@ -218,11 +215,9 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
}
|
}
|
||||||
|
|
||||||
class HistoryAdapter extends ArrayAdapter<HistoryEntry> {
|
class HistoryAdapter extends ArrayAdapter<HistoryEntry> {
|
||||||
private LatLon location;
|
|
||||||
|
|
||||||
|
|
||||||
public void updateLocation(LatLon l) {
|
public void updateLocation() {
|
||||||
location = l;
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,10 +236,11 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
udpateHistoryItem(historyEntry, row, location, getActivity(), getMyApplication());
|
udpateHistoryItem(historyEntry, row, location, getActivity(), getMyApplication());
|
||||||
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
||||||
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
||||||
DashLocationFragment.updateLocationView(!searchAroundLocation, location, heading, direction, distanceText,
|
getMyApplication().getUIUtilities().updateLocationView(updateLocationViewCache,
|
||||||
historyEntry.getLat(), historyEntry.getLon(), screenOrientation, getMyApplication());
|
direction, distanceText, historyEntry.getLat(),
|
||||||
|
historyEntry.getLon());
|
||||||
ImageButton options = (ImageButton) row.findViewById(R.id.options);
|
ImageButton options = (ImageButton) row.findViewById(R.id.options);
|
||||||
options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
options.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
options.setVisibility(View.VISIBLE);
|
options.setVisibility(View.VISIBLE);
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -264,7 +260,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
TextView nameText = (TextView) row.findViewById(R.id.name);
|
TextView nameText = (TextView) row.findViewById(R.id.name);
|
||||||
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
TextView distanceText = (TextView) row.findViewById(R.id.distance);
|
||||||
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
ImageView direction = (ImageView) row.findViewById(R.id.direction);
|
||||||
IconsCache ic = app.getIconsCache();
|
UiUtilities ic = app.getUIUtilities();
|
||||||
direction.setImageDrawable(ic.getIcon(R.drawable.ic_direction_arrow, R.color.color_distance));
|
direction.setImageDrawable(ic.getIcon(R.drawable.ic_direction_arrow, R.color.color_distance));
|
||||||
String distance = "";
|
String distance = "";
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
|
@ -326,12 +322,9 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
// 99 in next line used to one-time initalize arrows (with reference vs. fixed-north direction) on non-compass
|
|
||||||
// devices
|
|
||||||
FragmentActivity activity = getActivity();
|
FragmentActivity activity = getActivity();
|
||||||
float lastHeading = heading != null ? heading : 99;
|
if (Math.abs(MapUtils.degreesDiff(lastHeading, value)) > 5) {
|
||||||
heading = value;
|
lastHeading = value;
|
||||||
if (heading != null && Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
|
||||||
if (activity instanceof SearchActivity) {
|
if (activity instanceof SearchActivity) {
|
||||||
((SearchActivity)activity).getAccessibilityAssistant().lockEvents();
|
((SearchActivity)activity).getAccessibilityAssistant().lockEvents();
|
||||||
historyAdapter.notifyDataSetChanged();
|
historyAdapter.notifyDataSetChanged();
|
||||||
|
@ -339,8 +332,6 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
||||||
} else {
|
} else {
|
||||||
historyAdapter.notifyDataSetChanged();
|
historyAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
heading = lastHeading;
|
|
||||||
}
|
}
|
||||||
if (activity instanceof SearchActivity) {
|
if (activity instanceof SearchActivity) {
|
||||||
final View selected = ((SearchActivity)activity).getAccessibilityAssistant().getFocusedView();
|
final View selected = ((SearchActivity)activity).getAccessibilityAssistant().getFocusedView();
|
||||||
|
|
|
@ -3,6 +3,46 @@
|
||||||
*/
|
*/
|
||||||
package net.osmand.plus.activities.search;
|
package net.osmand.plus.activities.search;
|
||||||
|
|
||||||
|
import gnu.trove.set.hash.TLongHashSet;
|
||||||
|
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.ResultMatcher;
|
||||||
|
import net.osmand.access.AccessibilityAssistant;
|
||||||
|
import net.osmand.access.NavigationInfo;
|
||||||
|
import net.osmand.data.Amenity;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.osm.PoiType;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.R.color;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.activities.EditPOIFilterActivity;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.activities.OsmandListActivity;
|
||||||
|
import net.osmand.plus.poi.NominatimPoiFilter;
|
||||||
|
import net.osmand.plus.poi.PoiUIFilter;
|
||||||
|
import net.osmand.plus.poi.PoiUIFilter.AmenityNameFilter;
|
||||||
|
import net.osmand.plus.render.RenderingIcons;
|
||||||
|
import net.osmand.plus.views.DirectionDrawable;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
|
import net.osmand.util.MapUtils;
|
||||||
|
import net.osmand.util.OpeningHoursParser;
|
||||||
|
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -36,47 +76,6 @@ import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.ResultMatcher;
|
|
||||||
import net.osmand.access.AccessibilityAssistant;
|
|
||||||
import net.osmand.access.NavigationInfo;
|
|
||||||
import net.osmand.data.Amenity;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.osm.PoiType;
|
|
||||||
import net.osmand.plus.IconsCache;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.R.color;
|
|
||||||
import net.osmand.plus.activities.EditPOIFilterActivity;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.activities.OsmandListActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.plus.poi.NominatimPoiFilter;
|
|
||||||
import net.osmand.plus.poi.PoiUIFilter;
|
|
||||||
import net.osmand.plus.poi.PoiUIFilter.AmenityNameFilter;
|
|
||||||
import net.osmand.plus.render.RenderingIcons;
|
|
||||||
import net.osmand.plus.views.DirectionDrawable;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
import net.osmand.util.OpeningHoursParser;
|
|
||||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
import gnu.trove.set.hash.TLongHashSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search poi activity
|
* Search poi activity
|
||||||
*/
|
*/
|
||||||
|
@ -133,7 +132,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
});
|
});
|
||||||
showFilterItem = menu.add(0, FILTER, 0, R.string.search_poi_filter);
|
showFilterItem = menu.add(0, FILTER, 0, R.string.search_poi_filter);
|
||||||
MenuItemCompat.setShowAsAction(showFilterItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
MenuItemCompat.setShowAsAction(showFilterItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
showFilterItem = showFilterItem.setIcon(getMyApplication().getIconsCache().getIcon(
|
showFilterItem = showFilterItem.setIcon(getMyApplication().getUIUtilities().getIcon(
|
||||||
R.drawable.ic_action_filter_dark));
|
R.drawable.ic_action_filter_dark));
|
||||||
showFilterItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
showFilterItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -156,7 +155,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
showOnMapItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
|
showOnMapItem = menu.add(0, SHOW_ON_MAP, 0, R.string.shared_string_show_on_map);
|
||||||
MenuItemCompat.setShowAsAction(showOnMapItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
MenuItemCompat.setShowAsAction(showOnMapItem, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||||
showOnMapItem = showOnMapItem.setIcon(getMyApplication().getIconsCache().getIcon(
|
showOnMapItem = showOnMapItem.setIcon(getMyApplication().getUIUtilities().getIcon(
|
||||||
R.drawable.ic_show_on_map));
|
R.drawable.ic_show_on_map));
|
||||||
showOnMapItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
showOnMapItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -264,9 +263,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
});
|
});
|
||||||
searchFilter.setHint(R.string.filter_poi_hint);
|
searchFilter.setHint(R.string.filter_poi_hint);
|
||||||
((ImageView) findViewById(R.id.search_icon)).setImageDrawable(
|
((ImageView) findViewById(R.id.search_icon)).setImageDrawable(
|
||||||
getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_filter_dark));
|
getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_filter_dark));
|
||||||
((ImageView) findViewById(R.id.options)).
|
((ImageView) findViewById(R.id.options)).
|
||||||
setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
findViewById(R.id.options).setOnClickListener(new View.OnClickListener() {
|
findViewById(R.id.options).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -346,7 +345,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
private void showOptionsMenu(View v) {
|
private void showOptionsMenu(View v) {
|
||||||
// Show menu with search all, name finder, name finder poi
|
// Show menu with search all, name finder, name finder poi
|
||||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMyApplication().getUIUtilities();
|
||||||
final PopupMenu optionsMenu = new PopupMenu(this, v);
|
final PopupMenu optionsMenu = new PopupMenu(this, v);
|
||||||
|
|
||||||
final PoiUIFilter f = this.filter;
|
final PoiUIFilter f = this.filter;
|
||||||
|
@ -380,7 +379,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addFilter(PopupMenu optionsMenu, final String value) {
|
private void addFilter(PopupMenu optionsMenu, final String value) {
|
||||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMyApplication().getUIUtilities();
|
||||||
MenuItem item = optionsMenu.getMenu().add(getString(R.string.search_poi_filter) + ": " + value)
|
MenuItem item = optionsMenu.getMenu().add(getString(R.string.search_poi_filter) + ": " + value)
|
||||||
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark));
|
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_filter_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
|
@ -557,7 +556,8 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
try {
|
try {
|
||||||
int position = getListView().getPositionForView(selected);
|
int position = getListView().getPositionForView(selected);
|
||||||
if ((position != AdapterView.INVALID_POSITION) && (position >= getListView().getHeaderViewsCount())) {
|
if ((position != AdapterView.INVALID_POSITION) && (position >= getListView().getHeaderViewsCount())) {
|
||||||
navigationInfo.updateTargetDirection(amenityAdapter.getItem(position - getListView().getHeaderViewsCount()).getLocation(), heading.floatValue());
|
navigationInfo.updateTargetDirection(amenityAdapter.getItem(position - getListView().getHeaderViewsCount()).
|
||||||
|
getLocation(), heading.floatValue());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return;
|
return;
|
||||||
|
@ -717,10 +717,11 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
class AmenityAdapter extends ArrayAdapter<Amenity> {
|
class AmenityAdapter extends ArrayAdapter<Amenity> {
|
||||||
private AmenityFilter listFilter;
|
private AmenityFilter listFilter;
|
||||||
private List<Amenity> originalAmenityList;
|
private List<Amenity> originalAmenityList;
|
||||||
private int screenOrientation;
|
private UpdateLocationViewCache updateLocationViewCache;
|
||||||
|
|
||||||
AmenityAdapter(List<Amenity> list) {
|
AmenityAdapter(List<Amenity> list) {
|
||||||
super(SearchPOIActivity.this, R.layout.searchpoi_list, list);
|
super(SearchPOIActivity.this, R.layout.searchpoi_list, list);
|
||||||
|
updateLocationViewCache = getMyApplication().getUIUtilities().getUpdateLocationViewCache();
|
||||||
originalAmenityList = new ArrayList<Amenity>(list);
|
originalAmenityList = new ArrayList<Amenity>(list);
|
||||||
this.setNotifyOnChange(false);
|
this.setNotifyOnChange(false);
|
||||||
}
|
}
|
||||||
|
@ -731,7 +732,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
public void setNewModel(List<Amenity> amenityList) {
|
public void setNewModel(List<Amenity> amenityList) {
|
||||||
setNotifyOnChange(false);
|
setNotifyOnChange(false);
|
||||||
screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this);
|
updateLocationViewCache = getMyApplication().getUIUtilities().getUpdateLocationViewCache();
|
||||||
originalAmenityList = new ArrayList<Amenity>(amenityList);
|
originalAmenityList = new ArrayList<Amenity>(amenityList);
|
||||||
clear();
|
clear();
|
||||||
for (Amenity obj : amenityList) {
|
for (Amenity obj : amenityList) {
|
||||||
|
@ -768,7 +769,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
|
|
||||||
timeIcon.setVisibility(View.VISIBLE);
|
timeIcon.setVisibility(View.VISIBLE);
|
||||||
timeText.setVisibility(View.VISIBLE);
|
timeText.setVisibility(View.VISIBLE);
|
||||||
timeIcon.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_small_time, colorId));
|
timeIcon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_small_time, colorId));
|
||||||
timeText.setTextColor(app.getResources().getColor(colorId));
|
timeText.setTextColor(app.getResources().getColor(colorId));
|
||||||
String rt = rs.getCurrentRuleTime(inst);
|
String rt = rs.getCurrentRuleTime(inst);
|
||||||
timeText.setText(rt == null ? "" : rt);
|
timeText.setText(rt == null ? "" : rt);
|
||||||
|
@ -790,19 +791,12 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
direction.setImageDrawable(draw);
|
direction.setImageDrawable(draw);
|
||||||
}
|
}
|
||||||
net.osmand.Location loc = location;
|
net.osmand.Location loc = location;
|
||||||
if (loc != null) {
|
if(searchNearBy) {
|
||||||
mes = new float[2];
|
updateLocationViewCache.specialFrom = null;
|
||||||
LatLon l = amenity.getLocation();
|
} else if(loc != null) {
|
||||||
net.osmand.Location.distanceBetween(l.getLatitude(), l.getLongitude(), loc.getLatitude(),
|
updateLocationViewCache.specialFrom = new LatLon(loc.getLatitude(), loc.getLongitude());
|
||||||
loc.getLongitude(), mes);
|
|
||||||
}
|
}
|
||||||
if (loc != null) {
|
getMyApplication().getUIUtilities().updateLocationView(updateLocationViewCache, direction, distanceText, amenity.getLocation());
|
||||||
float a = heading != null ? heading : 0;
|
|
||||||
draw.setAngle(mes[1] - a + 180 + screenOrientation);
|
|
||||||
} else {
|
|
||||||
draw.setAngle(0);
|
|
||||||
}
|
|
||||||
draw.setColorId(searchNearBy ? color.color_myloc_distance : color.color_distance);
|
|
||||||
direction.setImageDrawable(draw);
|
direction.setImageDrawable(draw);
|
||||||
PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
|
PoiType st = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
|
||||||
if (st != null) {
|
if (st != null) {
|
||||||
|
@ -817,15 +811,10 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
||||||
icon.setImageDrawable(null);
|
icon.setImageDrawable(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
String distance = " ";
|
|
||||||
if (mes != null) {
|
|
||||||
distance = " " + OsmAndFormatter.getFormattedDistance((int) mes[0], getMyApplication()) + " "; //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
String poiType = OsmAndFormatter.getPoiStringWithoutType(amenity,
|
String poiType = OsmAndFormatter.getPoiStringWithoutType(amenity,
|
||||||
app.getSettings().MAP_PREFERRED_LOCALE.get(),
|
app.getSettings().MAP_PREFERRED_LOCALE.get(),
|
||||||
app.getSettings().MAP_TRANSLITERATE_NAMES.get());
|
app.getSettings().MAP_TRANSLITERATE_NAMES.get());
|
||||||
label.setText(poiType);
|
label.setText(poiType);
|
||||||
distanceText.setText(distance);
|
|
||||||
ViewCompat.setAccessibilityDelegate(row, accessibilityAssistant);
|
ViewCompat.setAccessibilityDelegate(row, accessibilityAssistant);
|
||||||
return (row);
|
return (row);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import net.osmand.CollatorStringMatcher.StringMatcherMode;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.osm.AbstractPoiType;
|
import net.osmand.osm.AbstractPoiType;
|
||||||
import net.osmand.osm.PoiType;
|
import net.osmand.osm.PoiType;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
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;
|
||||||
|
@ -67,7 +67,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc
|
||||||
v.findViewById(R.id.SearchFilterLayout).setVisibility(View.VISIBLE);
|
v.findViewById(R.id.SearchFilterLayout).setVisibility(View.VISIBLE);
|
||||||
((EditText) v.findViewById(R.id.searchEditText)).setHint(R.string.search_poi_category_hint);
|
((EditText) v.findViewById(R.id.searchEditText)).setHint(R.string.search_poi_category_hint);
|
||||||
((ImageView) v.findViewById(R.id.search_icon)).setImageDrawable(
|
((ImageView) v.findViewById(R.id.search_icon)).setImageDrawable(
|
||||||
getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_search_dark));
|
getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_search_dark));
|
||||||
|
|
||||||
setupSearchEditText((EditText) v.findViewById(R.id.searchEditText));
|
setupSearchEditText((EditText) v.findViewById(R.id.searchEditText));
|
||||||
setupOptions((ImageView) v.findViewById(R.id.options));
|
setupOptions((ImageView) v.findViewById(R.id.options));
|
||||||
|
@ -76,7 +76,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupOptions(ImageView options) {
|
private void setupOptions(ImageView options) {
|
||||||
options.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
options.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -326,7 +326,7 @@ public class SearchPoiFilterFragment extends OsmAndListFragment implements Searc
|
||||||
|
|
||||||
private void showOptionsMenu(View v) {
|
private void showOptionsMenu(View v) {
|
||||||
// Show menu with search all, name finder, name finder poi
|
// Show menu with search all, name finder, name finder poi
|
||||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMyApplication().getUIUtilities();
|
||||||
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
||||||
|
|
||||||
MenuItem item = optionsMenu.getMenu().add(R.string.poi_filter_custom_filter)
|
MenuItem item = optionsMenu.getMenu().add(R.string.poi_filter_custom_filter)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.audionotes.AudioVideoNotesPlugin.AVActionType;
|
import net.osmand.plus.audionotes.AudioVideoNotesPlugin.AVActionType;
|
||||||
|
@ -124,7 +124,7 @@ public class AudioVideoNoteRecordingMenu {
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
CurrentRecording recording = plugin.getCurrentRecording();
|
CurrentRecording recording = plugin.getCurrentRecording();
|
||||||
IconsCache iconsCache = plugin.getMapActivity().getMyApplication().getIconsCache();
|
UiUtilities iconsCache = plugin.getMapActivity().getMyApplication().getUIUtilities();
|
||||||
|
|
||||||
ImageView leftButtonIcon = (ImageView) view.findViewById(R.id.leftButtonIcon);
|
ImageView leftButtonIcon = (ImageView) view.findViewById(R.id.leftButtonIcon);
|
||||||
View leftButtonView = view.findViewById(R.id.leftButtonView);
|
View leftButtonView = view.findViewById(R.id.leftButtonView);
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
|
||||||
View view = inflater.inflate(R.layout.note, null, false);
|
View view = inflater.inflate(R.layout.note, null, false);
|
||||||
|
|
||||||
getNoteView(recording, view, getMyApplication());
|
getNoteView(recording, view, getMyApplication());
|
||||||
((ImageView) view.findViewById(R.id.play)).setImageDrawable(getMyApplication().getIconsCache()
|
((ImageView) view.findViewById(R.id.play)).setImageDrawable(getMyApplication().getUIUtilities()
|
||||||
.getThemedIcon(R.drawable.ic_play_dark));
|
.getThemedIcon(R.drawable.ic_play_dark));
|
||||||
view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() {
|
view.findViewById(R.id.play).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -146,11 +146,11 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment {
|
||||||
Drawable iconDrawable;
|
Drawable iconDrawable;
|
||||||
|
|
||||||
if (recording.isAudio()) {
|
if (recording.isAudio()) {
|
||||||
iconDrawable = ctx.getIconsCache().getIcon(R.drawable.ic_type_audio, R.color.color_distance);
|
iconDrawable = ctx.getUIUtilities().getIcon(R.drawable.ic_type_audio, R.color.color_distance);
|
||||||
} else if (recording.isVideo()) {
|
} else if (recording.isVideo()) {
|
||||||
iconDrawable = ctx.getIconsCache().getIcon(R.drawable.ic_type_video, R.color.color_distance);
|
iconDrawable = ctx.getUIUtilities().getIcon(R.drawable.ic_type_video, R.color.color_distance);
|
||||||
} else {
|
} else {
|
||||||
iconDrawable = ctx.getIconsCache().getIcon(R.drawable.ic_type_img, R.color.color_distance);
|
iconDrawable = ctx.getUIUtilities().getIcon(R.drawable.ic_type_img, R.color.color_distance);
|
||||||
}
|
}
|
||||||
icon.setImageDrawable(iconDrawable);
|
icon.setImageDrawable(iconDrawable);
|
||||||
return iconDrawable;
|
return iconDrawable;
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class NotesAdapter extends ArrayAdapter<Object> {
|
||||||
int iconRes = recording.isAudio() ? R.drawable.ic_type_audio
|
int iconRes = recording.isAudio() ? R.drawable.ic_type_audio
|
||||||
: (recording.isVideo() ? R.drawable.ic_type_video : R.drawable.ic_type_img);
|
: (recording.isVideo() ? R.drawable.ic_type_video : R.drawable.ic_type_img);
|
||||||
int colorRes = app.getSettings().isLightContent() ? R.color.icon_color : R.color.ctx_menu_info_text_dark;
|
int colorRes = app.getSettings().isLightContent() ? R.color.icon_color : R.color.ctx_menu_info_text_dark;
|
||||||
holder.icon.setImageDrawable(app.getIconsCache().getIcon(iconRes, colorRes));
|
holder.icon.setImageDrawable(app.getUIUtilities().getIcon(iconRes, colorRes));
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.bottomDivider.setVisibility(hideBottomDivider(position) ? View.GONE : View.VISIBLE);
|
holder.bottomDivider.setVisibility(hideBottomDivider(position) ? View.GONE : View.VISIBLE);
|
||||||
|
@ -230,7 +230,7 @@ public class NotesAdapter extends ArrayAdapter<Object> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
holder.options.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
holder.options.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
holder.options.setOnClickListener(new View.OnClickListener() {
|
holder.options.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -10,14 +10,14 @@ import android.support.v7.app.AppCompatActivity;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
|
||||||
public class BaseOsmAndDialogFragment extends DialogFragment {
|
public class BaseOsmAndDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
private IconsCache iconsCache;
|
private UiUtilities iconsCache;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -35,9 +35,9 @@ public class BaseOsmAndDialogFragment extends DialogFragment {
|
||||||
return (AppCompatActivity) getActivity();
|
return (AppCompatActivity) getActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IconsCache getIconsCache() {
|
protected UiUtilities getIconsCache() {
|
||||||
if (iconsCache == null) {
|
if (iconsCache == null) {
|
||||||
iconsCache = getMyApplication().getIconsCache();
|
iconsCache = getMyApplication().getUIUtilities();
|
||||||
}
|
}
|
||||||
return iconsCache;
|
return iconsCache;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import android.view.ViewTreeObserver;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
@ -26,7 +26,7 @@ import net.osmand.plus.activities.OsmandActionBarActivity;
|
||||||
import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
|
import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
|
||||||
|
|
||||||
public class BaseOsmAndFragment extends Fragment implements TransitionAnimator {
|
public class BaseOsmAndFragment extends Fragment implements TransitionAnimator {
|
||||||
private IconsCache iconsCache;
|
private UiUtilities iconsCache;
|
||||||
|
|
||||||
private int statusBarColor = -1;
|
private int statusBarColor = -1;
|
||||||
private boolean transitionAnimationAllowed = true;
|
private boolean transitionAnimationAllowed = true;
|
||||||
|
@ -165,26 +165,26 @@ public class BaseOsmAndFragment extends Fragment implements TransitionAnimator {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
protected IconsCache getIconsCache() {
|
protected UiUtilities getIconsCache() {
|
||||||
OsmandApplication app = getMyApplication();
|
OsmandApplication app = getMyApplication();
|
||||||
if (iconsCache == null && app != null) {
|
if (iconsCache == null && app != null) {
|
||||||
iconsCache = app.getIconsCache();
|
iconsCache = app.getUIUtilities();
|
||||||
}
|
}
|
||||||
return iconsCache;
|
return iconsCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color) {
|
protected Drawable getPaintedContentIcon(@DrawableRes int id, @ColorInt int color) {
|
||||||
IconsCache cache = getIconsCache();
|
UiUtilities cache = getIconsCache();
|
||||||
return cache != null ? cache.getPaintedIcon(id, color) : null;
|
return cache != null ? cache.getPaintedIcon(id, color) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Drawable getIcon(@DrawableRes int id, @ColorRes int colorId) {
|
protected Drawable getIcon(@DrawableRes int id, @ColorRes int colorId) {
|
||||||
IconsCache cache = getIconsCache();
|
UiUtilities cache = getIconsCache();
|
||||||
return cache != null ? cache.getIcon(id, colorId) : null;
|
return cache != null ? cache.getIcon(id, colorId) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Drawable getContentIcon(@DrawableRes int id) {
|
protected Drawable getContentIcon(@DrawableRes int id) {
|
||||||
IconsCache cache = getIconsCache();
|
UiUtilities cache = getIconsCache();
|
||||||
return cache != null ? cache.getThemedIcon(id) : null;
|
return cache != null ? cache.getThemedIcon(id) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
|
||||||
protected Drawable getIcon(@DrawableRes int drawableRes, @ColorRes int color) {
|
protected Drawable getIcon(@DrawableRes int drawableRes, @ColorRes int color) {
|
||||||
OsmandApplication app = getMyApplication();
|
OsmandApplication app = getMyApplication();
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
return app.getIconsCache().getIcon(drawableRes, color);
|
return app.getUIUtilities().getIcon(drawableRes, color);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ public abstract class BottomSheetDialogFragment extends DialogFragment {
|
||||||
protected Drawable getContentIcon(@DrawableRes int drawableRes) {
|
protected Drawable getContentIcon(@DrawableRes int drawableRes) {
|
||||||
OsmandApplication app = getMyApplication();
|
OsmandApplication app = getMyApplication();
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
return app.getIconsCache().getThemedIcon(drawableRes);
|
return app.getUIUtilities().getThemedIcon(drawableRes);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -440,6 +440,20 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
||||||
mapView.refreshMap();
|
mapView.refreshMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LatLon getMapLocation() {
|
||||||
|
if (mapView == null) {
|
||||||
|
return settings.getLastKnownMapLocation();
|
||||||
|
}
|
||||||
|
return new LatLon(mapView.getLatitude(), mapView.getLongitude());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Float getMapRotate() {
|
||||||
|
if (mapView == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return mapView.getRotate();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) {
|
public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class DashErrorFragment extends DashBaseFragment {
|
||||||
String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH);
|
String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH);
|
||||||
Typeface typeface = FontCache.getRobotoMedium(getActivity());
|
Typeface typeface = FontCache.getRobotoMedium(getActivity());
|
||||||
ImageView iv = ((ImageView) view.findViewById(R.id.error_icon));
|
ImageView iv = ((ImageView) view.findViewById(R.id.error_icon));
|
||||||
iv.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_crashlog));
|
iv.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_crashlog));
|
||||||
TextView message = ((TextView) view.findViewById(R.id.error_header));
|
TextView message = ((TextView) view.findViewById(R.id.error_header));
|
||||||
message.setTypeface(typeface);
|
message.setTypeface(typeface);
|
||||||
message.setText(msg);
|
message.setText(msg);
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class DashFavoritesFragment extends DashLocationFragment {
|
||||||
ImageView groupImage = (ImageView)view.findViewById(R.id.group_image);
|
ImageView groupImage = (ImageView)view.findViewById(R.id.group_image);
|
||||||
if (point.getCategory().length() > 0) {
|
if (point.getCategory().length() > 0) {
|
||||||
((TextView) view.findViewById(R.id.group_name)).setText(point.getCategory());
|
((TextView) view.findViewById(R.id.group_name)).setText(point.getCategory());
|
||||||
groupImage.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_small_group));
|
groupImage.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_small_group));
|
||||||
} else {
|
} else {
|
||||||
groupImage.setVisibility(View.GONE);
|
groupImage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class DashFavoritesFragment extends DashLocationFragment {
|
||||||
name.setTypeface(Typeface.DEFAULT, point.isVisible() ? Typeface.NORMAL : Typeface.ITALIC);
|
name.setTypeface(Typeface.DEFAULT, point.isVisible() ? Typeface.NORMAL : Typeface.ITALIC);
|
||||||
view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE);
|
view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
||||||
view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() {
|
view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
|
@ -1,24 +1,15 @@
|
||||||
package net.osmand.plus.dashboard;
|
package net.osmand.plus.dashboard;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.hardware.Sensor;
|
|
||||||
import android.hardware.SensorManager;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.views.DirectionDrawable;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Denis
|
* Created by Denis
|
||||||
* on 26.01.2015.
|
* on 26.01.2015.
|
||||||
|
@ -26,12 +17,7 @@ import java.util.List;
|
||||||
@SuppressLint("ResourceAsColor")
|
@SuppressLint("ResourceAsColor")
|
||||||
public abstract class DashLocationFragment extends DashBaseFragment {
|
public abstract class DashLocationFragment extends DashBaseFragment {
|
||||||
|
|
||||||
private static final int ORIENTATION_0 = 0;
|
|
||||||
private static final int ORIENTATION_90 = 3;
|
|
||||||
private static final int ORIENTATION_270 = 1;
|
|
||||||
private static final int ORIENTATION_180 = 2;
|
|
||||||
protected List<DashLocationView> distances = new ArrayList<DashLocationFragment.DashLocationView>();
|
protected List<DashLocationView> distances = new ArrayList<DashLocationFragment.DashLocationView>();
|
||||||
private int screenOrientation;
|
|
||||||
|
|
||||||
public static class DashLocationView {
|
public static class DashLocationView {
|
||||||
public ImageView arrow;
|
public ImageView arrow;
|
||||||
|
@ -46,40 +32,14 @@ public abstract class DashLocationFragment extends DashBaseFragment {
|
||||||
this.txt = txt;
|
this.txt = txt;
|
||||||
this.loc = loc;
|
this.loc = loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onOpenDash() {
|
public void onOpenDash() {
|
||||||
//Hardy: getRotation() is the correction if device's screen orientation != the default display's standard orientation
|
//Hardy: getRotation() is the correction if device's screen orientation != the default display's standard orientation
|
||||||
screenOrientation = getScreenOrientation(getActivity());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getScreenOrientation(Activity a) {
|
|
||||||
int screenOrientation = ((WindowManager) a.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation();
|
|
||||||
switch (screenOrientation) {
|
|
||||||
case ORIENTATION_0: // Device default (normally portrait)
|
|
||||||
screenOrientation = 0;
|
|
||||||
break;
|
|
||||||
case ORIENTATION_90: // Landscape right
|
|
||||||
screenOrientation = 90;
|
|
||||||
break;
|
|
||||||
case ORIENTATION_270: // Landscape left
|
|
||||||
screenOrientation = 270;
|
|
||||||
break;
|
|
||||||
case ORIENTATION_180: // Upside down
|
|
||||||
screenOrientation = 180;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//Looks like screenOrientation correction must not be applied for devices without compass?
|
|
||||||
Sensor compass = ((SensorManager) a.getSystemService(Context.SENSOR_SERVICE)).getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
|
|
||||||
if (compass == null) {
|
|
||||||
screenOrientation = 0;
|
|
||||||
}
|
|
||||||
return screenOrientation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LatLon getDefaultLocation() {
|
public LatLon getDefaultLocation() {
|
||||||
DashboardOnMap d = dashboard;
|
DashboardOnMap d = dashboard;
|
||||||
|
@ -94,114 +54,16 @@ public abstract class DashLocationFragment extends DashBaseFragment {
|
||||||
if (d == null) {
|
if (d == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float head = d.getHeading();
|
UiUtilities ic = getMyApplication().getUIUtilities();
|
||||||
float mapRotation = d.getMapRotation();
|
UpdateLocationViewCache cache = ic.getUpdateLocationViewCache();
|
||||||
LatLon mw = d.getMapViewLocation();
|
|
||||||
boolean useCenter = !d.isMapLinkedToLocation();
|
|
||||||
float h = useCenter ? -mapRotation : head;
|
|
||||||
for (DashLocationView lv : distances) {
|
for (DashLocationView lv : distances) {
|
||||||
updateLocationView(useCenter, mw, h, lv.arrow, lv.arrowResId, lv.txt, lv.loc, screenOrientation,
|
cache.arrowResId = lv.arrowResId;
|
||||||
getMyApplication(), lv.paint);
|
cache.paintTxt = lv.paint;
|
||||||
|
ic.updateLocationView(cache, lv.arrow, lv.txt, lv.loc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updateLocationView(boolean useCenter, LatLon fromLoc, Float h,
|
public void updateLocation(boolean centerChanged, boolean locationChanged, boolean compassChanged) {
|
||||||
ImageView arrow, int imgColor, TextView txt, int textColor, double toLat, double toLon,
|
|
||||||
int screenOrientation, OsmandApplication app, Context ctx) {
|
|
||||||
updateLocationView(useCenter, fromLoc, h, arrow, 0, imgColor, txt, textColor, new LatLon(toLat, toLon), screenOrientation, app, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void updateLocationView(boolean useCenter, LatLon fromLoc, Float h,
|
|
||||||
ImageView arrow, TextView txt, double toLat, double toLon,
|
|
||||||
int screenOrientation, OsmandApplication app) {
|
|
||||||
updateLocationView(useCenter, fromLoc, h, arrow, 0, txt, new LatLon(toLat, toLon), screenOrientation, app, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void updateLocationView(boolean useCenter, LatLon fromLoc, Float h,
|
|
||||||
ImageView arrow, int arrowResId, TextView txt, LatLon toLoc,
|
|
||||||
int screenOrientation, OsmandApplication app, boolean paint) {
|
|
||||||
updateLocationView(useCenter, fromLoc, h, arrow, arrowResId, 0, txt, 0, toLoc, screenOrientation, app, paint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void updateLocationView(boolean useCenter, LatLon fromLoc, Float h,
|
|
||||||
ImageView arrow, int arrowResId, int imgColor, TextView txt, LatLon toLoc,
|
|
||||||
int screenOrientation, OsmandApplication app, boolean paint) {
|
|
||||||
updateLocationView(useCenter, fromLoc, h, arrow, arrowResId, imgColor, txt, 0, toLoc, screenOrientation, app, paint);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void updateLocationView(boolean useCenter, LatLon fromLoc, Float h,
|
|
||||||
ImageView arrow, int arrowResId, int imgColor, TextView txt, int textColor, LatLon toLoc,
|
|
||||||
int screenOrientation, OsmandApplication app, boolean paint) {
|
|
||||||
float[] mes = new float[2];
|
|
||||||
boolean stale = false;
|
|
||||||
if(!useCenter) {
|
|
||||||
Location loc = app.getLocationProvider().getLastKnownLocation();
|
|
||||||
if(loc == null) {
|
|
||||||
loc = app.getLocationProvider().getLastStaleKnownLocation();
|
|
||||||
stale = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(loc != null) {
|
|
||||||
fromLoc = new LatLon(loc.getLatitude(), loc.getLongitude());
|
|
||||||
} else {
|
|
||||||
fromLoc = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (fromLoc != null && toLoc != null) {
|
|
||||||
Location.distanceBetween(toLoc.getLatitude(), toLoc.getLongitude(), fromLoc.getLatitude(), fromLoc.getLongitude(), mes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (arrow != null) {
|
|
||||||
boolean newImage = false;
|
|
||||||
if (arrowResId == 0) {
|
|
||||||
arrowResId = R.drawable.ic_direction_arrow;
|
|
||||||
}
|
|
||||||
DirectionDrawable dd;
|
|
||||||
if(!(arrow.getDrawable() instanceof DirectionDrawable)) {
|
|
||||||
newImage = true;
|
|
||||||
dd = new DirectionDrawable(app, arrow.getWidth(), arrow.getHeight());
|
|
||||||
} else {
|
|
||||||
dd = (DirectionDrawable) arrow.getDrawable();
|
|
||||||
}
|
|
||||||
int imgColorSet = imgColor;
|
|
||||||
if (imgColorSet == 0) {
|
|
||||||
imgColorSet = useCenter ? R.color.color_distance : R.color.color_myloc_distance;
|
|
||||||
if(stale) {
|
|
||||||
imgColorSet = R.color.icon_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dd.setImage(arrowResId, imgColorSet);
|
|
||||||
if (fromLoc == null || h == null || toLoc == null) {
|
|
||||||
dd.setAngle(0);
|
|
||||||
} else {
|
|
||||||
dd.setAngle(mes[1] - h + 180 + screenOrientation);
|
|
||||||
}
|
|
||||||
if (newImage) {
|
|
||||||
arrow.setImageDrawable(dd);
|
|
||||||
}
|
|
||||||
arrow.invalidate();
|
|
||||||
}
|
|
||||||
if (txt != null) {
|
|
||||||
if (fromLoc != null && toLoc != null) {
|
|
||||||
if (paint) {
|
|
||||||
int textColorSet = textColor;
|
|
||||||
if(textColorSet == 0) {
|
|
||||||
textColorSet = useCenter ? R.color.color_distance : R.color.color_myloc_distance ;
|
|
||||||
if(stale) {
|
|
||||||
textColorSet = R.color.icon_color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
txt.setTextColor(app.getResources().getColor(textColorSet));
|
|
||||||
}
|
|
||||||
txt.setText(OsmAndFormatter.getFormattedDistance(mes[0], app));
|
|
||||||
} else {
|
|
||||||
txt.setText("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateLocation(boolean centerChanged, boolean locationChanged, boolean compassChanged) {
|
|
||||||
if (compassChanged && !dashboard.isMapLinkedToLocation()) {
|
if (compassChanged && !dashboard.isMapLinkedToLocation()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,9 +72,9 @@ public class DashNavigationFragment extends DashBaseFragment {
|
||||||
ImageView cancel = (ImageView) view.findViewById(R.id.cancel);
|
ImageView cancel = (ImageView) view.findViewById(R.id.cancel);
|
||||||
ImageView play = (ImageView) view.findViewById(R.id.play);
|
ImageView play = (ImageView) view.findViewById(R.id.play);
|
||||||
name.setText(routingHelper.getGeneralRouteInformation());
|
name.setText(routingHelper.getGeneralRouteInformation());
|
||||||
icon.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_start_navigation,
|
icon.setImageDrawable(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_start_navigation,
|
||||||
R.color.color_myloc_distance));
|
R.color.color_myloc_distance));
|
||||||
cancel.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark)
|
cancel.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark)
|
||||||
);
|
);
|
||||||
cancel.setOnClickListener(new OnClickListener() {
|
cancel.setOnClickListener(new OnClickListener() {
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ public class DashNavigationFragment extends DashBaseFragment {
|
||||||
|
|
||||||
private void updatePlayButton(final RoutingHelper routingHelper, final MapActivity map, final ImageView play) {
|
private void updatePlayButton(final RoutingHelper routingHelper, final MapActivity map, final ImageView play) {
|
||||||
boolean toContinueNavigation = routingHelper.isRoutePlanningMode();
|
boolean toContinueNavigation = routingHelper.isRoutePlanningMode();
|
||||||
play.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(
|
play.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(
|
||||||
toContinueNavigation ? R.drawable.ic_play_dark : R.drawable.ic_pause)
|
toContinueNavigation ? R.drawable.ic_play_dark : R.drawable.ic_pause)
|
||||||
);
|
);
|
||||||
play.setContentDescription(getString(toContinueNavigation ? R.string.continue_navigation :
|
play.setContentDescription(getString(toContinueNavigation ? R.string.continue_navigation :
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class DashRecentsFragment extends DashLocationFragment {
|
||||||
SearchHistoryFragment.udpateHistoryItem(historyEntry, view, loc, getActivity(), getMyApplication());
|
SearchHistoryFragment.udpateHistoryItem(historyEntry, view, loc, getActivity(), getMyApplication());
|
||||||
view.findViewById(R.id.divider).setVisibility(View.VISIBLE);
|
view.findViewById(R.id.divider).setVisibility(View.VISIBLE);
|
||||||
view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE);
|
view.findViewById(R.id.navigate_to).setVisibility(View.VISIBLE);
|
||||||
((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
((ImageView) view.findViewById(R.id.navigate_to)).setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
||||||
view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() {
|
view.findViewById(R.id.navigate_to).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class DashSearchFragment extends DashBaseFragment {
|
||||||
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_search_fragment, container, false);
|
View view = getActivity().getLayoutInflater().inflate(R.layout.dash_search_fragment, container, false);
|
||||||
|
|
||||||
TextView searchFor = (TextView) view.findViewById(R.id.search_for);
|
TextView searchFor = (TextView) view.findViewById(R.id.search_for);
|
||||||
searchFor.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
searchFor.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
||||||
searchFor.setCompoundDrawablePadding(AndroidUtils.dpToPx(getActivity(), 16f));
|
searchFor.setCompoundDrawablePadding(AndroidUtils.dpToPx(getActivity(), 16f));
|
||||||
|
|
||||||
view.findViewById(R.id.search_card).setOnClickListener(new View.OnClickListener() {
|
view.findViewById(R.id.search_card).setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
id = R.drawable.list_destination;
|
id = R.drawable.list_destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
((ImageView) view.findViewById(R.id.favourite_icon)).setImageDrawable(getMyApplication().getIconsCache()
|
((ImageView) view.findViewById(R.id.favourite_icon)).setImageDrawable(getMyApplication().getUIUtilities()
|
||||||
.getIcon(id, 0));
|
.getIcon(id, 0));
|
||||||
DashLocationView dv = new DashLocationView(direction, label, new LatLon(point.getLatitude(),
|
DashLocationView dv = new DashLocationView(direction, label, new LatLon(point.getLatitude(),
|
||||||
point.getLongitude()));
|
point.getLongitude()));
|
||||||
|
@ -161,7 +161,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
options.setVisibility(View.VISIBLE);
|
options.setVisibility(View.VISIBLE);
|
||||||
final boolean optionsVisible = (SHOW_ALL && getMyApplication().getTargetPointsHelper().getIntermediatePoints().size() > 0);
|
final boolean optionsVisible = (SHOW_ALL && getMyApplication().getTargetPointsHelper().getIntermediatePoints().size() > 0);
|
||||||
|
|
||||||
options.setImageDrawable(getMyApplication().getIconsCache().
|
options.setImageDrawable(getMyApplication().getUIUtilities().
|
||||||
getThemedIcon(optionsVisible ? R.drawable.ic_overflow_menu_white :
|
getThemedIcon(optionsVisible ? R.drawable.ic_overflow_menu_white :
|
||||||
R.drawable.ic_action_remove_dark));
|
R.drawable.ic_action_remove_dark));
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -176,7 +176,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
ImageButton navigate = ((ImageButton)view.findViewById(R.id.navigate_to));
|
ImageButton navigate = ((ImageButton)view.findViewById(R.id.navigate_to));
|
||||||
navigate.setImageDrawable(getMyApplication().getIconsCache().
|
navigate.setImageDrawable(getMyApplication().getUIUtilities().
|
||||||
getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
getThemedIcon(R.drawable.ic_action_gdirections_dark));
|
||||||
navigate.setVisibility(target? View.VISIBLE : View.GONE);
|
navigate.setVisibility(target? View.VISIBLE : View.GONE);
|
||||||
navigate.setOnClickListener(new View.OnClickListener() {
|
navigate.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -241,7 +241,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
if (point.index > 0 || target) {
|
if (point.index > 0 || target) {
|
||||||
final int ind = target ? allTargets.size() - 1 : point.index;
|
final int ind = target ? allTargets.size() - 1 : point.index;
|
||||||
item = optionsMenu.getMenu().add(R.string.waypoint_visit_before)
|
item = optionsMenu.getMenu().add(R.string.waypoint_visit_before)
|
||||||
.setIcon(getMyApplication().getIconsCache().
|
.setIcon(getMyApplication().getUIUtilities().
|
||||||
getThemedIcon(R.drawable.ic_action_up_dark));
|
getThemedIcon(R.drawable.ic_action_up_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -256,7 +256,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
}
|
}
|
||||||
if (!target) {
|
if (!target) {
|
||||||
item = optionsMenu.getMenu().add(R.string.waypoint_visit_after)
|
item = optionsMenu.getMenu().add(R.string.waypoint_visit_after)
|
||||||
.setIcon(getMyApplication().getIconsCache().
|
.setIcon(getMyApplication().getUIUtilities().
|
||||||
getThemedIcon(R.drawable.ic_action_down_dark));
|
getThemedIcon(R.drawable.ic_action_down_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -271,7 +271,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
item = optionsMenu.getMenu().add(
|
item = optionsMenu.getMenu().add(
|
||||||
R.string.shared_string_remove).setIcon(getMyApplication().getIconsCache().
|
R.string.shared_string_remove).setIcon(getMyApplication().getUIUtilities().
|
||||||
getThemedIcon(R.drawable.ic_action_remove_dark));
|
getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -51,7 +51,7 @@ import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
import net.osmand.plus.ContextMenuAdapter;
|
||||||
import net.osmand.plus.ContextMenuAdapter.OnRowItemClick;
|
import net.osmand.plus.ContextMenuAdapter.OnRowItemClick;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
@ -443,12 +443,12 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
|
||||||
flat.setVisibility(View.GONE);
|
flat.setVisibility(View.GONE);
|
||||||
ImageView settingsButton = (ImageView) dashboardView.findViewById(R.id.toolbar_settings);
|
ImageView settingsButton = (ImageView) dashboardView.findViewById(R.id.toolbar_settings);
|
||||||
settingsButton.setVisibility(View.GONE);
|
settingsButton.setVisibility(View.GONE);
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
ImageView lst = (ImageView) dashboardView.findViewById(R.id.toolbar_list);
|
ImageView lst = (ImageView) dashboardView.findViewById(R.id.toolbar_list);
|
||||||
lst.setVisibility(View.GONE);
|
lst.setVisibility(View.GONE);
|
||||||
ImageView back = (ImageView) dashboardView.findViewById(R.id.toolbar_back);
|
ImageView back = (ImageView) dashboardView.findViewById(R.id.toolbar_back);
|
||||||
back.setImageDrawable(
|
back.setImageDrawable(
|
||||||
getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
|
getMyApplication().getUIUtilities().getIcon(R.drawable.ic_arrow_back));
|
||||||
back.setOnClickListener(new View.OnClickListener() {
|
back.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -41,8 +41,8 @@ public class DashSimulateFragment extends DashBaseFragment {
|
||||||
: R.string.animate_route);
|
: R.string.animate_route);
|
||||||
ImageButton actionButton = (ImageButton) getView().findViewById(R.id.stop);
|
ImageButton actionButton = (ImageButton) getView().findViewById(R.id.stop);
|
||||||
actionButton.setImageDrawable(
|
actionButton.setImageDrawable(
|
||||||
!routeAnimating ? getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_play_dark)
|
!routeAnimating ? getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_play_dark)
|
||||||
: getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_rec_stop));
|
: getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_rec_stop));
|
||||||
actionButton.setContentDescription(getString(routeAnimating ? R.string.animate_route_off : R.string.animate_route));
|
actionButton.setContentDescription(getString(routeAnimating ? R.string.animate_route_off : R.string.animate_route));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,9 +387,9 @@ public class ConfigureMapMenu {
|
||||||
View v = super.getView(position, convertView, parent);
|
View v = super.getView(position, convertView, parent);
|
||||||
final ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
final ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
if (checkedItems[position]) {
|
if (checkedItems[position]) {
|
||||||
icon.setImageDrawable(app.getIconsCache().getIcon(iconIds[position], R.color.osmand_orange));
|
icon.setImageDrawable(app.getUIUtilities().getIcon(iconIds[position], R.color.osmand_orange));
|
||||||
} else {
|
} else {
|
||||||
icon.setImageDrawable(app.getIconsCache().getThemedIcon(iconIds[position]));
|
icon.setImageDrawable(app.getUIUtilities().getThemedIcon(iconIds[position]));
|
||||||
}
|
}
|
||||||
v.findViewById(R.id.divider).setVisibility(View.GONE);
|
v.findViewById(R.id.divider).setVisibility(View.GONE);
|
||||||
v.findViewById(R.id.description).setVisibility(View.GONE);
|
v.findViewById(R.id.description).setVisibility(View.GONE);
|
||||||
|
@ -402,9 +402,9 @@ public class ConfigureMapMenu {
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
checkedItems[position] = isChecked;
|
checkedItems[position] = isChecked;
|
||||||
if (checkedItems[position]) {
|
if (checkedItems[position]) {
|
||||||
icon.setImageDrawable(app.getIconsCache().getIcon(iconIds[position], R.color.osmand_orange));
|
icon.setImageDrawable(app.getUIUtilities().getIcon(iconIds[position], R.color.osmand_orange));
|
||||||
} else {
|
} else {
|
||||||
icon.setImageDrawable(app.getIconsCache().getThemedIcon(iconIds[position]));
|
icon.setImageDrawable(app.getUIUtilities().getThemedIcon(iconIds[position]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1385,14 +1385,14 @@ public class ConfigureMapMenu {
|
||||||
iconId = R.drawable.ic_action_gpx_width_thin;
|
iconId = R.drawable.ic_action_gpx_width_thin;
|
||||||
}
|
}
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
||||||
app.getIconsCache().getPaintedIcon(iconId, currentColor), null);
|
app.getUIUtilities().getPaintedIcon(iconId, currentColor), null);
|
||||||
} else {
|
} else {
|
||||||
if (item.color == -1) {
|
if (item.color == -1) {
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
||||||
app.getIconsCache().getThemedIcon(R.drawable.ic_action_circle), null);
|
app.getUIUtilities().getThemedIcon(R.drawable.ic_action_circle), null);
|
||||||
} else {
|
} else {
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
textView.setCompoundDrawablesWithIntrinsicBounds(null, null,
|
||||||
app.getIconsCache().getPaintedIcon(R.drawable.ic_action_circle, item.color), null);
|
app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, item.color), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
textView.setCompoundDrawablePadding(AndroidUtils.dpToPx(getContext(), 10f));
|
textView.setCompoundDrawablePadding(AndroidUtils.dpToPx(getContext(), 10f));
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ErrorBottomSheetDialog extends BottomSheetDialogFragment {
|
||||||
String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH);
|
String msg = MessageFormat.format(getString(R.string.previous_run_crashed), OsmandApplication.EXCEPTION_PATH);
|
||||||
Typeface typeface = FontCache.getRobotoMedium(getActivity());
|
Typeface typeface = FontCache.getRobotoMedium(getActivity());
|
||||||
ImageView iv = ((ImageView) view.findViewById(R.id.error_icon));
|
ImageView iv = ((ImageView) view.findViewById(R.id.error_icon));
|
||||||
iv.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_crashlog));
|
iv.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_crashlog));
|
||||||
TextView message = ((TextView) view.findViewById(R.id.error_header));
|
TextView message = ((TextView) view.findViewById(R.id.error_header));
|
||||||
message.setTypeface(typeface);
|
message.setTypeface(typeface);
|
||||||
message.setText(msg);
|
message.setText(msg);
|
||||||
|
|
|
@ -19,8 +19,8 @@ import android.widget.EditText;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.Location;
|
||||||
import net.osmand.data.FavouritePoint;
|
import net.osmand.data.FavouritePoint;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
|
@ -42,11 +42,10 @@ public class FavoriteDialogs {
|
||||||
public static final String KEY_FAVORITE = "favorite";
|
public static final String KEY_FAVORITE = "favorite";
|
||||||
|
|
||||||
public static Dialog createReplaceFavouriteDialog(final Activity activity, final Bundle args) {
|
public static Dialog createReplaceFavouriteDialog(final Activity activity, final Bundle args) {
|
||||||
final FavouritesDbHelper helper = ((OsmandApplication) activity.getApplication()).getFavorites();
|
OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||||
|
final FavouritesDbHelper helper = app.getFavorites();
|
||||||
final List<FavouritePoint> points = new ArrayList<FavouritePoint>(helper.getFavouritePoints());
|
final List<FavouritePoint> points = new ArrayList<FavouritePoint>(helper.getFavouritePoints());
|
||||||
final FavouritesAdapter favouritesAdapter = new FavouritesAdapter(activity,
|
final FavouritesAdapter favouritesAdapter = new FavouritesAdapter(activity, points,false);
|
||||||
((OsmandApplication) activity.getApplication()).getFavorites().getFavouritePoints(),
|
|
||||||
false);
|
|
||||||
final Dialog[] dlgHolder = new Dialog[1];
|
final Dialog[] dlgHolder = new Dialog[1];
|
||||||
OnItemClickListener click = new AdapterView.OnItemClickListener() {
|
OnItemClickListener click = new AdapterView.OnItemClickListener() {
|
||||||
|
|
||||||
|
@ -56,9 +55,8 @@ public class FavoriteDialogs {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
if (activity instanceof MapActivity) {
|
favouritesAdapter.sortByDefault();
|
||||||
favouritesAdapter.updateLocation(((MapActivity) activity).getMapLocation());
|
|
||||||
}
|
|
||||||
if(points.size() == 0){
|
if(points.size() == 0){
|
||||||
Toast.makeText(activity, activity.getString(R.string.fav_points_not_exist), Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, activity.getString(R.string.fav_points_not_exist), Toast.LENGTH_SHORT).show();
|
||||||
return null;
|
return null;
|
||||||
|
@ -210,25 +208,7 @@ public class FavoriteDialogs {
|
||||||
final OnDismissListener dismissListener, final Dialog[] dialogHolder, final boolean sortByDist) {
|
final OnDismissListener dismissListener, final Dialog[] dialogHolder, final boolean sortByDist) {
|
||||||
ListView listView = new ListView(uiContext);
|
ListView listView = new ListView(uiContext);
|
||||||
AlertDialog.Builder bld = new AlertDialog.Builder(uiContext);
|
AlertDialog.Builder bld = new AlertDialog.Builder(uiContext);
|
||||||
final Collator inst = Collator.getInstance();
|
favouritesAdapter.sortByDefault();
|
||||||
favouritesAdapter.sort(new Comparator<FavouritePoint>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int compare(FavouritePoint lhs, FavouritePoint rhs) {
|
|
||||||
if (sortByDist) {
|
|
||||||
if (favouritesAdapter.getLocation() == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
double ld = MapUtils.getDistance(favouritesAdapter.getLocation(), lhs.getLatitude(),
|
|
||||||
lhs.getLongitude());
|
|
||||||
double rd = MapUtils.getDistance(favouritesAdapter.getLocation(), rhs.getLatitude(),
|
|
||||||
rhs.getLongitude());
|
|
||||||
return Double.compare(ld, rd);
|
|
||||||
}
|
|
||||||
return inst.compare(lhs.getName(), rhs.getName());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
listView.setAdapter(favouritesAdapter);
|
listView.setAdapter(favouritesAdapter);
|
||||||
listView.setOnItemClickListener(click);
|
listView.setOnItemClickListener(click);
|
||||||
bld.setPositiveButton(sortByDist ? R.string.sort_by_name :
|
bld.setPositiveButton(sortByDist ? R.string.sort_by_name :
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
|
@ -29,11 +29,11 @@ public class DownloadGroupViewHolder {
|
||||||
Drawable iconLeft;
|
Drawable iconLeft;
|
||||||
if (group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_REC
|
if (group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_REC
|
||||||
|| group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_TTS) {
|
|| group.getType() == DownloadResourceGroup.DownloadResourceGroupType.VOICE_TTS) {
|
||||||
iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_volume_up);
|
iconLeft = ctx.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_volume_up);
|
||||||
} else if (group.getType() == DownloadResourceGroup.DownloadResourceGroupType.FONTS) {
|
} else if (group.getType() == DownloadResourceGroup.DownloadResourceGroupType.FONTS) {
|
||||||
iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_map_language);
|
iconLeft = ctx.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_map_language);
|
||||||
} else {
|
} else {
|
||||||
IconsCache cache = ctx.getMyApplication().getIconsCache();
|
UiUtilities cache = ctx.getMyApplication().getUIUtilities();
|
||||||
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
|
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
|
||||||
iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark);
|
iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidNetworkUtils;
|
import net.osmand.AndroidNetworkUtils;
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
@ -105,7 +105,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
activity.getAccessibilityAssistant().registerPage(view, DownloadActivity.DOWNLOAD_TAB_NUMBER);
|
activity.getAccessibilityAssistant().registerPage(view, DownloadActivity.DOWNLOAD_TAB_NUMBER);
|
||||||
|
|
||||||
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
||||||
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
|
toolbar.setNavigationIcon(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -159,7 +159,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
if (!openAsDialog() && purchaseHelper != null && !purchaseHelper.hasInventory()) {
|
if (!openAsDialog() && purchaseHelper != null && !purchaseHelper.hasInventory()) {
|
||||||
restorePurchasesView = activity.getLayoutInflater().inflate(R.layout.restore_purchases_list_footer, null);
|
restorePurchasesView = activity.getLayoutInflater().inflate(R.layout.restore_purchases_list_footer, null);
|
||||||
((ImageView) restorePurchasesView.findViewById(R.id.icon)).setImageDrawable(
|
((ImageView) restorePurchasesView.findViewById(R.id.icon)).setImageDrawable(
|
||||||
getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_reset_to_default_dark));
|
getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_reset_to_default_dark));
|
||||||
restorePurchasesView.findViewById(R.id.button).setOnClickListener(new OnClickListener() {
|
restorePurchasesView.findViewById(R.id.button).setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -181,7 +181,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
searchView = activity.getLayoutInflater().inflate(R.layout.simple_list_menu_item, null);
|
searchView = activity.getLayoutInflater().inflate(R.layout.simple_list_menu_item, null);
|
||||||
searchView.setBackgroundResource(android.R.drawable.list_selector_background);
|
searchView.setBackgroundResource(android.R.drawable.list_selector_background);
|
||||||
TextView title = (TextView) searchView.findViewById(R.id.title);
|
TextView title = (TextView) searchView.findViewById(R.id.title);
|
||||||
title.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
title.setCompoundDrawablesWithIntrinsicBounds(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_search_dark), null, null, null);
|
||||||
title.setHint(R.string.search_map_hint);
|
title.setHint(R.string.search_map_hint);
|
||||||
searchView.setOnClickListener(new OnClickListener() {
|
searchView.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -532,11 +532,11 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
|
||||||
Drawable iconLeft;
|
Drawable iconLeft;
|
||||||
if (group.getType() == DownloadResourceGroupType.VOICE_REC
|
if (group.getType() == DownloadResourceGroupType.VOICE_REC
|
||||||
|| group.getType() == DownloadResourceGroupType.VOICE_TTS) {
|
|| group.getType() == DownloadResourceGroupType.VOICE_TTS) {
|
||||||
iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_volume_up);
|
iconLeft = ctx.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_volume_up);
|
||||||
} else if (group.getType() == DownloadResourceGroupType.FONTS) {
|
} else if (group.getType() == DownloadResourceGroupType.FONTS) {
|
||||||
iconLeft = ctx.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_map_language);
|
iconLeft = ctx.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_map_language);
|
||||||
} else {
|
} else {
|
||||||
IconsCache cache = ctx.getMyApplication().getIconsCache();
|
UiUtilities cache = ctx.getMyApplication().getUIUtilities();
|
||||||
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
|
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
|
||||||
iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark);
|
iconLeft = cache.getThemedIcon(R.drawable.ic_world_globe_dark);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -384,7 +384,7 @@ public class ItemViewHolder {
|
||||||
final File fl = indexItem.getTargetFile(context.getMyApplication());
|
final File fl = indexItem.getTargetFile(context.getMyApplication());
|
||||||
if (fl.exists()) {
|
if (fl.exists()) {
|
||||||
item = optionsMenu.getMenu().add(R.string.shared_string_remove).setIcon(
|
item = optionsMenu.getMenu().add(R.string.shared_string_remove).setIcon(
|
||||||
context.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_remove_dark));
|
context.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_remove_dark));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
@ -424,7 +424,7 @@ public class ItemViewHolder {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
item = optionsMenu.getMenu().add(R.string.shared_string_download)
|
item = optionsMenu.getMenu().add(R.string.shared_string_download)
|
||||||
.setIcon(context.getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_import));
|
.setIcon(context.getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_import));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
|
@ -437,10 +437,10 @@ public class ItemViewHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getContentIcon(DownloadActivity context, int resourceId) {
|
private Drawable getContentIcon(DownloadActivity context, int resourceId) {
|
||||||
return context.getMyApplication().getIconsCache().getThemedIcon(resourceId);
|
return context.getMyApplication().getUIUtilities().getThemedIcon(resourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getContentIcon(DownloadActivity context, int resourceId, int color) {
|
private Drawable getContentIcon(DownloadActivity context, int resourceId, int color) {
|
||||||
return context.getMyApplication().getIconsCache().getPaintedIcon(resourceId, color);
|
return context.getMyApplication().getUIUtilities().getPaintedIcon(resourceId, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import net.osmand.map.ITileSource;
|
||||||
import net.osmand.plus.ContextMenuAdapter;
|
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.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
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;
|
||||||
|
@ -1100,7 +1100,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
|
|
||||||
public void bindLocalIndexInfo(final LocalIndexInfo child) {
|
public void bindLocalIndexInfo(final LocalIndexInfo child) {
|
||||||
|
|
||||||
options.setImageDrawable(ctx.getMyApplication().getIconsCache()
|
options.setImageDrawable(ctx.getMyApplication().getUIUtilities()
|
||||||
.getThemedIcon(R.drawable.ic_overflow_menu_white));
|
.getThemedIcon(R.drawable.ic_overflow_menu_white));
|
||||||
options.setContentDescription(ctx.getString(R.string.shared_string_more));
|
options.setContentDescription(ctx.getString(R.string.shared_string_more));
|
||||||
options.setOnClickListener(new View.OnClickListener() {
|
options.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -1177,14 +1177,14 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getContentIcon(DownloadActivity context, int resourceId, int colorId) {
|
private Drawable getContentIcon(DownloadActivity context, int resourceId, int colorId) {
|
||||||
return context.getMyApplication().getIconsCache().getIcon(resourceId, colorId);
|
return context.getMyApplication().getUIUtilities().getIcon(resourceId, colorId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openPopUpMenu(View v, final LocalIndexInfo info) {
|
private void openPopUpMenu(View v, final LocalIndexInfo info) {
|
||||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMyApplication().getUIUtilities();
|
||||||
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
||||||
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
|
DirectionsDialogs.setupPopUpMenuIcon(optionsMenu);
|
||||||
final boolean restore = info.isBackupedData();
|
final boolean restore = info.isBackupedData();
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class AvoidSpecificRoads {
|
||||||
final RouteDataObject obj = getItem(position);
|
final RouteDataObject obj = getItem(position);
|
||||||
v.findViewById(R.id.all_points).setVisibility(View.GONE);
|
v.findViewById(R.id.all_points).setVisibility(View.GONE);
|
||||||
((ImageView) v.findViewById(R.id.waypoint_icon)).setImageDrawable(
|
((ImageView) v.findViewById(R.id.waypoint_icon)).setImageDrawable(
|
||||||
app.getIconsCache().getThemedIcon(R.drawable.ic_action_road_works_dark));
|
app.getUIUtilities().getThemedIcon(R.drawable.ic_action_road_works_dark));
|
||||||
double dist = MapUtils.getDistance(mapLocation, MapUtils.get31LatitudeY(obj.getPoint31YTile(0)),
|
double dist = MapUtils.getDistance(mapLocation, MapUtils.get31LatitudeY(obj.getPoint31YTile(0)),
|
||||||
MapUtils.get31LongitudeX(obj.getPoint31XTile(0)));
|
MapUtils.get31LongitudeX(obj.getPoint31XTile(0)));
|
||||||
((TextView) v.findViewById(R.id.waypoint_dist)).setText(OsmAndFormatter.getFormattedDistance((float) dist, app));
|
((TextView) v.findViewById(R.id.waypoint_dist)).setText(OsmAndFormatter.getFormattedDistance((float) dist, app));
|
||||||
|
@ -80,7 +80,7 @@ public class AvoidSpecificRoads {
|
||||||
((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(obj));
|
((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(obj));
|
||||||
ImageButton remove = (ImageButton) v.findViewById(R.id.info_close);
|
ImageButton remove = (ImageButton) v.findViewById(R.id.info_close);
|
||||||
remove.setVisibility(View.VISIBLE);
|
remove.setVisibility(View.VISIBLE);
|
||||||
remove.setImageDrawable(app.getIconsCache().getThemedIcon(
|
remove.setImageDrawable(app.getUIUtilities().getThemedIcon(
|
||||||
R.drawable.ic_action_remove_dark));
|
R.drawable.ic_action_remove_dark));
|
||||||
remove.setOnClickListener(new View.OnClickListener() {
|
remove.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class DiscountHelper {
|
||||||
pms.put("version", Version.getFullVersion(app));
|
pms.put("version", Version.getFullVersion(app));
|
||||||
pms.put("nd", app.getAppInitializer().getFirstInstalledDays() +"");
|
pms.put("nd", app.getAppInitializer().getFirstInstalledDays() +"");
|
||||||
pms.put("ns", app.getAppInitializer().getNumberOfStarts() + "");
|
pms.put("ns", app.getAppInitializer().getNumberOfStarts() + "");
|
||||||
|
pms.put("lang", app.getLanguage() + "");
|
||||||
try {
|
try {
|
||||||
pms.put("aid", Secure.getString(app.getContentResolver(), Secure.ANDROID_ID));
|
pms.put("aid", Secure.getString(app.getContentResolver(), Secure.ANDROID_ID));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ import net.osmand.plus.GPXUtilities.GPXTrackAnalysis;
|
||||||
import net.osmand.plus.GPXUtilities.Speed;
|
import net.osmand.plus.GPXUtilities.Speed;
|
||||||
import net.osmand.plus.GPXUtilities.TrkSegment;
|
import net.osmand.plus.GPXUtilities.TrkSegment;
|
||||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
|
@ -327,7 +327,7 @@ public class GpxUiHelper {
|
||||||
final List<GPXInfo> list,
|
final List<GPXInfo> list,
|
||||||
final ContextMenuAdapter adapter) {
|
final ContextMenuAdapter adapter) {
|
||||||
final OsmandApplication app = (OsmandApplication) activity.getApplication();
|
final OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||||
final IconsCache iconsCache = app.getIconsCache();
|
final UiUtilities iconsCache = app.getUIUtilities();
|
||||||
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
final int layout = R.layout.list_menu_item_native_singlechoice;
|
final int layout = R.layout.list_menu_item_native_singlechoice;
|
||||||
|
@ -747,13 +747,13 @@ public class GpxUiHelper {
|
||||||
v.findViewById(R.id.unknown_section).setVisibility(View.GONE);
|
v.findViewById(R.id.unknown_section).setVisibility(View.GONE);
|
||||||
ImageView distanceI = (ImageView) v.findViewById(R.id.distance_icon);
|
ImageView distanceI = (ImageView) v.findViewById(R.id.distance_icon);
|
||||||
distanceI.setVisibility(View.VISIBLE);
|
distanceI.setVisibility(View.VISIBLE);
|
||||||
distanceI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_distance));
|
distanceI.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_small_distance));
|
||||||
ImageView pointsI = (ImageView) v.findViewById(R.id.points_icon);
|
ImageView pointsI = (ImageView) v.findViewById(R.id.points_icon);
|
||||||
pointsI.setVisibility(View.VISIBLE);
|
pointsI.setVisibility(View.VISIBLE);
|
||||||
pointsI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_point));
|
pointsI.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_small_point));
|
||||||
ImageView timeI = (ImageView) v.findViewById(R.id.time_icon);
|
ImageView timeI = (ImageView) v.findViewById(R.id.time_icon);
|
||||||
timeI.setVisibility(View.VISIBLE);
|
timeI.setVisibility(View.VISIBLE);
|
||||||
timeI.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_small_time));
|
timeI.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_small_time));
|
||||||
TextView time = (TextView) v.findViewById(R.id.time);
|
TextView time = (TextView) v.findViewById(R.id.time);
|
||||||
TextView distance = (TextView) v.findViewById(R.id.distance);
|
TextView distance = (TextView) v.findViewById(R.id.distance);
|
||||||
TextView pointsCount = (TextView) v.findViewById(R.id.points_count);
|
TextView pointsCount = (TextView) v.findViewById(R.id.points_count);
|
||||||
|
@ -817,9 +817,9 @@ public class GpxUiHelper {
|
||||||
}
|
}
|
||||||
int color = GpxAppearanceAdapter.parseTrackColor(renderer, prefColorValue);
|
int color = GpxAppearanceAdapter.parseTrackColor(renderer, prefColorValue);
|
||||||
if (color == -1) {
|
if (color == -1) {
|
||||||
colorImageView.setImageDrawable(app.getIconsCache().getThemedIcon(R.drawable.ic_action_circle));
|
colorImageView.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_circle));
|
||||||
} else {
|
} else {
|
||||||
colorImageView.setImageDrawable(app.getIconsCache().getPaintedIcon(R.drawable.ic_action_circle, color));
|
colorImageView.setImageDrawable(app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, color));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1610,7 +1610,7 @@ public class GpxUiHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getImageDrawable(@NonNull OsmandApplication app) {
|
public Drawable getImageDrawable(@NonNull OsmandApplication app) {
|
||||||
return app.getIconsCache().getThemedIcon(imageId);
|
return app.getUIUtilities().getThemedIcon(imageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getName(@NonNull Context ctx, @NonNull GPXDataSetType[] types) {
|
public static String getName(@NonNull Context ctx, @NonNull GPXDataSetType[] types) {
|
||||||
|
@ -1663,7 +1663,7 @@ public class GpxUiHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getImageDrawable(OsmandApplication app) {
|
public Drawable getImageDrawable(OsmandApplication app) {
|
||||||
return app.getIconsCache().getThemedIcon(imageId);
|
return app.getUIUtilities().getThemedIcon(imageId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class MapMarkerDialogHelper {
|
||||||
textDist.setTextColor(ctx.getResources()
|
textDist.setTextColor(ctx.getResources()
|
||||||
.getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance));
|
.getColor(useCenter ? R.color.color_distance : R.color.color_myloc_distance));
|
||||||
} else {
|
} else {
|
||||||
waypointIcon.setImageDrawable(app.getIconsCache()
|
waypointIcon.setImageDrawable(app.getUIUtilities()
|
||||||
.getIcon(R.drawable.ic_action_flag_dark, !nightMode));
|
.getIcon(R.drawable.ic_action_flag_dark, !nightMode));
|
||||||
AndroidUtils.setTextSecondaryColor(ctx, text, nightMode);
|
AndroidUtils.setTextSecondaryColor(ctx, text, nightMode);
|
||||||
AndroidUtils.setTextSecondaryColor(ctx, textDist, nightMode);
|
AndroidUtils.setTextSecondaryColor(ctx, textDist, nightMode);
|
||||||
|
@ -124,6 +124,6 @@ public class MapMarkerDialogHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Drawable getMapMarkerIcon(OsmandApplication app, int colorIndex) {
|
public static Drawable getMapMarkerIcon(OsmandApplication app, int colorIndex) {
|
||||||
return app.getIconsCache().getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(colorIndex));
|
return app.getUIUtilities().getIcon(R.drawable.ic_action_flag_dark, MapMarker.getColorId(colorIndex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,11 +147,11 @@ public class WaypointDialogHelper {
|
||||||
AndroidUtils.setTextSecondaryColor(activity, textDeviation, nightMode);
|
AndroidUtils.setTextSecondaryColor(activity, textDeviation, nightMode);
|
||||||
if (ps.deviationDirectionRight) {
|
if (ps.deviationDirectionRight) {
|
||||||
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
|
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
app.getIconsCache().getIcon(R.drawable.ic_small_turn_right, colorId),
|
app.getUIUtilities().getIcon(R.drawable.ic_small_turn_right, colorId),
|
||||||
null, null, null);
|
null, null, null);
|
||||||
} else {
|
} else {
|
||||||
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
|
textDeviation.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
app.getIconsCache().getIcon(R.drawable.ic_small_turn_left, colorId),
|
app.getUIUtilities().getIcon(R.drawable.ic_small_turn_left, colorId),
|
||||||
null, null, null);
|
null, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,7 @@ public class WaypointDialogHelper {
|
||||||
int iconResId = nightMode ? R.color.marker_circle_button_color_dark : R.color.ctx_menu_title_color_dark;
|
int iconResId = nightMode ? R.color.marker_circle_button_color_dark : R.color.ctx_menu_title_color_dark;
|
||||||
|
|
||||||
remove.setVisibility(View.VISIBLE);
|
remove.setVisibility(View.VISIBLE);
|
||||||
remove.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_remove_dark, iconResId));
|
remove.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_remove_dark, iconResId));
|
||||||
remove.setEnabled(canRemove);
|
remove.setEnabled(canRemove);
|
||||||
remove.setAlpha(canRemove ? 1 : .5f);
|
remove.setAlpha(canRemove ? 1 : .5f);
|
||||||
if (canRemove) {
|
if (canRemove) {
|
||||||
|
@ -434,7 +434,7 @@ public class WaypointDialogHelper {
|
||||||
|
|
||||||
move.setVisibility(notFlatTargets ? View.VISIBLE : View.GONE);
|
move.setVisibility(notFlatTargets ? View.VISIBLE : View.GONE);
|
||||||
if (notFlatTargets) {
|
if (notFlatTargets) {
|
||||||
move.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_reorder, iconResId));
|
move.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_reorder, iconResId));
|
||||||
move.setTag(new DragIcon() {
|
move.setTag(new DragIcon() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick() {
|
public void onClick() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import net.osmand.data.LocationPoint;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.osm.PoiType;
|
import net.osmand.osm.PoiType;
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
import net.osmand.plus.OsmandSettings.MetricsConstants;
|
||||||
|
@ -704,7 +704,7 @@ public class WaypointHelper {
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
} else if (type == TARGETS) {
|
} else if (type == TARGETS) {
|
||||||
IconsCache iconsCache = app.getIconsCache();
|
UiUtilities iconsCache = app.getUIUtilities();
|
||||||
if (((TargetPoint) point).start) {
|
if (((TargetPoint) point).start) {
|
||||||
if (app.getTargetPointsHelper().getPointToStart() == null) {
|
if (app.getTargetPointsHelper().getPointToStart() == null) {
|
||||||
return iconsCache.getIcon(R.drawable.ic_action_location_color, 0);
|
return iconsCache.getIcon(R.drawable.ic_action_location_color, 0);
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
TextView regionNameHeaderTextView = (TextView) subscriptionHeader.findViewById(R.id.regionHeaderTextView);
|
TextView regionNameHeaderTextView = (TextView) subscriptionHeader.findViewById(R.id.regionHeaderTextView);
|
||||||
TextView regionNameTextView = (TextView) subscriptionHeader.findViewById(R.id.regionTextView);
|
TextView regionNameTextView = (TextView) subscriptionHeader.findViewById(R.id.regionTextView);
|
||||||
statusTextView.setText(getString(R.string.osm_live_active));
|
statusTextView.setText(getString(R.string.osm_live_active));
|
||||||
statusIcon.setImageDrawable(getMyApplication().getIconsCache().getThemedIcon(R.drawable.ic_action_done));
|
statusIcon.setImageDrawable(getMyApplication().getUIUtilities().getThemedIcon(R.drawable.ic_action_done));
|
||||||
regionNameHeaderTextView.setText(R.string.osm_live_support_region);
|
regionNameHeaderTextView.setText(R.string.osm_live_support_region);
|
||||||
String countryName = getSettings().BILLING_USER_COUNTRY.get();
|
String countryName = getSettings().BILLING_USER_COUNTRY.get();
|
||||||
if (Algorithms.isEmpty(countryName)) {
|
if (Algorithms.isEmpty(countryName)) {
|
||||||
|
@ -618,7 +618,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getSecondaryColorPaintedIcon(@DrawableRes int drawable) {
|
private Drawable getSecondaryColorPaintedIcon(@DrawableRes int drawable) {
|
||||||
return fragment.getMyActivity().getMyApplication().getIconsCache()
|
return fragment.getMyActivity().getMyApplication().getUIUtilities()
|
||||||
.getPaintedIcon(drawable, secondaryColor);
|
.getPaintedIcon(drawable, secondaryColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,9 +135,9 @@ public class SubscriptionFragment extends BaseOsmAndDialogFragment implements In
|
||||||
View view = inflater.inflate(R.layout.subscription_fragment, container, false);
|
View view = inflater.inflate(R.layout.subscription_fragment, container, false);
|
||||||
ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeButton);
|
ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeButton);
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
closeButton.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_mode_back));
|
closeButton.setImageDrawable(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_mode_back));
|
||||||
} else {
|
} else {
|
||||||
closeButton.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_remove_dark));
|
closeButton.setImageDrawable(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_remove_dark));
|
||||||
}
|
}
|
||||||
closeButton.setOnClickListener(new View.OnClickListener() {
|
closeButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -158,7 +158,7 @@ public class AdditionalActionsBottomSheetDialogFragment extends net.osmand.plus.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Drawable getContentIcon(@DrawableRes int id) {
|
protected Drawable getContentIcon(@DrawableRes int id) {
|
||||||
return getMyApplication().getIconsCache().getIcon(id, nightMode ? R.color.grid_menu_icon_dark : R.color.on_map_icon_color);
|
return getMyApplication().getUIUtilities().getIcon(id, nightMode ? R.color.grid_menu_icon_dark : R.color.on_map_icon_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getCancelRowBgResId() {
|
private int getCancelRowBgResId() {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import net.osmand.plus.IconsCache;
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ public abstract class BaseMenuController {
|
||||||
|
|
||||||
protected Drawable getIconOrig(int iconId) {
|
protected Drawable getIconOrig(int iconId) {
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
return iconsCache.getIcon(iconId, 0);
|
return iconsCache.getIcon(iconId, 0);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -95,7 +95,7 @@ public abstract class BaseMenuController {
|
||||||
|
|
||||||
protected Drawable getIcon(int iconId, int colorId) {
|
protected Drawable getIcon(int iconId, int colorId) {
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
return iconsCache.getIcon(iconId, colorId);
|
return iconsCache.getIcon(iconId, colorId);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -104,7 +104,7 @@ public abstract class BaseMenuController {
|
||||||
|
|
||||||
protected Drawable getPaintedIcon(int iconId, int color) {
|
protected Drawable getPaintedIcon(int iconId, int color) {
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
return iconsCache.getPaintedIcon(iconId, color);
|
return iconsCache.getPaintedIcon(iconId, color);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -113,7 +113,7 @@ public abstract class BaseMenuController {
|
||||||
|
|
||||||
protected Drawable getIcon(int iconId, int colorLightId, int colorDarkId) {
|
protected Drawable getIcon(int iconId, int colorLightId, int colorDarkId) {
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
return iconsCache.getIcon(iconId, isLight() ? colorLightId : colorDarkId);
|
return iconsCache.getIcon(iconId, isLight() ? colorLightId : colorDarkId);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -54,7 +54,6 @@ import net.osmand.plus.views.OsmandMapLayer;
|
||||||
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController;
|
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarController;
|
||||||
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarControllerType;
|
import net.osmand.plus.views.mapwidgets.MapInfoWidgetsFactory.TopToolbarControllerType;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
@ -83,10 +82,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
private boolean centerMarker;
|
private boolean centerMarker;
|
||||||
private int mapZoom;
|
private int mapZoom;
|
||||||
|
|
||||||
private LatLon myLocation;
|
|
||||||
private Float heading;
|
|
||||||
private boolean inLocationUpdate = false;
|
private boolean inLocationUpdate = false;
|
||||||
private boolean cachedMyLocation;
|
|
||||||
private boolean appModeChanged;
|
private boolean appModeChanged;
|
||||||
private boolean appModeListenerAdded;
|
private boolean appModeListenerAdded;
|
||||||
private boolean autoHide;
|
private boolean autoHide;
|
||||||
|
@ -307,9 +303,6 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
}
|
}
|
||||||
|
|
||||||
OsmandApplication app = mapActivity.getMyApplication();
|
OsmandApplication app = mapActivity.getMyApplication();
|
||||||
if (myLocation == null) {
|
|
||||||
updateMyLocation(app.getLocationProvider().getLastKnownLocation(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!update && isVisible()) {
|
if (!update && isVisible()) {
|
||||||
if (this.object == null || !this.object.equals(object)) {
|
if (this.object == null || !this.object.equals(object)) {
|
||||||
|
@ -440,7 +433,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFragmentResume() {
|
public void onFragmentResume() {
|
||||||
if (active && displayDistanceDirection() && myLocation != null) {
|
if (active && displayDistanceDirection()) {
|
||||||
updateLocation(false, true, false);
|
updateLocation(false, true, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1034,8 +1027,8 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addNewWptToGPXFile(final LatLon latLon, final String title,
|
public void addNewWptToGPXFile(final LatLon latLon, final String title,
|
||||||
final String categoryName,
|
final String categoryName,
|
||||||
final int categoryColor, final boolean skipDialog) {
|
final int categoryColor, final boolean skipDialog) {
|
||||||
if (mapActivity != null) {
|
if (mapActivity != null) {
|
||||||
CallbackWithObject<GPXFile[]> callbackWithObject = new CallbackWithObject<GPXFile[]>() {
|
CallbackWithObject<GPXFile[]> callbackWithObject = new CallbackWithObject<GPXFile[]>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1320,30 +1313,13 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
return getCurrentMenuState() == MenuState.HEADER_ONLY;
|
return getCurrentMenuState() == MenuState.HEADER_ONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LatLon getMyLocation() {
|
|
||||||
return myLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCachedMyLocation() {
|
|
||||||
return cachedMyLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Float getHeading() {
|
|
||||||
return heading;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateMyLocation(Location location, boolean updateLocationUi) {
|
private void updateMyLocation(Location location, boolean updateLocationUi) {
|
||||||
if (location == null) {
|
MapActivity mapActivity = getMapActivity();
|
||||||
MapActivity mapActivity = getMapActivity();
|
if (location == null && mapActivity != null) {
|
||||||
if (mapActivity != null) {
|
location = mapActivity.getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
||||||
location = mapActivity.getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
|
||||||
}
|
|
||||||
cachedMyLocation = location != null;
|
|
||||||
} else {
|
|
||||||
cachedMyLocation = false;
|
|
||||||
}
|
}
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
myLocation = new LatLon(location.getLatitude(), location.getLongitude());
|
|
||||||
if (updateLocationUi) {
|
if (updateLocationUi) {
|
||||||
updateLocation(false, true, false);
|
updateLocation(false, true, false);
|
||||||
}
|
}
|
||||||
|
@ -1358,15 +1334,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
||||||
|
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
if (active && displayDistanceDirection()) {
|
if (active && displayDistanceDirection()) {
|
||||||
// 99 in next line used to one-time initialize arrows (with reference vs. fixed-north direction)
|
updateLocation(false, false, true);
|
||||||
// on non-compass devices
|
|
||||||
float lastHeading = heading != null ? heading : 99;
|
|
||||||
heading = value;
|
|
||||||
if (Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
|
||||||
updateLocation(false, false, true);
|
|
||||||
} else {
|
|
||||||
heading = lastHeading;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,36 @@
|
||||||
package net.osmand.plus.mapcontextmenu;
|
package net.osmand.plus.mapcontextmenu;
|
||||||
|
|
||||||
|
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
||||||
|
import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.data.QuadPoint;
|
||||||
|
import net.osmand.data.RotatedTileBox;
|
||||||
|
import net.osmand.plus.LockableScrollView;
|
||||||
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.OsmandSettings;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.base.BaseOsmAndFragment;
|
||||||
|
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
||||||
|
import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
|
||||||
|
import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
|
||||||
|
import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
|
||||||
|
import net.osmand.plus.mapcontextmenu.controllers.TransportStopController;
|
||||||
|
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||||
|
import net.osmand.plus.transport.TransportStopRoute;
|
||||||
|
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||||
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
|
import net.osmand.plus.views.TransportStopsLayer;
|
||||||
|
import net.osmand.plus.views.controls.HorizontalSwipeConfirm;
|
||||||
|
import net.osmand.plus.views.controls.SingleTapConfirm;
|
||||||
|
import net.osmand.util.Algorithms;
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
|
@ -35,38 +66,6 @@ import android.widget.OverScroller;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.data.QuadPoint;
|
|
||||||
import net.osmand.data.RotatedTileBox;
|
|
||||||
import net.osmand.plus.LockableScrollView;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.OsmandSettings;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.base.BaseOsmAndFragment;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
|
|
||||||
import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
|
|
||||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
|
|
||||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
|
|
||||||
import net.osmand.plus.mapcontextmenu.controllers.TransportStopController;
|
|
||||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
|
||||||
import net.osmand.plus.transport.TransportStopRoute;
|
|
||||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
|
||||||
import net.osmand.plus.views.TransportStopsLayer;
|
|
||||||
import net.osmand.plus.views.controls.HorizontalSwipeConfirm;
|
|
||||||
import net.osmand.plus.views.controls.SingleTapConfirm;
|
|
||||||
import net.osmand.util.Algorithms;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
|
|
||||||
import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
|
|
||||||
|
|
||||||
|
|
||||||
public class MapContextMenuFragment extends BaseOsmAndFragment implements DownloadEvents {
|
public class MapContextMenuFragment extends BaseOsmAndFragment implements DownloadEvents {
|
||||||
public static final String TAG = "MapContextMenuFragment";
|
public static final String TAG = "MapContextMenuFragment";
|
||||||
|
@ -134,6 +133,8 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
private int screenOrientation;
|
private int screenOrientation;
|
||||||
private boolean created;
|
private boolean created;
|
||||||
|
|
||||||
|
private UpdateLocationViewCache updateLocationViewCache;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
@ -141,6 +142,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
processScreenHeight(container);
|
processScreenHeight(container);
|
||||||
|
|
||||||
menu = getMapActivity().getContextMenu();
|
menu = getMapActivity().getContextMenu();
|
||||||
|
updateLocationViewCache = getMyApplication().getUIUtilities().getUpdateLocationViewCache();
|
||||||
|
|
||||||
markerPaddingPx = dpToPx(MARKER_PADDING_DP);
|
markerPaddingPx = dpToPx(MARKER_PADDING_DP);
|
||||||
markerPaddingXPx = dpToPx(MARKER_PADDING_X_DP);
|
markerPaddingXPx = dpToPx(MARKER_PADDING_X_DP);
|
||||||
|
@ -751,7 +753,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateImageButton(ImageButton button, int iconLightId, int iconDarkId, int bgLightId, int bgDarkId, boolean night) {
|
private void updateImageButton(ImageButton button, int iconLightId, int iconDarkId, int bgLightId, int bgDarkId, boolean night) {
|
||||||
button.setImageDrawable(getMapActivity().getMyApplication().getIconsCache().getIcon(night ? iconDarkId : iconLightId));
|
button.setImageDrawable(getMapActivity().getMyApplication().getUIUtilities().getIcon(night ? iconDarkId : iconLightId));
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||||
button.setBackground(getMapActivity().getResources().getDrawable(night ? bgDarkId : bgLightId,
|
button.setBackground(getMapActivity().getResources().getDrawable(night ? bgDarkId : bgLightId,
|
||||||
getMapActivity().getTheme()));
|
getMapActivity().getTheme()));
|
||||||
|
@ -1171,7 +1173,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
dismissMenu();
|
dismissMenu();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
screenOrientation = DashLocationFragment.getScreenOrientation(getActivity());
|
updateLocationViewCache = getMyApplication().getUIUtilities().getUpdateLocationViewCache();
|
||||||
getMapActivity().getMapViewTrackingUtilities().setContextMenu(menu);
|
getMapActivity().getMapViewTrackingUtilities().setContextMenu(menu);
|
||||||
getMapActivity().getMapViewTrackingUtilities().setMapLinkedToLocation(false);
|
getMapActivity().getMapViewTrackingUtilities().setMapLinkedToLocation(false);
|
||||||
wasDrawerDisabled = getMapActivity().isDrawerDisabled();
|
wasDrawerDisabled = getMapActivity().isDrawerDisabled();
|
||||||
|
@ -1495,7 +1497,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
OsmandApplication app = getMyApplication();
|
OsmandApplication app = getMyApplication();
|
||||||
if (app != null && view != null) {
|
if (app != null && view != null) {
|
||||||
View compassView = view.findViewById(R.id.compass_layout);
|
View compassView = view.findViewById(R.id.compass_layout);
|
||||||
if (menu.getMyLocation() != null && menu.displayDistanceDirection() && menu.getCurrentMenuState() != MenuState.FULL_SCREEN) {
|
if (menu.displayDistanceDirection() && menu.getCurrentMenuState() != MenuState.FULL_SCREEN) {
|
||||||
updateDistanceDirection();
|
updateDistanceDirection();
|
||||||
compassView.setVisibility(View.VISIBLE);
|
compassView.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1534,10 +1536,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
if (app != null && activity != null && view != null) {
|
if (app != null && activity != null && view != null) {
|
||||||
TextView distanceText = (TextView) view.findViewById(R.id.distance);
|
TextView distanceText = (TextView) view.findViewById(R.id.distance);
|
||||||
ImageView direction = (ImageView) view.findViewById(R.id.direction);
|
ImageView direction = (ImageView) view.findViewById(R.id.direction);
|
||||||
float myHeading = menu.getHeading() == null ? 0f : menu.getHeading();
|
getMyApplication().getUIUtilities().updateLocationView(updateLocationViewCache, direction, distanceText, menu.getLatLon());
|
||||||
int color = menu.isCachedMyLocation() ? R.color.icon_color : 0;
|
|
||||||
DashLocationFragment.updateLocationView(false, menu.getMyLocation(), myHeading, direction, color, distanceText,
|
|
||||||
color, menu.getLatLon().getLatitude(), menu.getLatLon().getLongitude(), screenOrientation, app, activity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.PointDescription;
|
import net.osmand.data.PointDescription;
|
||||||
import net.osmand.data.QuadRect;
|
import net.osmand.data.QuadRect;
|
||||||
import net.osmand.osm.PoiCategory;
|
import net.osmand.osm.PoiCategory;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
|
@ -745,7 +745,7 @@ public class MenuBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getRowIcon(int iconId) {
|
public Drawable getRowIcon(int iconId) {
|
||||||
IconsCache iconsCache = app.getIconsCache();
|
UiUtilities iconsCache = app.getUIUtilities();
|
||||||
return iconsCache.getIcon(iconId, light ? R.color.ctx_menu_bottom_view_icon_light : R.color.ctx_menu_bottom_view_icon_dark);
|
return iconsCache.getIcon(iconId, light ? R.color.ctx_menu_bottom_view_icon_light : R.color.ctx_menu_bottom_view_icon_dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -782,7 +782,7 @@ public class MenuBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Drawable getCollapseIcon(boolean collapsed) {
|
public Drawable getCollapseIcon(boolean collapsed) {
|
||||||
return app.getIconsCache().getIcon(collapsed ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up,
|
return app.getUIUtilities().getIcon(collapsed ? R.drawable.ic_action_arrow_down : R.drawable.ic_action_arrow_up,
|
||||||
light ? R.color.ctx_menu_collapse_icon_color_light : R.color.ctx_menu_collapse_icon_color_dark);
|
light ? R.color.ctx_menu_collapse_icon_color_light : R.color.ctx_menu_collapse_icon_color_dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,7 +826,7 @@ public class MenuBuilder {
|
||||||
titleView.setTextSize(16);
|
titleView.setTextSize(16);
|
||||||
titleView.setTextColor(app.getResources().getColor(light ? R.color.ctx_menu_bottom_view_text_color_light : R.color.ctx_menu_bottom_view_text_color_dark));
|
titleView.setTextColor(app.getResources().getColor(light ? R.color.ctx_menu_bottom_view_text_color_light : R.color.ctx_menu_bottom_view_text_color_dark));
|
||||||
String desc = route.getDescription(getMapActivity().getMyApplication(), true);
|
String desc = route.getDescription(getMapActivity().getMyApplication(), true);
|
||||||
Drawable arrow = app.getIconsCache().getIcon(R.drawable.ic_arrow_right_16, light ? R.color.ctx_menu_route_icon_color_light : R.color.ctx_menu_route_icon_color_dark);
|
Drawable arrow = app.getUIUtilities().getIcon(R.drawable.ic_arrow_right_16, light ? R.color.ctx_menu_route_icon_color_light : R.color.ctx_menu_route_icon_color_dark);
|
||||||
arrow.setBounds(0, 0, arrow.getIntrinsicWidth(), arrow.getIntrinsicHeight());
|
arrow.setBounds(0, 0, arrow.getIntrinsicWidth(), arrow.getIntrinsicHeight());
|
||||||
|
|
||||||
titleView.setText(AndroidUtils.replaceCharsWithIcon(desc, arrow, arrowChars));
|
titleView.setText(AndroidUtils.replaceCharsWithIcon(desc, arrow, arrowChars));
|
||||||
|
|
|
@ -260,9 +260,9 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
});
|
});
|
||||||
button.setAllCaps(true);
|
button.setAllCaps(true);
|
||||||
button.setText(R.string.context_menu_read_full_article);
|
button.setText(R.string.context_menu_read_full_article);
|
||||||
Drawable normal = app.getIconsCache().getIcon(R.drawable.ic_action_read_text,
|
Drawable normal = app.getUIUtilities().getIcon(R.drawable.ic_action_read_text,
|
||||||
light ? R.color.ctx_menu_controller_button_text_color_light_n : R.color.ctx_menu_controller_button_text_color_dark_n);
|
light ? R.color.ctx_menu_controller_button_text_color_light_n : R.color.ctx_menu_controller_button_text_color_dark_n);
|
||||||
Drawable pressed = app.getIconsCache().getIcon(R.drawable.ic_action_read_text,
|
Drawable pressed = app.getUIUtilities().getIcon(R.drawable.ic_action_read_text,
|
||||||
light ? R.color.ctx_menu_controller_button_text_color_light_p : R.color.ctx_menu_controller_button_text_color_dark_p);
|
light ? R.color.ctx_menu_controller_button_text_color_light_p : R.color.ctx_menu_controller_button_text_color_dark_p);
|
||||||
button.setCompoundDrawablesWithIntrinsicBounds(Build.VERSION.SDK_INT >= 21
|
button.setCompoundDrawablesWithIntrinsicBounds(Build.VERSION.SDK_INT >= 21
|
||||||
? AndroidUtils.createPressedStateListDrawable(normal, pressed) : normal, null, null, null);
|
? AndroidUtils.createPressedStateListDrawable(normal, pressed) : normal, null, null, null);
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class FavouritePointMenuBuilder extends MenuBuilder {
|
||||||
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
|
int disabledColor = light ? R.color.secondary_text_light : R.color.secondary_text_dark;
|
||||||
color = favoriteGroup.visible ? (color | 0xff000000) : view.getResources().getColor(disabledColor);
|
color = favoriteGroup.visible ? (color | 0xff000000) : view.getResources().getColor(disabledColor);
|
||||||
String name = view.getContext().getString(R.string.context_menu_points_of_group);
|
String name = view.getContext().getString(R.string.context_menu_points_of_group);
|
||||||
buildRow(view, app.getIconsCache().getPaintedIcon(R.drawable.ic_action_folder, color), null, name, 0, null,
|
buildRow(view, app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_folder, color), null, name, 0, null,
|
||||||
true, getCollapsableFavouritesView(view.getContext(), true, favoriteGroup, fav),
|
true, getCollapsableFavouritesView(view.getContext(), true, favoriteGroup, fav),
|
||||||
false, 0, false, null, false);
|
false, 0, false, null, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class GpxItemMenuBuilder extends MenuBuilder {
|
||||||
llIconParams.setMargins(0, 0, gpxSmallIconMargin, 0);
|
llIconParams.setMargins(0, 0, gpxSmallIconMargin, 0);
|
||||||
llIconParams.gravity = Gravity.CENTER_VERTICAL;
|
llIconParams.gravity = Gravity.CENTER_VERTICAL;
|
||||||
icon.setLayoutParams(llIconParams);
|
icon.setLayoutParams(llIconParams);
|
||||||
icon.setImageDrawable(app.getIconsCache().getThemedIcon(iconId));
|
icon.setImageDrawable(app.getUIUtilities().getThemedIcon(iconId));
|
||||||
ll.addView(icon);
|
ll.addView(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class WptPtMenuBuilder extends MenuBuilder {
|
||||||
File file = new File(gpx.path);
|
File file = new File(gpx.path);
|
||||||
String gpxName = file.getName().replace(".gpx", "").replace("/", " ").replace("_", " ");
|
String gpxName = file.getName().replace(".gpx", "").replace("/", " ").replace("_", " ");
|
||||||
int color = getPointColor(wpt, getFileColor(selectedGpxFile));
|
int color = getPointColor(wpt, getFileColor(selectedGpxFile));
|
||||||
buildRow(view, app.getIconsCache().getPaintedIcon(R.drawable.ic_type_waypoints_group, color), null, title, 0, gpxName,
|
buildRow(view, app.getUIUtilities().getPaintedIcon(R.drawable.ic_type_waypoints_group, color), null, title, 0, gpxName,
|
||||||
true, getCollapsableWaypointsView(view.getContext(), true, gpx, wpt),
|
true, getCollapsableWaypointsView(view.getContext(), true, gpx, wpt),
|
||||||
false, 0, false, null, false);
|
false, 0, false, null, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public abstract class AbstractCard {
|
||||||
|
|
||||||
final Toolbar topBar = new Toolbar(ctx);
|
final Toolbar topBar = new Toolbar(ctx);
|
||||||
topBar.setClickable(true);
|
topBar.setClickable(true);
|
||||||
Drawable back = app.getIconsCache().getIcon(R.drawable.ic_action_remove_dark);
|
Drawable back = app.getUIUtilities().getIcon(R.drawable.ic_action_remove_dark);
|
||||||
topBar.setNavigationIcon(back);
|
topBar.setNavigationIcon(back);
|
||||||
topBar.setNavigationContentDescription(R.string.shared_string_close);
|
topBar.setNavigationContentDescription(R.string.shared_string_close);
|
||||||
topBar.setTitle(title);
|
topBar.setTitle(title);
|
||||||
|
|
|
@ -328,7 +328,7 @@ public abstract class ImageCard extends AbstractCard {
|
||||||
R.drawable.context_menu_card_light, R.drawable.context_menu_card_dark);
|
R.drawable.context_menu_card_light, R.drawable.context_menu_card_dark);
|
||||||
|
|
||||||
if (icon == null && topIconId != 0) {
|
if (icon == null && topIconId != 0) {
|
||||||
icon = getMyApplication().getIconsCache().getIcon(topIconId);
|
icon = getMyApplication().getUIUtilities().getIcon(topIconId);
|
||||||
}
|
}
|
||||||
if (icon == null) {
|
if (icon == null) {
|
||||||
iconImageView.setVisibility(View.GONE);
|
iconImageView.setVisibility(View.GONE);
|
||||||
|
@ -373,9 +373,9 @@ public abstract class ImageCard extends AbstractCard {
|
||||||
}
|
}
|
||||||
if (buttonIcon == null && buttonIconId != 0) {
|
if (buttonIcon == null && buttonIconId != 0) {
|
||||||
if (buttonIconColor != 0) {
|
if (buttonIconColor != 0) {
|
||||||
buttonIcon = getMyApplication().getIconsCache().getPaintedIcon(buttonIconId, buttonIconColor);
|
buttonIcon = getMyApplication().getUIUtilities().getPaintedIcon(buttonIconId, buttonIconColor);
|
||||||
} else {
|
} else {
|
||||||
buttonIcon = getMyApplication().getIconsCache().getIcon(buttonIconId);
|
buttonIcon = getMyApplication().getUIUtilities().getIcon(buttonIconId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
button.setCompoundDrawablesWithIntrinsicBounds(buttonIcon, null, null, null);
|
button.setCompoundDrawablesWithIntrinsicBounds(buttonIcon, null, null, null);
|
||||||
|
|
|
@ -6,7 +6,7 @@ import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.mapillary.MapillaryPlugin;
|
import net.osmand.plus.mapillary.MapillaryPlugin;
|
||||||
|
@ -25,7 +25,7 @@ public class NoImagesCard extends AbstractCard {
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
IconsCache ic = getMyApplication().getIconsCache();
|
UiUtilities ic = getMyApplication().getUIUtilities();
|
||||||
boolean night = getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
boolean night = getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
||||||
MapActivity ctx = getMapActivity();
|
MapActivity ctx = getMapActivity();
|
||||||
AndroidUtils.setBackgroundColor(ctx, view, night, R.color.bg_color_light, R.color.bg_color_dark);
|
AndroidUtils.setBackgroundColor(ctx, view, night, R.color.bg_color_light, R.color.bg_color_dark);
|
||||||
|
|
|
@ -49,8 +49,9 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
|
||||||
toolbar.setTitle(getToolbarTitle());
|
toolbar.setTitle(getToolbarTitle());
|
||||||
|
|
||||||
OsmandApplication app = requireMyApplication();
|
OsmandApplication app = requireMyApplication();
|
||||||
toolbar.setNavigationIcon(app.getIconsCache().getIcon(R.drawable.ic_arrow_back));
|
toolbar.setNavigationIcon(app.getUIUtilities().getIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||||
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(getMapActivity(), R.attr.pstsTextColor)));
|
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(getMapActivity(), R.attr.pstsTextColor)));
|
||||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.FavouritesDbHelper;
|
import net.osmand.plus.FavouritesDbHelper;
|
||||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
@ -168,7 +168,7 @@ public class SelectCategoryDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
private static Drawable getIcon(final Activity activity, int iconId) {
|
private static Drawable getIcon(final Activity activity, int iconId) {
|
||||||
OsmandApplication app = (OsmandApplication)activity.getApplication();
|
OsmandApplication app = (OsmandApplication)activity.getApplication();
|
||||||
IconsCache iconsCache = app.getIconsCache();
|
UiUtilities iconsCache = app.getUIUtilities();
|
||||||
boolean light = app.getSettings().isLightContent();
|
boolean light = app.getSettings().isLightContent();
|
||||||
return iconsCache.getIcon(iconId,
|
return iconsCache.getIcon(iconId,
|
||||||
light ? R.color.icon_color : R.color.icon_color_light);
|
light ? R.color.icon_color : R.color.icon_color_light);
|
||||||
|
|
|
@ -15,7 +15,7 @@ import android.widget.TextView;
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.TargetPointsHelper;
|
import net.osmand.plus.TargetPointsHelper;
|
||||||
|
@ -55,7 +55,7 @@ public class DestinationReachedMenuFragment extends Fragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
IconsCache iconsCache = getMapActivity().getMyApplication().getIconsCache();
|
UiUtilities iconsCache = getMapActivity().getMyApplication().getUIUtilities();
|
||||||
|
|
||||||
ImageButton closeImageButton = (ImageButton) view.findViewById(R.id.closeImageButton);
|
ImageButton closeImageButton = (ImageButton) view.findViewById(R.id.closeImageButton);
|
||||||
closeImageButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_remove_dark, menu.isLight()));
|
closeImageButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_remove_dark, menu.isLight()));
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
package net.osmand.plus.mapcontextmenu.other;
|
package net.osmand.plus.mapcontextmenu.other;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.data.FavouritePoint;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||||
|
import android.app.Activity;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -7,35 +15,19 @@ import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.data.FavouritePoint;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.plus.IconsCache;
|
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class FavouritesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class FavouritesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
|
||||||
|
|
||||||
private final List<FavouritePoint> favouritePoints;
|
private final List<FavouritePoint> favouritePoints;
|
||||||
private OsmandApplication app;
|
private OsmandApplication app;
|
||||||
private IconsCache iconsCache;
|
|
||||||
private View.OnClickListener listener;
|
private View.OnClickListener listener;
|
||||||
|
|
||||||
private LatLon location;
|
private UpdateLocationViewCache cache;
|
||||||
private Float heading;
|
|
||||||
private boolean useCenter;
|
|
||||||
private int screenOrientation;
|
|
||||||
|
|
||||||
public FavouritesAdapter(OsmandApplication app, List<FavouritePoint> FavouritePoints) {
|
public FavouritesAdapter(OsmandApplication app, List<FavouritePoint> FavouritePoints) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
iconsCache = app.getIconsCache();
|
|
||||||
this.favouritePoints = FavouritePoints;
|
this.favouritePoints = FavouritePoints;
|
||||||
|
cache = app.getUIUtilities().getUpdateLocationViewCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,15 +49,8 @@ public class FavouritesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
favouritesViewHolder.description.setText(favouritePoint.getCategory());
|
favouritesViewHolder.description.setText(favouritePoint.getCategory());
|
||||||
}
|
}
|
||||||
favouritesViewHolder.favouriteImage.setImageDrawable(FavoriteImageDrawable.getOrCreate(app, favouritePoint.getColor(), false));
|
favouritesViewHolder.favouriteImage.setImageDrawable(FavoriteImageDrawable.getOrCreate(app, favouritePoint.getColor(), false));
|
||||||
if (location == null) {
|
app.getUIUtilities().updateLocationView(cache, favouritesViewHolder.arrowImage, favouritesViewHolder.distance,
|
||||||
return;
|
favouritePoint.getLatitude(), favouritePoint.getLongitude());
|
||||||
}
|
|
||||||
float dist = (float) MapUtils.getDistance(favouritePoint.getLatitude(), favouritePoint.getLongitude(), location.getLatitude(), location.getLongitude());
|
|
||||||
favouritesViewHolder.distance.setText(OsmAndFormatter.getFormattedDistance(dist, app));
|
|
||||||
favouritesViewHolder.arrowImage.setImageDrawable(iconsCache.getIcon(R.drawable.ic_direction_arrow));
|
|
||||||
DashLocationFragment.updateLocationView(useCenter, location, heading, favouritesViewHolder.arrowImage,
|
|
||||||
favouritesViewHolder.distance, favouritePoint.getLatitude(), favouritePoint.getLongitude(),
|
|
||||||
screenOrientation, app);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,21 +67,6 @@ public class FavouritesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScreenOrientation(int screenOrientation) {
|
|
||||||
this.screenOrientation = screenOrientation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocation(LatLon location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHeading(Float heading) {
|
|
||||||
this.heading = heading;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUseCenter(boolean useCenter) {
|
|
||||||
this.useCenter = useCenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
class FavouritesViewHolder extends RecyclerView.ViewHolder {
|
class FavouritesViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,6 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
private static final String IS_SORTED = "sorted";
|
private static final String IS_SORTED = "sorted";
|
||||||
private static final String SORTED_BY_TYPE = "sortedByType";
|
private static final String SORTED_BY_TYPE = "sortedByType";
|
||||||
|
|
||||||
private Location location;
|
|
||||||
private LatLon latLon;
|
|
||||||
private Float heading;
|
|
||||||
private List<FavouritePoint> favouritePoints;
|
private List<FavouritePoint> favouritePoints;
|
||||||
private FavouritesAdapter adapter;
|
private FavouritesAdapter adapter;
|
||||||
private RecyclerView recyclerView;
|
private RecyclerView recyclerView;
|
||||||
|
@ -49,6 +46,7 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
private boolean compassUpdateAllowed = true;
|
private boolean compassUpdateAllowed = true;
|
||||||
private boolean target;
|
private boolean target;
|
||||||
private boolean intermediate;
|
private boolean intermediate;
|
||||||
|
private float lastHeading;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createMenuItems(final Bundle savedInstanceState) {
|
public void createMenuItems(final Bundle savedInstanceState) {
|
||||||
|
@ -66,16 +64,7 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
recyclerView = (RecyclerView) View.inflate(new ContextThemeWrapper(getContext(), themeRes),
|
recyclerView = (RecyclerView) View.inflate(new ContextThemeWrapper(getContext(), themeRes),
|
||||||
R.layout.recyclerview, null);
|
R.layout.recyclerview, null);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
location = getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
|
||||||
adapter = new FavouritesAdapter(getMyApplication(), favouritePoints);
|
adapter = new FavouritesAdapter(getMyApplication(), favouritePoints);
|
||||||
if (location != null) {
|
|
||||||
latLon = new LatLon(location.getLatitude(), location.getLongitude());
|
|
||||||
adapter.setUseCenter(false);
|
|
||||||
} else {
|
|
||||||
latLon = ((MapActivity) getActivity()).getMapLocation();
|
|
||||||
adapter.setUseCenter(true);
|
|
||||||
}
|
|
||||||
adapter.setLocation(latLon);
|
|
||||||
sortFavourites();
|
sortFavourites();
|
||||||
final BottomSheetItemTitleWithDescrAndButton[] title = new BottomSheetItemTitleWithDescrAndButton[1];
|
final BottomSheetItemTitleWithDescrAndButton[] title = new BottomSheetItemTitleWithDescrAndButton[1];
|
||||||
title[0] = (BottomSheetItemTitleWithDescrAndButton) new BottomSheetItemTitleWithDescrAndButton.Builder()
|
title[0] = (BottomSheetItemTitleWithDescrAndButton) new BottomSheetItemTitleWithDescrAndButton.Builder()
|
||||||
|
@ -171,7 +160,6 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity()));
|
|
||||||
startLocationUpdate();
|
startLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,26 +172,14 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLocation(Location location) {
|
public void updateLocation(Location location) {
|
||||||
boolean newLocation = this.location == null && location != null;
|
updateLocationUi();
|
||||||
boolean locationChanged = this.location != null && location != null
|
|
||||||
&& this.location.getLatitude() != location.getLatitude()
|
|
||||||
&& this.location.getLongitude() != location.getLongitude();
|
|
||||||
if (newLocation || locationChanged) {
|
|
||||||
this.location = location;
|
|
||||||
updateLocationUi();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
// 99 in next line used to one-time initialize arrows (with reference vs. fixed-north direction)
|
if (Math.abs(MapUtils.degreesDiff(lastHeading, value)) > 5) {
|
||||||
// on non-compass devices
|
lastHeading = value;
|
||||||
float lastHeading = heading != null ? heading : 99;
|
|
||||||
heading = value;
|
|
||||||
if (Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
|
||||||
updateLocationUi();
|
updateLocationUi();
|
||||||
} else {
|
|
||||||
heading = lastHeading;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,15 +192,6 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (location == null) {
|
|
||||||
location = getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean useCenter = location == null;
|
|
||||||
latLon = useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude());
|
|
||||||
adapter.setUseCenter(useCenter);
|
|
||||||
adapter.setLocation(latLon);
|
|
||||||
adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading != null ? heading : 99);
|
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -266,6 +233,9 @@ public class FavouritesBottomSheetMenuFragment extends MenuBottomSheetDialogFrag
|
||||||
|
|
||||||
private void sortFavourites() {
|
private void sortFavourites() {
|
||||||
final Collator inst = Collator.getInstance();
|
final Collator inst = Collator.getInstance();
|
||||||
|
Location stale = getMyApplication().getLocationProvider().getLastStaleKnownLocation();
|
||||||
|
final LatLon latLon = stale != null ? new LatLon(stale.getLatitude(), stale.getLongitude()) :
|
||||||
|
getMyApplication().getMapViewTrackingUtilities().getMapLocation();
|
||||||
Collections.sort(favouritePoints, new Comparator<FavouritePoint>() {
|
Collections.sort(favouritePoints, new Comparator<FavouritePoint>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(FavouritePoint lhs, FavouritePoint rhs) {
|
public int compare(FavouritePoint lhs, FavouritePoint rhs) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import net.osmand.data.RotatedTileBox;
|
||||||
import net.osmand.plus.ApplicationMode;
|
import net.osmand.plus.ApplicationMode;
|
||||||
import net.osmand.plus.GeocodingLookupService;
|
import net.osmand.plus.GeocodingLookupService;
|
||||||
import net.osmand.plus.GeocodingLookupService.AddressLookupRequest;
|
import net.osmand.plus.GeocodingLookupService.AddressLookupRequest;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.MapMarkersHelper;
|
import net.osmand.plus.MapMarkersHelper;
|
||||||
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
|
@ -231,7 +231,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
main.findViewById(R.id.InfoDuration).setVisibility(View.GONE);
|
main.findViewById(R.id.InfoDuration).setVisibility(View.GONE);
|
||||||
textView.setText(R.string.route_is_too_long_v2);
|
textView.setText(R.string.route_is_too_long_v2);
|
||||||
textView.setVisibility(View.VISIBLE);
|
textView.setVisibility(View.VISIBLE);
|
||||||
iconView.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_warning, isLight()));
|
iconView.setImageDrawable(mapActivity.getMyApplication().getUIUtilities().getIcon(R.drawable.ic_warning, isLight()));
|
||||||
} else {
|
} else {
|
||||||
main.findViewById(R.id.dividerToDropDown).setVisibility(View.GONE);
|
main.findViewById(R.id.dividerToDropDown).setVisibility(View.GONE);
|
||||||
main.findViewById(R.id.RouteInfoControls).setVisibility(View.GONE);
|
main.findViewById(R.id.RouteInfoControls).setVisibility(View.GONE);
|
||||||
|
@ -294,7 +294,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
ImageView viaIcon = (ImageView) parentView.findViewById(R.id.viaIcon);
|
ImageView viaIcon = (ImageView) parentView.findViewById(R.id.viaIcon);
|
||||||
viaIcon.setImageDrawable(getIconOrig(R.drawable.list_intermediate));
|
viaIcon.setImageDrawable(getIconOrig(R.drawable.list_intermediate));
|
||||||
|
|
||||||
swapDirectionView.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_change_navigation_points,
|
swapDirectionView.setImageDrawable(mapActivity.getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_change_navigation_points,
|
||||||
isLight() ? R.color.route_info_control_icon_color_light : R.color.route_info_control_icon_color_dark));
|
isLight() ? R.color.route_info_control_icon_color_light : R.color.route_info_control_icon_color_dark));
|
||||||
swapDirectionView.setOnClickListener(new View.OnClickListener() {
|
swapDirectionView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -378,7 +378,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
updateToIcon(parentView);
|
updateToIcon(parentView);
|
||||||
|
|
||||||
ImageView toDropDownIcon = (ImageView) parentView.findViewById(R.id.toDropDownIcon);
|
ImageView toDropDownIcon = (ImageView) parentView.findViewById(R.id.toDropDownIcon);
|
||||||
toDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, isLight()));
|
toDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_arrow_drop_down, isLight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateToIcon(View parentView) {
|
private void updateToIcon(View parentView) {
|
||||||
|
@ -448,7 +448,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
updateFromIcon(parentView);
|
updateFromIcon(parentView);
|
||||||
|
|
||||||
ImageView fromDropDownIcon = (ImageView) parentView.findViewById(R.id.fromDropDownIcon);
|
ImageView fromDropDownIcon = (ImageView) parentView.findViewById(R.id.fromDropDownIcon);
|
||||||
fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, isLight()));
|
fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_arrow_drop_down, isLight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateFromIcon(View parentView) {
|
public void updateFromIcon(View parentView) {
|
||||||
|
@ -520,7 +520,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getIconOrig(int iconId) {
|
private Drawable getIconOrig(int iconId) {
|
||||||
IconsCache iconsCache = mapActivity.getMyApplication().getIconsCache();
|
UiUtilities iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
return iconsCache.getIcon(iconId, 0);
|
return iconsCache.getIcon(iconId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,7 +550,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
mainView.findViewById(R.id.RouteInfoControls).setVisibility(View.VISIBLE);
|
mainView.findViewById(R.id.RouteInfoControls).setVisibility(View.VISIBLE);
|
||||||
final OsmandApplication ctx = mapActivity.getMyApplication();
|
final OsmandApplication ctx = mapActivity.getMyApplication();
|
||||||
ImageView prev = (ImageView) mainView.findViewById(R.id.Prev);
|
ImageView prev = (ImageView) mainView.findViewById(R.id.Prev);
|
||||||
prev.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_prev, isLight()));
|
prev.setImageDrawable(ctx.getUIUtilities().getIcon(R.drawable.ic_prev, isLight()));
|
||||||
if (directionInfo >= 0) {
|
if (directionInfo >= 0) {
|
||||||
prev.setVisibility(View.VISIBLE);
|
prev.setVisibility(View.VISIBLE);
|
||||||
prev.setOnClickListener(new View.OnClickListener() {
|
prev.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@ -578,7 +578,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
}
|
}
|
||||||
ImageView next = (ImageView) mainView.findViewById(R.id.Next);
|
ImageView next = (ImageView) mainView.findViewById(R.id.Next);
|
||||||
next.setVisibility(View.VISIBLE);
|
next.setVisibility(View.VISIBLE);
|
||||||
next.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_next, isLight()));
|
next.setImageDrawable(ctx.getUIUtilities().getIcon(R.drawable.ic_next, isLight()));
|
||||||
next.setOnClickListener(new View.OnClickListener() {
|
next.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -614,9 +614,9 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
infoDurationView.setVisibility(View.GONE);
|
infoDurationView.setVisibility(View.GONE);
|
||||||
textView.setVisibility(View.VISIBLE);
|
textView.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
infoIcon.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_action_route_distance, R.color.route_info_unchecked_mode_icon_color));
|
infoIcon.setImageDrawable(ctx.getUIUtilities().getIcon(R.drawable.ic_action_route_distance, R.color.route_info_unchecked_mode_icon_color));
|
||||||
infoIcon.setVisibility(View.VISIBLE);
|
infoIcon.setVisibility(View.VISIBLE);
|
||||||
durationIcon.setImageDrawable(ctx.getIconsCache().getIcon(R.drawable.ic_action_time_span, R.color.route_info_unchecked_mode_icon_color));
|
durationIcon.setImageDrawable(ctx.getUIUtilities().getIcon(R.drawable.ic_action_time_span, R.color.route_info_unchecked_mode_icon_color));
|
||||||
durationIcon.setVisibility(View.VISIBLE);
|
durationIcon.setVisibility(View.VISIBLE);
|
||||||
infoDistanceView.setVisibility(View.VISIBLE);
|
infoDistanceView.setVisibility(View.VISIBLE);
|
||||||
infoDurationView.setVisibility(View.VISIBLE);
|
infoDurationView.setVisibility(View.VISIBLE);
|
||||||
|
@ -997,7 +997,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
||||||
if (row.icon != null) {
|
if (row.icon != null) {
|
||||||
icon = row.icon;
|
icon = row.icon;
|
||||||
} else if (row.iconId > 0) {
|
} else if (row.iconId > 0) {
|
||||||
icon = mapActivity.getMyApplication().getIconsCache().getThemedIcon(row.iconId);
|
icon = mapActivity.getMyApplication().getUIUtilities().getThemedIcon(row.iconId);
|
||||||
}
|
}
|
||||||
label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
|
label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
|
||||||
label.setCompoundDrawablePadding(AndroidUtils.dpToPx(mapActivity, 16f));
|
label.setCompoundDrawablePadding(AndroidUtils.dpToPx(mapActivity, 16f));
|
||||||
|
|
|
@ -11,7 +11,7 @@ import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -50,7 +50,7 @@ public class MultiSelectionArrayAdapter extends ArrayAdapter<MapMultiSelectionMe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
IconsCache iconsCache = menu.getMapActivity().getMyApplication().getIconsCache();
|
UiUtilities iconsCache = menu.getMapActivity().getMyApplication().getUIUtilities();
|
||||||
final View iconLayout = convertView.findViewById(R.id.context_menu_icon_layout);
|
final View iconLayout = convertView.findViewById(R.id.context_menu_icon_layout);
|
||||||
final ImageView iconView = (ImageView) convertView.findViewById(R.id.context_menu_icon_view);
|
final ImageView iconView = (ImageView) convertView.findViewById(R.id.context_menu_icon_view);
|
||||||
Drawable icon = item.getRightIcon();
|
Drawable icon = item.getRightIcon();
|
||||||
|
|
|
@ -454,7 +454,7 @@ public class RoutePreferencesMenu {
|
||||||
v.findViewById(R.id.description_text).setVisibility(View.GONE);
|
v.findViewById(R.id.description_text).setVisibility(View.GONE);
|
||||||
v.findViewById(R.id.select_button).setVisibility(View.GONE);
|
v.findViewById(R.id.select_button).setVisibility(View.GONE);
|
||||||
((ImageView) v.findViewById(R.id.icon))
|
((ImageView) v.findViewById(R.id.icon))
|
||||||
.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_volume_up, !nightMode));
|
.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_volume_up, !nightMode));
|
||||||
final CompoundButton btn = (CompoundButton) v.findViewById(R.id.toggle_item);
|
final CompoundButton btn = (CompoundButton) v.findViewById(R.id.toggle_item);
|
||||||
btn.setVisibility(View.VISIBLE);
|
btn.setVisibility(View.VISIBLE);
|
||||||
btn.setChecked(!routingHelper.getVoiceRouter().isMute());
|
btn.setChecked(!routingHelper.getVoiceRouter().isMute());
|
||||||
|
@ -474,7 +474,7 @@ public class RoutePreferencesMenu {
|
||||||
View v = mapActivity.getLayoutInflater().inflate(R.layout.switch_select_list_item, null);
|
View v = mapActivity.getLayoutInflater().inflate(R.layout.switch_select_list_item, null);
|
||||||
AndroidUtils.setListItemBackground(mapActivity, v, nightMode);
|
AndroidUtils.setListItemBackground(mapActivity, v, nightMode);
|
||||||
((ImageView) v.findViewById(R.id.icon))
|
((ImageView) v.findViewById(R.id.icon))
|
||||||
.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_road_works_dark, !nightMode));
|
.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_road_works_dark, !nightMode));
|
||||||
v.findViewById(R.id.toggle_item).setVisibility(View.GONE);
|
v.findViewById(R.id.toggle_item).setVisibility(View.GONE);
|
||||||
final TextView btn = (TextView) v.findViewById(R.id.select_button);
|
final TextView btn = (TextView) v.findViewById(R.id.select_button);
|
||||||
btn.setTextColor(btn.getLinkTextColors());
|
btn.setTextColor(btn.getLinkTextColors());
|
||||||
|
@ -560,7 +560,7 @@ public class RoutePreferencesMenu {
|
||||||
final TextView gpxSpinner = (TextView) v.findViewById(R.id.GPXRouteSpinner);
|
final TextView gpxSpinner = (TextView) v.findViewById(R.id.GPXRouteSpinner);
|
||||||
AndroidUtils.setTextPrimaryColor(mapActivity, gpxSpinner, nightMode);
|
AndroidUtils.setTextPrimaryColor(mapActivity, gpxSpinner, nightMode);
|
||||||
((ImageView) v.findViewById(R.id.dropDownIcon))
|
((ImageView) v.findViewById(R.id.dropDownIcon))
|
||||||
.setImageDrawable(app.getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, !nightMode));
|
.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.ic_action_arrow_drop_down, !nightMode));
|
||||||
updateSpinnerItems(gpxSpinner);
|
updateSpinnerItems(gpxSpinner);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
@ -568,7 +568,7 @@ public class RoutePreferencesMenu {
|
||||||
View v = mapActivity.getLayoutInflater().inflate(R.layout.layers_list_activity_item, null);
|
View v = mapActivity.getLayoutInflater().inflate(R.layout.layers_list_activity_item, null);
|
||||||
AndroidUtils.setListItemBackground(mapActivity, v, nightMode);
|
AndroidUtils.setListItemBackground(mapActivity, v, nightMode);
|
||||||
final ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
final ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||||
icon.setImageDrawable(app.getIconsCache().getIcon(R.drawable.map_action_settings, !nightMode));
|
icon.setImageDrawable(app.getUIUtilities().getIcon(R.drawable.map_action_settings, !nightMode));
|
||||||
icon.setVisibility(View.VISIBLE);
|
icon.setVisibility(View.VISIBLE);
|
||||||
TextView titleView = (TextView) v.findViewById(R.id.title);
|
TextView titleView = (TextView) v.findViewById(R.id.title);
|
||||||
titleView.setText(R.string.routing_settings_2);
|
titleView.setText(R.string.routing_settings_2);
|
||||||
|
|
|
@ -27,7 +27,7 @@ import net.osmand.plus.GPXUtilities.TrkSegment;
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
@ -450,7 +450,7 @@ public class TrackDetailsMenu {
|
||||||
});
|
});
|
||||||
|
|
||||||
final OsmandApplication app = mapActivity.getMyApplication();
|
final OsmandApplication app = mapActivity.getMyApplication();
|
||||||
final IconsCache ic = app.getIconsCache();
|
final UiUtilities ic = app.getUIUtilities();
|
||||||
|
|
||||||
GpxUiHelper.setupGPXChart(app, chart, 4);
|
GpxUiHelper.setupGPXChart(app, chart, 4);
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class MapillaryAutoCompleteAdapter extends ArrayAdapter<String> implement
|
||||||
|
|
||||||
nameTv.setText(names.get(position));
|
nameTv.setText(names.get(position));
|
||||||
if (wrong) {
|
if (wrong) {
|
||||||
Drawable icon = app.getIconsCache().getPaintedIcon(R.drawable.ic_warning, app.getResources().getColor(R.color.color_warning));
|
Drawable icon = app.getUIUtilities().getPaintedIcon(R.drawable.ic_warning, app.getResources().getColor(R.color.color_warning));
|
||||||
iconIv.setImageDrawable(icon);
|
iconIv.setImageDrawable(icon);
|
||||||
iconIv.setVisibility(View.VISIBLE);
|
iconIv.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ import net.osmand.data.QuadRect;
|
||||||
import net.osmand.data.RotatedTileBox;
|
import net.osmand.data.RotatedTileBox;
|
||||||
import net.osmand.map.ITileSource;
|
import net.osmand.map.ITileSource;
|
||||||
import net.osmand.map.TileSourceManager;
|
import net.osmand.map.TileSourceManager;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||||
|
@ -85,12 +85,12 @@ public class MapillaryImageDialog extends ContextMenuCardDialog {
|
||||||
private double fetchedTileLon = Double.NaN;
|
private double fetchedTileLon = Double.NaN;
|
||||||
private List<MapillaryImage> sequenceImages = new ArrayList<>();
|
private List<MapillaryImage> sequenceImages = new ArrayList<>();
|
||||||
private AtomicInteger downloadRequestNumber = new AtomicInteger();
|
private AtomicInteger downloadRequestNumber = new AtomicInteger();
|
||||||
private IconsCache ic;
|
private UiUtilities ic;
|
||||||
|
|
||||||
public MapillaryImageDialog(@NonNull MapActivity mapActivity, @NonNull Bundle bundle) {
|
public MapillaryImageDialog(@NonNull MapActivity mapActivity, @NonNull Bundle bundle) {
|
||||||
super(mapActivity, CardDialogType.MAPILLARY);
|
super(mapActivity, CardDialogType.MAPILLARY);
|
||||||
restoreFields(bundle);
|
restoreFields(bundle);
|
||||||
this.ic = mapActivity.getMyApplication().getIconsCache();
|
this.ic = mapActivity.getMyApplication().getUIUtilities();
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapillaryImageDialog(MapActivity mapActivity, String key, String sKey, String imageUrl,
|
public MapillaryImageDialog(MapActivity mapActivity, String key, String sKey, String imageUrl,
|
||||||
|
@ -104,7 +104,7 @@ public class MapillaryImageDialog extends ContextMenuCardDialog {
|
||||||
this.viewerUrl = viewerUrl;
|
this.viewerUrl = viewerUrl;
|
||||||
this.latLon = latLon;
|
this.latLon = latLon;
|
||||||
this.ca = ca;
|
this.ca = ca;
|
||||||
this.ic = mapActivity.getMyApplication().getIconsCache();
|
this.ic = mapActivity.getMyApplication().getUIUtilities();
|
||||||
this.sync = sync;
|
this.sync = sync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ public class MapillaryImageDialog extends ContextMenuCardDialog {
|
||||||
@Override
|
@Override
|
||||||
protected void createMenuItems(Menu menu) {
|
protected void createMenuItems(Menu menu) {
|
||||||
MenuItem item = menu.add(R.string.open_mapillary)
|
MenuItem item = menu.add(R.string.open_mapillary)
|
||||||
.setIcon(getMapActivity().getMyApplication().getIconsCache().getThemedIcon(
|
.setIcon(getMapActivity().getMyApplication().getUIUtilities().getThemedIcon(
|
||||||
R.drawable.ic_action_mapillary));
|
R.drawable.ic_action_mapillary));
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -47,7 +47,6 @@ import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.Location;
|
import net.osmand.Location;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
|
@ -58,6 +57,7 @@ import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||||
|
@ -99,6 +99,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
private boolean locationUpdateStarted;
|
private boolean locationUpdateStarted;
|
||||||
private boolean compassUpdateAllowed = true;
|
private boolean compassUpdateAllowed = true;
|
||||||
|
|
||||||
|
|
||||||
public void setListener(OnMapMarkersSavedListener listener) {
|
public void setListener(OnMapMarkersSavedListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
}
|
}
|
||||||
|
@ -497,7 +498,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity()));
|
|
||||||
startLocationUpdate();
|
startLocationUpdate();
|
||||||
|
|
||||||
final View focusedView = getDialog().getCurrentFocus();
|
final View focusedView = getDialog().getCurrentFocus();
|
||||||
|
@ -1020,7 +1021,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable getColoredIcon(@DrawableRes int resId, @ColorRes int colorResId) {
|
private Drawable getColoredIcon(@DrawableRes int resId, @ColorRes int colorResId) {
|
||||||
return getMyApplication().getIconsCache().getIcon(resId, colorResId);
|
return getMyApplication().getUIUtilities().getIcon(resId, colorResId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MapActivity getMapActivity() {
|
private MapActivity getMapActivity() {
|
||||||
|
@ -1065,15 +1066,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
||||||
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (location == null) {
|
|
||||||
location = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation();
|
|
||||||
}
|
|
||||||
MapViewTrackingUtilities utilities = mapActivity.getMapViewTrackingUtilities();
|
|
||||||
boolean useCenter = !(utilities.isMapLinkedToLocation() && location != null);
|
|
||||||
|
|
||||||
adapter.setUseCenter(useCenter);
|
|
||||||
adapter.setLocation(useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude()));
|
|
||||||
adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading != null ? heading : 99);
|
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -36,11 +36,11 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment {
|
||||||
private Float heading;
|
private Float heading;
|
||||||
private boolean useCenter;
|
private boolean useCenter;
|
||||||
private boolean nightMode;
|
private boolean nightMode;
|
||||||
private int screenOrientation;
|
|
||||||
private boolean target;
|
private boolean target;
|
||||||
private boolean intermediate;
|
private boolean intermediate;
|
||||||
|
|
||||||
private OnMarkerSelectListener onClickListener;
|
private OnMarkerSelectListener onClickListener;
|
||||||
|
private int screenOrientation;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,7 +63,7 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment {
|
||||||
MapRouteInfoMenu routeInfoMenu = mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu();
|
MapRouteInfoMenu routeInfoMenu = mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu();
|
||||||
onClickListener = routeInfoMenu.getOnMarkerSelectListener();
|
onClickListener = routeInfoMenu.getOnMarkerSelectListener();
|
||||||
|
|
||||||
screenOrientation = DashLocationFragment.getScreenOrientation(mapActivity);
|
screenOrientation = app.getUIUtilities().getScreenOrientation();
|
||||||
|
|
||||||
MapViewTrackingUtilities trackingUtils = mapActivity.getMapViewTrackingUtilities();
|
MapViewTrackingUtilities trackingUtils = mapActivity.getMapViewTrackingUtilities();
|
||||||
if (trackingUtils != null) {
|
if (trackingUtils != null) {
|
||||||
|
@ -84,7 +84,7 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment {
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.map_marker_selection_fragment, container, false);
|
View view = inflater.inflate(R.layout.map_marker_selection_fragment, container, false);
|
||||||
ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeButton);
|
ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeButton);
|
||||||
closeButton.setImageDrawable(getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_mode_back));
|
closeButton.setImageDrawable(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_action_mode_back));
|
||||||
closeButton.setOnClickListener(new View.OnClickListener() {
|
closeButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
|
@ -147,7 +147,6 @@ public class MapMarkersActiveFragment extends Fragment implements OsmAndCompassL
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity()));
|
|
||||||
startLocationUpdate();
|
startLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,12 +219,6 @@ public class MapMarkersActiveFragment extends Fragment implements OsmAndCompassL
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
location = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation();
|
location = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation();
|
||||||
}
|
}
|
||||||
MapViewTrackingUtilities utilities = mapActivity.getMapViewTrackingUtilities();
|
|
||||||
boolean useCenter = !(utilities.isMapLinkedToLocation() && location != null);
|
|
||||||
|
|
||||||
adapter.setUseCenter(useCenter);
|
|
||||||
adapter.setLocation(useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude()));
|
|
||||||
adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading != null ? heading : 99);
|
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
|
||||||
View mainView = inflater.inflate(R.layout.fragment_map_markers_dialog, container);
|
View mainView = inflater.inflate(R.layout.fragment_map_markers_dialog, container);
|
||||||
|
|
||||||
Toolbar toolbar = (Toolbar) mainView.findViewById(R.id.map_markers_toolbar);
|
Toolbar toolbar = (Toolbar) mainView.findViewById(R.id.map_markers_toolbar);
|
||||||
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.ic_arrow_back));
|
toolbar.setNavigationIcon(getMyApplication().getUIUtilities().getIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
toolbar.setNavigationContentDescription(R.string.access_shared_string_navigate_up);
|
||||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,22 @@
|
||||||
package net.osmand.plus.mapmarkers;
|
package net.osmand.plus.mapmarkers;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.data.Amenity;
|
||||||
|
import net.osmand.data.FavouritePoint;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.plus.GPXUtilities.WptPt;
|
||||||
|
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
||||||
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.mapmarkers.SelectionMarkersGroupBottomSheetDialogFragment.AddMarkersGroupFragmentListener;
|
||||||
|
import net.osmand.plus.mapmarkers.adapters.MapMarkerItemViewHolder;
|
||||||
|
import net.osmand.plus.mapmarkers.adapters.MapMarkersGroupsAdapter;
|
||||||
|
import net.osmand.plus.widgets.EmptyStateRecyclerView;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
@ -22,34 +39,11 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.data.Amenity;
|
|
||||||
import net.osmand.data.FavouritePoint;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.plus.GPXUtilities.WptPt;
|
|
||||||
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndCompassListener;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
|
||||||
import net.osmand.plus.OsmandApplication;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
import net.osmand.plus.mapmarkers.SelectionMarkersGroupBottomSheetDialogFragment.AddMarkersGroupFragmentListener;
|
|
||||||
import net.osmand.plus.mapmarkers.adapters.MapMarkerItemViewHolder;
|
|
||||||
import net.osmand.plus.mapmarkers.adapters.MapMarkersGroupsAdapter;
|
|
||||||
import net.osmand.plus.widgets.EmptyStateRecyclerView;
|
|
||||||
import net.osmand.util.MapUtils;
|
|
||||||
|
|
||||||
public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassListener, OsmAndLocationListener {
|
public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassListener, OsmAndLocationListener {
|
||||||
|
|
||||||
public static final String TAG = "MapMarkersGroupsFragment";
|
public static final String TAG = "MapMarkersGroupsFragment";
|
||||||
|
|
||||||
private MapMarkersGroupsAdapter adapter;
|
private MapMarkersGroupsAdapter adapter;
|
||||||
private Float heading;
|
|
||||||
private Location location;
|
|
||||||
private boolean locationUpdateStarted;
|
private boolean locationUpdateStarted;
|
||||||
private Paint backgroundPaint = new Paint();
|
private Paint backgroundPaint = new Paint();
|
||||||
private Paint iconPaint = new Paint();
|
private Paint iconPaint = new Paint();
|
||||||
|
@ -400,7 +394,6 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
adapter.setScreenOrientation(DashLocationFragment.getScreenOrientation(getActivity()));
|
|
||||||
startLocationUpdate();
|
startLocationUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,27 +435,12 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLocation(Location location) {
|
public void updateLocation(Location location) {
|
||||||
boolean newLocation = this.location == null && location != null;
|
updateLocationUi();
|
||||||
boolean locationChanged = this.location != null && location != null
|
|
||||||
&& this.location.getLatitude() != location.getLatitude()
|
|
||||||
&& this.location.getLongitude() != location.getLongitude();
|
|
||||||
if (newLocation || locationChanged) {
|
|
||||||
this.location = location;
|
|
||||||
updateLocationUi();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCompassValue(float value) {
|
public void updateCompassValue(float value) {
|
||||||
// 99 in next line used to one-time initialize arrows (with reference vs. fixed-north direction)
|
updateLocationUi();
|
||||||
// on non-compass devices
|
|
||||||
float lastHeading = heading != null ? heading : 99;
|
|
||||||
heading = value;
|
|
||||||
if (Math.abs(MapUtils.degreesDiff(lastHeading, heading)) > 5) {
|
|
||||||
updateLocationUi();
|
|
||||||
} else {
|
|
||||||
heading = lastHeading;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private OsmandApplication getMyApplication() {
|
private OsmandApplication getMyApplication() {
|
||||||
|
@ -481,15 +459,6 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
||||||
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
mapActivity.getMyApplication().runInUIThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (location == null) {
|
|
||||||
location = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation();
|
|
||||||
}
|
|
||||||
MapViewTrackingUtilities utilities = mapActivity.getMapViewTrackingUtilities();
|
|
||||||
boolean useCenter = !(utilities.isMapLinkedToLocation() && location != null);
|
|
||||||
|
|
||||||
adapter.setUseCenter(useCenter);
|
|
||||||
adapter.setLocation(useCenter ? mapActivity.getMapLocation() : new LatLon(location.getLatitude(), location.getLongitude()));
|
|
||||||
adapter.setHeading(useCenter ? -mapActivity.getMapRotate() : heading != null ? heading : 99);
|
|
||||||
adapter.notifyDataSetChanged();
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
package net.osmand.plus.mapmarkers.adapters;
|
package net.osmand.plus.mapmarkers.adapters;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.UiUtilities;
|
||||||
|
import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.annotation.ColorInt;
|
import android.support.annotation.ColorInt;
|
||||||
import android.support.annotation.ColorRes;
|
import android.support.annotation.ColorRes;
|
||||||
|
@ -10,51 +18,25 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.plus.IconsCache;
|
|
||||||
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
|
||||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CoordinateInputAdapter extends RecyclerView.Adapter<MapMarkerItemViewHolder> {
|
public class CoordinateInputAdapter extends RecyclerView.Adapter<MapMarkerItemViewHolder> {
|
||||||
|
|
||||||
private MapActivity mapActivity;
|
private MapActivity mapActivity;
|
||||||
private IconsCache iconsCache;
|
private UiUtilities iconsCache;
|
||||||
private List<MapMarker> mapMarkers;
|
private List<MapMarker> mapMarkers;
|
||||||
|
|
||||||
private boolean nightTheme;
|
private boolean nightTheme;
|
||||||
|
private UpdateLocationViewCache updateViewCache;
|
||||||
private LatLon location;
|
|
||||||
private Float heading;
|
|
||||||
private boolean useCenter;
|
|
||||||
private int screenOrientation;
|
|
||||||
|
|
||||||
public CoordinateInputAdapter(MapActivity mapActivity, List<MapMarker> mapMarkers) {
|
public CoordinateInputAdapter(MapActivity mapActivity, List<MapMarker> mapMarkers) {
|
||||||
this.mapActivity = mapActivity;
|
this.mapActivity = mapActivity;
|
||||||
iconsCache = mapActivity.getMyApplication().getIconsCache();
|
iconsCache = mapActivity.getMyApplication().getUIUtilities();
|
||||||
|
updateViewCache = iconsCache.getUpdateLocationViewCache();
|
||||||
this.mapMarkers = mapMarkers;
|
this.mapMarkers = mapMarkers;
|
||||||
nightTheme = !mapActivity.getMyApplication().getSettings().isLightContent();
|
nightTheme = !mapActivity.getMyApplication().getSettings().isLightContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocation(LatLon location) {
|
|
||||||
this.location = location;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHeading(Float heading) {
|
|
||||||
this.heading = heading;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUseCenter(boolean useCenter) {
|
|
||||||
this.useCenter = useCenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setScreenOrientation(int screenOrientation) {
|
|
||||||
this.screenOrientation = screenOrientation;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MapMarkerItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public MapMarkerItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
@ -98,11 +80,8 @@ public class CoordinateInputAdapter extends RecyclerView.Adapter<MapMarkerItemVi
|
||||||
holder.divider.setVisibility((!singleItem && !lastItem) ? View.VISIBLE : View.GONE);
|
holder.divider.setVisibility((!singleItem && !lastItem) ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
holder.title.setText(mapMarker.getName(mapActivity));
|
holder.title.setText(mapMarker.getName(mapActivity));
|
||||||
|
mapActivity.getMyApplication().getUIUtilities().updateLocationView(updateViewCache,
|
||||||
DashLocationFragment.updateLocationView(useCenter, location,
|
holder.iconDirection, holder.distance, mapMarker.getLatitude(), mapMarker.getLongitude());
|
||||||
heading, holder.iconDirection, R.drawable.ic_direction_arrow,
|
|
||||||
holder.distance, new LatLon(mapMarker.getLatitude(), mapMarker.getLongitude()),
|
|
||||||
screenOrientation, mapActivity.getMyApplication(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -8,7 +8,7 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
|
import net.osmand.plus.FavouritesDbHelper.FavoriteGroup;
|
||||||
import net.osmand.plus.IconsCache;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue