Merge branch 'master' of https://github.com/osmandapp/Osmand
|
@ -48,4 +48,7 @@
|
|||
<string name="preferred_locale_no_translate">Display language</string>
|
||||
<string name="system_locale_no_translate">Device language</string>
|
||||
<string name="osmo">OsMo</string>
|
||||
<string name="tag_poi_amenity">amenity</string>
|
||||
<string name="tag_poi_name">name</string>
|
||||
|
||||
</resources>
|
||||
|
|
BIN
OsmAnd/res/drawable-large-hdpi/map_favorite.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_note_small.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_pin_context_menu.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_pin_poi_small.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_white_favorite_shield.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_white_orange_poi_shield.png
Normal file
After Width: | Height: | Size: 4 KiB |
After Width: | Height: | Size: 2.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_white_shield.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_white_shield_small.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_favorite.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_note_small.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_pin_context_menu.png
Normal file
After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_pin_poi_small.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_white_favorite_shield.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_white_orange_poi_shield.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_white_shield.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_white_shield_small.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
OsmAnd/res/drawable-large/map_favorite.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
OsmAnd/res/drawable-large/map_note_small.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-large/map_pin_context_menu.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
OsmAnd/res/drawable-large/map_pin_poi_small.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
OsmAnd/res/drawable-large/map_white_favorite_shield.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
OsmAnd/res/drawable-large/map_white_orange_poi_shield.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
OsmAnd/res/drawable-large/map_white_orange_poi_shield_small.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-large/map_white_shield.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large/map_white_shield_small.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -1887,7 +1887,7 @@
|
|||
<string name="opening_at">Адчыняецца ў</string>
|
||||
<string name="closing_at">Зачыняецца ў</string>
|
||||
<string name="tab_title_advanced">Пашыранае</string>
|
||||
<string name="tag_poi_name">назва</string>
|
||||
|
||||
<string name="contact_info">Кантакты</string>
|
||||
<string name="description">Апісаньне</string>
|
||||
<string name="add_opening_hours">Дадаць гадзіны працы</string>
|
||||
|
@ -1896,7 +1896,7 @@
|
|||
<string name="av_locations_descr">GPX-файл зь мецазнаходжаньнем заўваг</string>
|
||||
<string name="av_locations">Месцазнаходжаньні</string>
|
||||
<string name="number_of_rows_in_dash">Колькасьць радкоў на галоўным экране %1$s</string>
|
||||
<string name="tag_poi_amenity">грамадзкі аб\'ект</string>
|
||||
|
||||
<string name="poi_action_delete">выдаліць</string>
|
||||
<string name="working_days">Працоўныя дні</string>
|
||||
<string name="recent_places">Нядаўнія месцы</string>
|
||||
|
|
|
@ -1963,7 +1963,7 @@ OsmAnd е с отворен код и активно да се развива.
|
|||
<string name="lang_zh_TW">традиционен китайски</string>
|
||||
<string name="error_message_pattern">Грешка: {0}</string>
|
||||
<string name="app_name_osmand">OsmAnd</string>
|
||||
<string name="tag_poi_name">име</string>
|
||||
|
||||
<string name="description">Описание</string>
|
||||
<string name="poi_dialog_poi_type">Тип POI</string>
|
||||
<string name="working_days">Работни дни</string>
|
||||
|
|
|
@ -1901,13 +1901,13 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
|
|||
<string name="closing_at">Tanquen a les</string>
|
||||
<string name="av_locations">Ubicacions</string>
|
||||
<string name="av_locations_descr">Fitxer GPX amb posicions comentades</string>
|
||||
<string name="tag_poi_name">nom</string>
|
||||
|
||||
<string name="contact_info">Informació de contacte</string>
|
||||
<string name="description">Descripció</string>
|
||||
<string name="add_opening_hours">Afegeix l\'horari de servei</string>
|
||||
<string name="poi_dialog_poi_type">Tipus de PDI</string>
|
||||
<string name="please_specify_poi_type">Especifiqueu el tipus de PDI.</string>
|
||||
<string name="tag_poi_amenity">instal·lació comunitària</string>
|
||||
|
||||
<string name="number_of_rows_in_dash">Nombre de files al tauler %1$s</string>
|
||||
<string name="poi_action_delete">Suprimeix</string>
|
||||
<string name="working_days">Dies laborables</string>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="switch_to_raster_map_to_see">Vektorové mapy toto místo neobsahují. Mapová data můžete stáhnout v Nastaveních (Spravovat mapové soubory), nebo se přepněte na online mapy.</string>
|
||||
|
||||
|
@ -1852,7 +1852,7 @@
|
|||
<string name="tab_title_advanced">Rozšířené</string>
|
||||
<string name="building_number">Číslo domu</string>
|
||||
<string name="next_proceed">Další</string>
|
||||
<string name="tag_poi_name">název</string>
|
||||
|
||||
<string name="poi_dialog_poi_type">Typ POI</string>
|
||||
<string name="number_of_rows_in_dash">Počet řádků v bloku %1$s</string>
|
||||
<string name="saved_at_time">Úspěšně uloženo na: %1$s</string>
|
||||
|
@ -1886,7 +1886,7 @@
|
|||
<string name="lang_gl">Galicijsky</string>
|
||||
<string name="lang_et">Estonsky</string>
|
||||
<string name="lang_ceb">Cebuansky</string>
|
||||
<string name="tag_poi_amenity">občanská vybavenost</string>
|
||||
|
||||
<string name="opening_at">Otevřeno od</string>
|
||||
<string name="closing_at">Otevřeno do</string>
|
||||
<string name="count_of_lines">Počet řádků</string>
|
||||
|
@ -1973,9 +1973,9 @@
|
|||
<string name="map_viewing_item">Prohlížení mapy</string>
|
||||
<string name="search_on_the_map_item">Hledání na mapě</string>
|
||||
<string name="planning_trip_item">Plánování cesty</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Vrstevnice a stínování kopců</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">OsmAnd lyžařské mapy</string>
|
||||
<string name="audio_video_note_item">Audio/video poznámky</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Instalace a řešení problémů</string>
|
||||
<string name="techical_articles_item">Technické články</string>
|
||||
<string name="versions_item">Verze</string>
|
||||
|
@ -1983,5 +1983,5 @@
|
|||
<string name="contact_us">Kontaktujte nás</string>
|
||||
<string name="osm_edit_created_poi">Vytvořen OSM POI</string>
|
||||
<string name="osm_edit_created_bug">Vytvořena OSM chyba</string>
|
||||
<string name="map_legend">Legenda mapy</string>
|
||||
<string name="map_legend">Legenda mapy</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="srtm_paid_version_msg">Overvej at købe Højdekurve udvidelsen (\'Contour lines\') på Google Play for at støtte den videre udvikling.</string>
|
||||
<string name="av_def_action_video">Optag video</string>
|
||||
|
@ -1890,7 +1890,7 @@
|
|||
<string name="av_locations_descr">GPX-fil med placeringsnoter</string>
|
||||
<string name="av_locations">Placeringer</string>
|
||||
<string name="tab_title_basic">Grundlæggende</string>
|
||||
<string name="tag_poi_name">navn</string>
|
||||
|
||||
<string name="tag_poi_amenity">facilitet</string>
|
||||
<string name="contact_info">Kontaktoplysninger</string>
|
||||
<string name="description">Beskrivelse</string>
|
||||
|
@ -1992,9 +1992,9 @@
|
|||
<string name="map_viewing_item">Kortvisning</string>
|
||||
<string name="search_on_the_map_item">Søgning på kortet</string>
|
||||
<string name="planning_trip_item">Turplanlægning</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Højdekurver og reliefoverlejring</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Skikort</string>
|
||||
<string name="audio_video_note_item">Audio-/videonoter</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Installation og fejlfinding</string>
|
||||
<string name="techical_articles_item">Tekniske artikler</string>
|
||||
<string name="versions_item">Versioner</string>
|
||||
|
@ -2002,5 +2002,6 @@
|
|||
<string name="contact_us">Kontakt os</string>
|
||||
<string name="osm_edit_created_poi">Oprettede OSM IP</string>
|
||||
<string name="osm_edit_created_bug">Oprettede OSM fejlregistrering</string>
|
||||
<string name="map_legend">Signaturforklaring</string>
|
||||
<string name="map_legend">Signaturforklaring</string>
|
||||
<string name="shared_string_upload">Overfør</string>
|
||||
</resources>
|
||||
|
|
|
@ -1906,7 +1906,7 @@
|
|||
<string name="closing_at">Cierran a las</string>
|
||||
<string name="av_locations_descr">Archivo GPX con notas de ubicaciones</string>
|
||||
<string name="av_locations">Ubicaciones</string>
|
||||
<string name="tag_poi_name">nombre</string>
|
||||
|
||||
<string name="tag_poi_amenity">servicio</string>
|
||||
<string name="contact_info">Información de contacto</string>
|
||||
<string name="description">Descripción</string>
|
||||
|
@ -2006,9 +2006,9 @@
|
|||
<string name="map_viewing_item">Vista del mapa</string>
|
||||
<string name="search_on_the_map_item">Busqueda en el mapa</string>
|
||||
<string name="planning_trip_item">Planificación de viaje</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mapas de curvas de nivel y sombreado</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Mapas de esquí de OsmAnd</string>
|
||||
<string name="audio_video_note_item">Notas multimedia</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Instalación y solución de problemas</string>
|
||||
<string name="techical_articles_item">Artículos técnicos</string>
|
||||
<string name="versions_item">Versiones</string>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
|
||||
<string name="layer_map_appearance">Configurar pantalla</string>
|
||||
<string name="show_lanes">Mostrar carriles</string>
|
||||
<string name="avoid_unpaved">Evitar carreteras no pavimentadas</string>
|
||||
|
@ -2026,7 +2025,7 @@
|
|||
<string name="closing_at">Cierran a las</string>
|
||||
<string name="av_locations_descr">Archivo GPX con ubicaciones de nota</string>
|
||||
<string name="av_locations">Ubicaciones</string>
|
||||
<string name="tag_poi_name">nombre</string>
|
||||
|
||||
<string name="tag_poi_amenity">servicio</string>
|
||||
<string name="contact_info">Información de contacto</string>
|
||||
<string name="description">Descripción</string>
|
||||
|
@ -2125,9 +2124,9 @@
|
|||
<string name="map_viewing_item">Vista del mapa</string>
|
||||
<string name="search_on_the_map_item">Búsqueda en el mapa</string>
|
||||
<string name="planning_trip_item">Planeando un viaje</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mapas de curvas de nivel y sombreado</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Mapas de esquí de OsmAnd</string>
|
||||
<string name="audio_video_note_item">Notas multimedia</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Instalación y solución de problemas</string>
|
||||
<string name="techical_articles_item">Artículos técnicos</string>
|
||||
<string name="versions_item">Versiones</string>
|
||||
|
@ -2135,5 +2134,5 @@
|
|||
<string name="contact_us">Contáctenos</string>
|
||||
<string name="osm_edit_created_poi">PDI de OSM creado</string>
|
||||
<string name="osm_edit_created_bug">Nota OSM creada</string>
|
||||
<string name="map_legend">Leyenda del mapa</string>
|
||||
<string name="map_legend">Leyenda del mapa</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources><string name="add_opening_hours">Lisa lahioleku ajad</string>
|
||||
<string name="description">Kirjeldus</string>
|
||||
<string name="contact_info">Kontakti info</string>
|
||||
<string name="tag_poi_name">nimi</string>
|
||||
|
||||
<string name="building_number">Hoone Number</string>
|
||||
<string name="shared_string_skip">Jäta vahele</string>
|
||||
<string name="poi_action_add">lisa</string>
|
||||
|
|
|
@ -867,7 +867,7 @@
|
|||
<string name="show_gpx">Näytä GPX</string>
|
||||
<string name="favourites">Suosikit</string>
|
||||
<string name="description">Kuvaus</string>
|
||||
<string name="tag_poi_name">nimi</string>
|
||||
|
||||
<string name="closing_at">Sulkeutuu</string>
|
||||
<string name="opening_at">Avautuu</string>
|
||||
<string name="address_unknown">Osoitetta ei tiedetä vielä</string>
|
||||
|
|
|
@ -1956,7 +1956,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
<string name="next_proceed">Suivant</string>
|
||||
<string name="opening_at">Ouverture à</string>
|
||||
<string name="closing_at">Fermeture à</string>
|
||||
<string name="tag_poi_name">nom</string>
|
||||
|
||||
<string name="description">Description</string>
|
||||
<string name="add_opening_hours">Ajouter des heures d\'ouverture</string>
|
||||
<string name="poi_dialog_poi_type">Type de PI</string>
|
||||
|
@ -1978,7 +1978,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
<string name="shared_string_card_was_hidden">La carte a été masquée</string>
|
||||
<string name="routing_attr_avoid_shuttle_train_name">Éviter les trains-navettes</string>
|
||||
<string name="av_locations_descr">Fichier GPX avec notes</string>
|
||||
<string name="tag_poi_amenity">aménité</string>
|
||||
|
||||
<string name="simulate_your_location_stop_descr">Arrêter de simuler votre position</string>
|
||||
<string name="simulate_your_location_descr">Simuler à partir d\'un fichier GPX ou d\'une route calculée</string>
|
||||
<string name="are_you_sure">Etes-vous certain ?</string>
|
||||
|
@ -2065,9 +2065,9 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
<string name="map_viewing_item">Affichage de la carte</string>
|
||||
<string name="search_on_the_map_item">Rechercher de carte</string>
|
||||
<string name="planning_trip_item">Préparer un trajet</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Cartes avec relief et courbes de niveau</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Cartes de ski OsmAnd</string>
|
||||
<string name="osm_editing_item">Contribution OSM</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Installation et débogage</string>
|
||||
<string name="techical_articles_item">Articles techniques</string>
|
||||
<string name="versions_item">Versions</string>
|
||||
|
@ -2076,5 +2076,6 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
|
||||
<string name="osm_edit_created_poi">PI créés sur OSM</string>
|
||||
<string name="osm_edit_created_bug">Bugs déclarés sur OSM</string>
|
||||
<string name="map_legend">Légende</string>
|
||||
</resources>
|
||||
<string name="map_legend">Légende</string>
|
||||
<string name="shared_string_upload">Téléchargement</string>
|
||||
</resources>
|
||||
|
|
|
@ -1791,7 +1791,7 @@
|
|||
<string name="tab_title_advanced">Avanzado</string>
|
||||
<string name="building_number">Número de versión</string>
|
||||
<string name="next_proceed">Seguinte</string>
|
||||
<string name="tag_poi_name">nome</string>
|
||||
|
||||
<string name="contact_info">información de contacto</string>
|
||||
<string name="description">Descrición</string>
|
||||
<string name="poi_dialog_poi_type">Tipo de PDI</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
|
||||
<string name="send_files_to_osm">GPX fájl küldése OSM-re?</string>
|
||||
<string name="gpx_visibility_txt">Láthatóság</string>
|
||||
<string name="gpx_tags_txt">Címkék</string>
|
||||
|
@ -1876,7 +1875,7 @@
|
|||
<string name="building_number">Házszám</string>
|
||||
<string name="opening_at">Nyitás</string>
|
||||
<string name="closing_at">Zárás</string>
|
||||
<string name="tag_poi_name">név</string>
|
||||
|
||||
<string name="tag_poi_amenity">szolgáltatás</string>
|
||||
<string name="contact_info">Elérhetőségek</string>
|
||||
<string name="description">Leírás</string>
|
||||
|
@ -1976,9 +1975,9 @@
|
|||
<string name="map_viewing_item">Térkép böngészése</string>
|
||||
<string name="search_on_the_map_item">Keresés a térképen</string>
|
||||
<string name="planning_trip_item">Utazás tervezése</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Szintvonal és domborzatárnyékolás</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">OsmAnd sítérkép</string>
|
||||
<string name="audio_video_note_item">Hang- és videójegyzetek</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Telepítés és hibaelhárítás</string>
|
||||
<string name="techical_articles_item">Technikai cikkek</string>
|
||||
<string name="versions_item">Verziók</string>
|
||||
|
|
|
@ -1922,7 +1922,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="closing_at">Chiude alle</string>
|
||||
<string name="av_locations_descr">File GPX con note locali</string>
|
||||
<string name="av_locations">Località</string>
|
||||
<string name="tag_poi_name">nome</string>
|
||||
|
||||
<string name="tag_poi_amenity">amenità</string>
|
||||
<string name="contact_info">Informazioni di contatto</string>
|
||||
<string name="description">Descrizione</string>
|
||||
|
@ -2023,14 +2023,16 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="map_viewing_item">Visualizzazione mappa</string>
|
||||
<string name="search_on_the_map_item">Ricerca sulla mappa</string>
|
||||
<string name="planning_trip_item">Pianifica un viaggio</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mappe linee di livello e ombreggiamento rilievi</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Mappe sci OsmAnd</string>
|
||||
<string name="audio_video_note_item">Note audio/video</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Installazione e soluzione dei problemi</string>
|
||||
<string name="techical_articles_item">Articoli tecnici</string>
|
||||
<string name="versions_item">Versioni</string>
|
||||
<string name="contact_us">Contattaci</string>
|
||||
<string name="world_map_download_descr">La mappa di base (copertura mondiale a piccoli livelli di zoom) è mancante o non aggiornata. Valutate di scaricare la mappa mondiale di base per un ambiente completo.</string>
|
||||
<string name="poll">Sondaggio</string>
|
||||
|
||||
<string name="map_legend">Legenda della mappa</string>
|
||||
</resources>
|
||||
<string name="shared_string_upload">Carica</string>
|
||||
<string name="feedback">Feedback</string>
|
||||
</resources>
|
||||
|
|
|
@ -1962,7 +1962,7 @@ POIの更新は利用できません</string>
|
|||
<string name="next_proceed">次</string>
|
||||
<string name="opening_at">~で開く</string>
|
||||
<string name="closing_at">~で閉じる</string>
|
||||
<string name="tag_poi_name">名称</string>
|
||||
|
||||
<string name="tag_poi_amenity">施設</string>
|
||||
<string name="contact_info">連絡先</string>
|
||||
<string name="description">説明</string>
|
||||
|
|
|
@ -2149,7 +2149,7 @@
|
|||
<string name="next_proceed">다음</string>
|
||||
<string name="opening_at">~ 열기</string>
|
||||
<string name="closing_at">에 닫기</string>
|
||||
<string name="tag_poi_name">이름</string>
|
||||
|
||||
<string name="tag_poi_amenity">시설</string>
|
||||
<string name="contact_info">연락처 정보</string>
|
||||
<string name="description">설명</string>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
|
||||
<string name="starting_point_too_far">Pradžios taškas yra per toli nuo artimiausio kelio.</string>
|
||||
<string name="shared_location">Bendrinta vieta</string>
|
||||
<string name="osmand_parking_warning">Dėmesio</string>
|
||||
|
@ -1877,7 +1876,7 @@
|
|||
<string name="av_locations">Vietovės</string>
|
||||
<string name="building_number">Pastato numeris</string>
|
||||
<string name="next_proceed">Toliau</string>
|
||||
<string name="tag_poi_name">pavadinimas</string>
|
||||
|
||||
<string name="description">Aprašymas</string>
|
||||
<string name="add_opening_hours">Pridėti darbo valandas</string>
|
||||
<string name="poi_dialog_poi_type">LV tipas</string>
|
||||
|
@ -1957,7 +1956,7 @@
|
|||
<string name="faq_item">DUK</string>
|
||||
<string name="search_on_the_map_item">Ieškoti žemėlapyje</string>
|
||||
<string name="planning_trip_item">Kelionės planavimas</string>
|
||||
<string name="trip_recording_tool_item">Kelionės įrašymo įrankis</string>
|
||||
|
||||
<string name="osm_editing_item">OSM redagavimas</string>
|
||||
<string name="instalation_troubleshooting_item">Diegimas ir problemų sprendimas</string>
|
||||
<string name="versions_item">Versijos</string>
|
||||
|
@ -1974,9 +1973,9 @@
|
|||
<string name="faq_item_description">Kaip naudotis įskiepiais</string>
|
||||
<string name="map_viewing_item">Žemėlapio peržiūra</string>
|
||||
|
||||
<string name="audio_video_note_item">Garso/vaizdo pastabos</string>
|
||||
|
||||
<string name="techical_articles_item">Techniniai straipsniai</string>
|
||||
<string name="poll">apklausa</string>
|
||||
|
||||
<string name="osm_edit_created_poi"/>
|
||||
<string name="osm_edit_created_bug">Sukurtas OSM riktas</string>
|
||||
</resources>
|
||||
</resources>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
|
||||
<string name="rendering_attr_roadColors_description">Velg fargeskjema for veier:</string>
|
||||
<string name="rendering_attr_roadColors_name">Veifargeskjema</string>
|
||||
<string name="map_widget_show_destination_arrow">Vis retning til målet</string>
|
||||
|
@ -1378,7 +1377,7 @@
|
|||
<string name="osmand_running_in_background">Kjører i bakgrunnen</string>
|
||||
<string name="favourites_edit_dialog_title">Favorittinformasjon</string>
|
||||
<string name="next_proceed">Neste</string>
|
||||
<string name="tag_poi_name">navn</string>
|
||||
|
||||
<string name="description">Beskrivelse</string>
|
||||
<string name="add_opening_hours">Legg til åpningstider</string>
|
||||
<string name="poi_dialog_poi_type">Interessepunkttype</string>
|
||||
|
@ -1416,7 +1415,7 @@
|
|||
<string name="activate_srtm_plugin">Aktiver programtillegg SRTM</string>
|
||||
<string name="opening_at">Åpner</string>
|
||||
<string name="closing_at">Lukker</string>
|
||||
<string name="tag_poi_amenity">fasilitet</string>
|
||||
|
||||
<string name="contact_info">Kontaktinformasjon</string>
|
||||
<string name="recent_places">Nylige steder</string>
|
||||
<string name="saved_at_time">Vellykket lagret: %1$s</string>
|
||||
|
@ -1430,7 +1429,7 @@
|
|||
<string name="faq_item_description">Hvordan bruke programtillegg</string>
|
||||
<string name="map_viewing_item">Kartvisning</string>
|
||||
<string name="search_on_the_map_item">Kartsøking</string>
|
||||
<string name="osmand_ski_maps_item">OsmAnd skikart</string>
|
||||
|
||||
<string name="audio_video_note_item">Audio/video-notater</string>
|
||||
<string name="versions_item">Versjoner</string>
|
||||
<string name="contact_us">Kontakt oss</string>
|
||||
|
|
|
@ -2056,7 +2056,7 @@ Afganistan, Afryka Południowa, Albania, Algieria, Andora, Angola, Anguilla, Ant
|
|||
<string name="next_proceed">Następny</string>
|
||||
<string name="opening_at">Otwarte od</string>
|
||||
<string name="closing_at">Zamknięte od</string>
|
||||
<string name="tag_poi_name">Nazwa</string>
|
||||
|
||||
<string name="tag_poi_amenity">Udogodnienia</string>
|
||||
<string name="contact_info">Informacje kontaktowe</string>
|
||||
<string name="add_opening_hours">Dodaj godziny otwarcia</string>
|
||||
|
|
|
@ -1780,13 +1780,13 @@
|
|||
<string name="closing_at">Fecha em</string>
|
||||
<string name="av_locations_descr">Arquivo GPX com notas de posição</string>
|
||||
<string name="av_locations">Posições</string>
|
||||
<string name="tag_poi_name">nome</string>
|
||||
|
||||
<string name="contact_info">Informações de contato</string>
|
||||
<string name="description">Descrição</string>
|
||||
<string name="add_opening_hours">Adicionar o horário de funcionamento</string>
|
||||
<string name="poi_dialog_poi_type">Tipo de POI</string>
|
||||
<string name="number_of_rows_in_dash">Número de linhas no traço de %1$s</string>
|
||||
<string name="tag_poi_amenity">facilidade</string>
|
||||
|
||||
<string name="please_specify_poi_type">Por favor, especifique tipo de POI.</string>
|
||||
<string name="working_days">Dias úteis</string>
|
||||
<string name="recent_places">Locais recentes</string>
|
||||
|
|
|
@ -913,7 +913,7 @@
|
|||
<string name="poi_crossing_unmarked">Неразмеченный</string>
|
||||
|
||||
<string name="poi_population">Население</string>
|
||||
<string name="poi_start_date">Дата постройки/основания</string>
|
||||
<string name="poi_start_date">Дата открытия</string>
|
||||
<string name="poi_wheelchair">Доступно для инвалидных кресел</string>
|
||||
<string name="poi_wheelchair_no">Недоступно для инвалидных кресел</string>
|
||||
<string name="poi_wheelchair_limited">Инвалидные кресла: ограничено</string>
|
||||
|
|
|
@ -1864,12 +1864,12 @@
|
|||
<string name="closing_at">Serrat a sas</string>
|
||||
<string name="av_locations_descr">Documentu GPX cun notas locales</string>
|
||||
<string name="av_locations">Localidades</string>
|
||||
<string name="tag_poi_name">nùmene</string>
|
||||
|
||||
<string name="contact_info">Informatziones de cuntatu</string>
|
||||
<string name="description">Descritzione</string>
|
||||
<string name="add_opening_hours">Annanghe s’oràriu de abertura</string>
|
||||
<string name="poi_dialog_poi_type">Casta de PDI</string>
|
||||
<string name="tag_poi_amenity">atratzione</string>
|
||||
|
||||
<string name="please_specify_poi_type">Dislinda casta de PDI.</string>
|
||||
<string name="number_of_rows_in_dash">Nùmeru de rigas in su pannellu %1$s</string>
|
||||
<string name="poi_action_delete">burra</string>
|
||||
|
@ -1965,9 +1965,9 @@
|
|||
<string name="map_viewing_item">Visione de sa mapa</string>
|
||||
<string name="search_on_the_map_item">Chircare in sa mapa</string>
|
||||
<string name="planning_trip_item">Pranificare unu biàgiu</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mapas de sas lìnias de livellu e de sas umbraduras de sos rilievos</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Mapas pro iscì OsmAnd</string>
|
||||
<string name="audio_video_note_item">Notas àudio/vìdeu</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Installatzione e solutziones a sos problemas</string>
|
||||
<string name="techical_articles_item">Artìculos tècnicos</string>
|
||||
<string name="versions_item">Versiones</string>
|
||||
|
@ -1976,4 +1976,5 @@
|
|||
<string name="osm_edit_created_poi">PDI de OSM creadu</string>
|
||||
<string name="osm_edit_created_bug">Nota de errore de OSM creada</string>
|
||||
<string name="map_legend">Legenda de sa mapa</string>
|
||||
</resources>
|
||||
<string name="shared_string_upload">Càrriga</string>
|
||||
</resources>
|
||||
|
|
|
@ -2031,7 +2031,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="next_proceed">Ďalší</string>
|
||||
<string name="opening_at">Otvára o</string>
|
||||
<string name="closing_at">Zatvára o</string>
|
||||
<string name="tag_poi_name">názov</string>
|
||||
|
||||
<string name="tag_poi_amenity">občianska vybavenosť</string>
|
||||
<string name="contact_info">Kontaktné údaje</string>
|
||||
<string name="description">Popis</string>
|
||||
|
@ -2133,13 +2133,13 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="map_viewing_item">Prezeranie mapy</string>
|
||||
<string name="search_on_the_map_item">Hľadanie na mape</string>
|
||||
<string name="planning_trip_item">Plánovanie výletu</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">Mapy vrstevníc a tieňované svahy</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">Lyžiarske mapy</string>
|
||||
<string name="audio_video_note_item">Zvukové/video poznámky</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Inštalácia a riešenie problémov</string>
|
||||
<string name="techical_articles_item">Technické články</string>
|
||||
<string name="versions_item">Verzie</string>
|
||||
<string name="feedback">Anketa</string>
|
||||
<string name="contact_us">Kontaktujte nás</string>
|
||||
<string name="map_legend">Vysvetlivky k mape</string>
|
||||
<string name="map_legend">Vysvetlivky k mape</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="search_button">Poišči</string>
|
||||
<string name="search_activity">Iskanje podatkov</string>
|
||||
|
||||
|
||||
<string name="choose_available_region">Izberi regijo s seznama</string>
|
||||
<string name="incremental_search_city">Sprotno iskanje mest</string>
|
||||
<string name="searchpoi_activity">Izberi točko POI</string>
|
||||
|
@ -1872,7 +1871,7 @@
|
|||
<string name="poi_action_delete">izbriši</string>
|
||||
<string name="tab_title_basic">Osnovno</string>
|
||||
<string name="tab_title_advanced">Napredno</string>
|
||||
<string name="tag_poi_name">ime</string>
|
||||
|
||||
<string name="tag_poi_amenity">prednost</string>
|
||||
<string name="contact_info">Podatki stika</string>
|
||||
<string name="description">Opis</string>
|
||||
|
@ -1966,7 +1965,7 @@
|
|||
<string name="map_viewing_item">Pogled zemljevida</string>
|
||||
<string name="search_on_the_map_item">Iskanje po zemljevidu</string>
|
||||
<string name="planning_trip_item">Planiranje potovanja</string>
|
||||
<string name="osmand_ski_maps_item">Smučarski zemljevidi OsmAnd</string>
|
||||
|
||||
<string name="audio_video_note_item">Zvočni in video zaznamki</string>
|
||||
<string name="instalation_troubleshooting_item">Namestitev in odpravljanje napak</string>
|
||||
<string name="techical_articles_item">Tehnični članki</string>
|
||||
|
@ -1978,7 +1977,6 @@
|
|||
<string name="show_on_start_description">Možnost \'brez\' zažene v pogledu zemljevida</string>
|
||||
<string name="enter_country_name">Vpis imena države</string>
|
||||
|
||||
<string name="trip_recording_tool_item">Orodje za beleženje poti</string>
|
||||
|
||||
<string name="map_legend">Legenda zemljevida</string>
|
||||
<string name="map_legend">Legenda zemljevida</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
<string name="screen_is_locked">För att låsa upp skärmen tryck på låsikonen</string>
|
||||
<string name="ChooseCountry">Välj land</string>
|
||||
|
@ -1860,7 +1860,7 @@
|
|||
<string name="contact_info">Kontaktinformation</string>
|
||||
<string name="dahboard_options_dialog_title">Konfigurera panelen</string>
|
||||
<string name="commit_poi">Skicka in POI</string>
|
||||
<string name="tag_poi_name">namn</string>
|
||||
|
||||
<string name="tag_poi_amenity">service</string>
|
||||
<string name="number_of_rows_in_dash">Antal rader i panelen: %1$s</string>
|
||||
<string name="please_specify_poi_type">Ange typ av POI.</string>
|
||||
|
@ -1952,9 +1952,9 @@
|
|||
<string name="map_viewing_item">Kartvisning</string>
|
||||
<string name="search_on_the_map_item">Söka på kartan</string>
|
||||
<string name="planning_trip_item">Att planera en resa</string>
|
||||
<string name="trip_recording_tool_item">Verktyg för inspelning av resa</string>
|
||||
|
||||
<string name="nautical_charts_item">Sjökort</string>
|
||||
<string name="osm_editing_item">OSM-redigering</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">Installation och problemlösning</string>
|
||||
<string name="techical_articles_item">Tekniska artiklar</string>
|
||||
<string name="versions_item">Versioner</string>
|
||||
|
@ -1962,4 +1962,6 @@
|
|||
<string name="osm_edit_created_poi">Skapat en OSM POI</string>
|
||||
<string name="osm_edit_created_bug">Skapat en OSM-bugg</string>
|
||||
<string name="world_map_download_descr">Baskarta över världen (täcker hela världen med låg zoomningsgrad) saknas eller är gammal. Hämta gärna denna karta till din enhet.</string>
|
||||
</resources>
|
||||
<string name="shared_string_upload">Skicka</string>
|
||||
<string name="map_legend">Teckenförklaring</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="rendering_attr_roadColors_description">選擇道路的色彩調配:</string>
|
||||
<string name="rendering_attr_roadColors_name">道路的色彩調配</string>
|
||||
|
@ -1850,7 +1850,7 @@
|
|||
<string name="next_proceed">下頁</string>
|
||||
<string name="av_locations_descr">GPX 檔案加上地點注解</string>
|
||||
<string name="av_locations">地點</string>
|
||||
<string name="tag_poi_name">名稱</string>
|
||||
|
||||
<string name="tag_poi_amenity">便利設施</string>
|
||||
<string name="contact_info">連絡資訊</string>
|
||||
<string name="description">記述</string>
|
||||
|
@ -1950,9 +1950,9 @@
|
|||
<string name="map_viewing_item">地圖檢視</string>
|
||||
<string name="search_on_the_map_item">地圖查詢中</string>
|
||||
<string name="planning_trip_item">規劃一次旅程</string>
|
||||
<string name="contour_lines_and_hillshade_maps_item">等高線和山體陰影地圖</string>
|
||||
|
||||
<string name="osmand_ski_maps_item">OsmAnd 滑雪地圖</string>
|
||||
<string name="audio_video_note_item">音訊/視訊注解</string>
|
||||
|
||||
<string name="instalation_troubleshooting_item">安裝和疑難排除</string>
|
||||
<string name="techical_articles_item">技術文章</string>
|
||||
<string name="versions_item">版本</string>
|
||||
|
@ -1960,5 +1960,6 @@
|
|||
<string name="contact_us">聯絡我們</string>
|
||||
<string name="osm_edit_created_poi">建立 OSM 的興趣點</string>
|
||||
<string name="osm_edit_created_bug">建立 OSM 的錯誤</string>
|
||||
<string name="map_legend">地圖圖例</string>
|
||||
</resources>
|
||||
<string name="map_legend">地圖圖例</string>
|
||||
<string name="shared_string_upload">上傳</string>
|
||||
</resources>
|
|
@ -1999,8 +1999,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
|
|||
<string name="next_proceed">Next</string>
|
||||
<string name="opening_at">Opening at</string>
|
||||
<string name="closing_at">Closing at</string>
|
||||
<string name="tag_poi_name">name</string>
|
||||
<string name="tag_poi_amenity">amenity</string>
|
||||
<string name="contact_info">Contact info</string>
|
||||
<string name="description">Description</string>
|
||||
<string name="add_opening_hours">Add opening hours</string>
|
||||
|
|
|
@ -228,7 +228,7 @@ public class FavoritesListFragment extends OsmAndListFragment implements SearchA
|
|||
}
|
||||
((TextView) row.findViewById(R.id.group_name)).setText(favorite.getCategory());
|
||||
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, favorite.getColor(), 0));
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, favorite.getColor(), false));
|
||||
DashLocationFragment.updateLocationView(!searchAroundLocation, location, heading, direction, distanceText,
|
||||
favorite.getLatitude(), favorite.getLongitude(), screenOrientation, app, activity);
|
||||
|
||||
|
|
|
@ -807,7 +807,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment {
|
|||
}
|
||||
});
|
||||
}
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getActivity(), model.getColor(), 0));
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getActivity(), model.getColor(), false));
|
||||
LatLon lastKnownMapLocation = getMyApplication().getSettings().getLastKnownMapLocation();
|
||||
int dist = (int) (MapUtils.getDistance(model.getLatitude(), model.getLongitude(),
|
||||
lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude()));
|
||||
|
|
|
@ -8,11 +8,12 @@ import android.graphics.Canvas;
|
|||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import net.osmand.plus.R;
|
||||
|
||||
import java.util.TreeMap;
|
||||
|
@ -25,8 +26,13 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
private Bitmap favIcon;
|
||||
private Bitmap favBackground;
|
||||
private Resources resources;
|
||||
private boolean withShadow;
|
||||
private Paint paintOuter;
|
||||
private Paint paintInnerCircle;
|
||||
private Drawable listDrawable;
|
||||
|
||||
public FavoriteImageDrawable(Context ctx, int color) {
|
||||
public FavoriteImageDrawable(Context ctx, int color, boolean withShadow) {
|
||||
this.withShadow = withShadow;
|
||||
this.resources = ctx.getResources();
|
||||
this.color = color;
|
||||
paintIcon = new Paint();
|
||||
|
@ -35,6 +41,37 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
paintBackground = new Paint();
|
||||
favIcon = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_favorite);
|
||||
favBackground = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.map_white_favorite_shield);
|
||||
|
||||
|
||||
listDrawable = getResources().getDrawable(R.drawable.ic_action_fav_dark).mutate();
|
||||
listDrawable.setColorFilter(new PorterDuffColorFilter(col, PorterDuff.Mode.SRC_IN));
|
||||
DisplayMetrics metrics = getResources().getDisplayMetrics();
|
||||
paintOuter = new Paint();
|
||||
paintOuter.setAntiAlias(true);
|
||||
paintOuter.setStyle(Style.FILL_AND_STROKE);
|
||||
paintInnerCircle = new Paint();
|
||||
paintInnerCircle.setStyle(Style.FILL_AND_STROKE);
|
||||
if(metrics != null && metrics.density > 0) {
|
||||
paintOuter.setStrokeWidth(metrics.density * 1);
|
||||
} else {
|
||||
paintOuter.setStrokeWidth(1);
|
||||
}
|
||||
// paintOuter.setColor(color == 0 || color == Color.BLACK ? 0x88555555 : color);
|
||||
paintOuter.setColor(0xffbbbbbb);
|
||||
paintInnerCircle.setColor(Color.WHITE);
|
||||
paintInnerCircle.setAntiAlias(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBoundsChange(Rect bounds) {
|
||||
super.onBoundsChange(bounds);
|
||||
|
||||
if (!withShadow) {
|
||||
Rect bs = new Rect(bounds);
|
||||
//bs.inset((int) (4 * density), (int) (4 * density));
|
||||
bs.inset(bs.width() / 4, (int) bs.height() / 4);
|
||||
listDrawable.setBounds(bs);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,8 +95,17 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
Rect bs = getBounds();
|
||||
canvas.drawBitmap(favBackground, bs.exactCenterX() - favBackground.getWidth() / 2f, bs.exactCenterY() - favBackground.getHeight() / 2f, paintBackground);
|
||||
canvas.drawBitmap(favIcon, bs.exactCenterX() - favIcon.getWidth() / 2f, bs.exactCenterY() - favIcon.getHeight() / 2f, paintIcon);
|
||||
if(withShadow) {
|
||||
canvas.drawBitmap(favBackground, bs.exactCenterX() - favBackground.getWidth() / 2f, bs.exactCenterY() - favBackground.getHeight() / 2f, paintBackground);
|
||||
canvas.drawBitmap(favIcon, bs.exactCenterX() - favIcon.getWidth() / 2f, bs.exactCenterY() - favIcon.getHeight() / 2f, paintIcon);
|
||||
} else {
|
||||
int min = Math.min(bs.width(), bs.height());
|
||||
int r = (int) (min * 4 / 10);
|
||||
int rs = (int) (r - 1);
|
||||
canvas.drawCircle(min / 2, min / 2, r, paintOuter);
|
||||
canvas.drawCircle(min / 2, min / 2, rs, paintInnerCircle);
|
||||
listDrawable.draw(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawBitmapInCenter(Canvas canvas, int x, int y) {
|
||||
|
@ -95,12 +141,12 @@ public class FavoriteImageDrawable extends Drawable {
|
|||
|
||||
private static TreeMap<Integer, FavoriteImageDrawable> cache = new TreeMap<>();
|
||||
|
||||
public static FavoriteImageDrawable getOrCreate(Context a, int color, float density) {
|
||||
public static FavoriteImageDrawable getOrCreate(Context a, int color, boolean withShadow) {
|
||||
color = color | 0xff000000;
|
||||
int hash = (color << 2) + (int) (density * 6);
|
||||
int hash = (color << 2) + (withShadow ? 1 : 0);
|
||||
FavoriteImageDrawable drawable = cache.get(hash);
|
||||
if (drawable == null) {
|
||||
drawable = new FavoriteImageDrawable(a, color);
|
||||
drawable = new FavoriteImageDrawable(a, color, withShadow);
|
||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
||||
cache.put(hash, drawable);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class DashFavoritesFragment extends DashLocationFragment {
|
|||
}
|
||||
|
||||
((ImageView) view.findViewById(R.id.favourite_icon)).setImageDrawable(FavoriteImageDrawable.getOrCreate(
|
||||
getActivity(), point.getColor(), 0));
|
||||
getActivity(), point.getColor(), false));
|
||||
DashLocationView dv = new DashLocationView(direction, label, new LatLon(point.getLatitude(),
|
||||
point.getLongitude()));
|
||||
distances.add(dv);
|
||||
|
|
|
@ -71,6 +71,8 @@ public class HelpArticleDialogFragment extends DialogFragment {
|
|||
webView.loadDataWithBaseURL("http://osmand.net", sb.toString(), null, "utf-8", null);
|
||||
}
|
||||
} else if (url != null) {
|
||||
webView.getSettings().setLoadWithOverviewMode(true);
|
||||
webView.getSettings().setUseWideViewPort(true);
|
||||
if (savedInstanceState != null) {
|
||||
webView.restoreState(savedInstanceState);
|
||||
} else {
|
||||
|
|
|
@ -683,7 +683,7 @@ public class WaypointHelper {
|
|||
R.drawable.list_intermediate;
|
||||
return uiCtx.getResources().getDrawable(i);
|
||||
} else if(type == FAVORITES || type == WAYPOINTS) {
|
||||
return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor(), 0);
|
||||
return FavoriteImageDrawable.getOrCreate(uiCtx, point.getColor(), false);
|
||||
} else if(type == ALARMS) {
|
||||
//assign alarm list icons manually for now
|
||||
if(((AlarmInfo) point).getType().toString() == "SPEED_CAMERA") {
|
||||
|
|
|
@ -20,12 +20,12 @@ import net.osmand.plus.mapcontextmenu.controllers.AudioVideoNoteMenuController;
|
|||
import net.osmand.plus.mapcontextmenu.controllers.EditPOIMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.FavouritePointMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.HistoryMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MapDataMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MyLocationMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.OsMoMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.ParkingPositionMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.PointDescriptionMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.TargetPointMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.MapDataMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.controllers.WptPtMenuController;
|
||||
import net.osmand.plus.mapcontextmenu.other.ShareMenu;
|
||||
import net.osmand.plus.osmedit.OsmPoint;
|
||||
|
|
|
@ -4,19 +4,15 @@ import android.graphics.drawable.Drawable;
|
|||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.osmedit.OpenstreetmapPoint;
|
||||
import net.osmand.plus.osmedit.OsmEditingPlugin;
|
||||
import net.osmand.plus.osmedit.OsmNotesPoint;
|
||||
import net.osmand.plus.osmedit.OsmPoint;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class FavouritePointMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), fav.getColor(), 0);
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), fav.getColor(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,7 @@ public class WptPtMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), wpt.getColor(), 0);
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity().getMyApplication(), wpt.getColor(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -210,7 +210,7 @@ public class FavoritePointEditorFragment extends PointEditorFragment {
|
|||
if (group != null) {
|
||||
color = group.color;
|
||||
}
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity(), color, getMapActivity().getMapView().getCurrentRotatedTileBox().getDensity());
|
||||
return FavoriteImageDrawable.getOrCreate(getMapActivity(), color, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -459,7 +459,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
|||
if(groupColor == 0) {
|
||||
groupColor = getMyActivity().getResources().getColor(R.color.gpx_track);
|
||||
}
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getMyActivity(), groupColor, 0));
|
||||
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(getMyActivity(), groupColor, false));
|
||||
}
|
||||
}
|
||||
row.setTag(child);
|
||||
|
|
|
@ -20,6 +20,7 @@ import android.widget.ImageButton;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.osm.edit.OSMSettings;
|
||||
import net.osmand.plus.IconsCache;
|
||||
|
@ -229,8 +230,13 @@ public class BasicEditPoiFragment extends Fragment
|
|||
linearLayout.addView(getView(i));
|
||||
}
|
||||
if (!data.isInEdit()) {
|
||||
data.putTag(OSMSettings.OSMTagKey.OPENING_HOURS.getValue(),
|
||||
openingHours.toStringNoMonths());
|
||||
String openingHoursString = openingHours.toStringNoMonths();
|
||||
if (!TextUtils.isEmpty(openingHoursString)) {
|
||||
data.putTag(OSMSettings.OSMTagKey.OPENING_HOURS.getValue(),
|
||||
openingHoursString);
|
||||
} else {
|
||||
data.removeTag(OSMSettings.OSMTagKey.OPENING_HOURS.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.PoiType;
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.osm.edit.OSMSettings;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -13,12 +16,14 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
public class EditPoiData {
|
||||
private static final Log LOG = PlatformUtil.getLog(EditPoiData.class);
|
||||
private Set<TagsChangedListener> mListeners = new HashSet<>();
|
||||
private LinkedHashMap<String, String > tagValues = new LinkedHashMap<String, String>();
|
||||
private boolean isInEdit = false;
|
||||
public final Amenity amenity;
|
||||
public static final String POI_TYPE_TAG = "poi_type_tag";
|
||||
|
||||
private boolean hasChangesBeenMade = false;
|
||||
|
||||
public EditPoiData(Amenity amenity, Node node, Map<String, PoiType> allTranslatedSubTypes) {
|
||||
this.amenity = amenity;
|
||||
initTags(node, allTranslatedSubTypes);
|
||||
|
@ -45,8 +50,8 @@ public class EditPoiData {
|
|||
amenity.getPhone());
|
||||
tryAddTag(OSMSettings.OSMTagKey.WEBSITE.getValue(),
|
||||
amenity.getSite());
|
||||
for (String tag : node.getTagKeySet()) {
|
||||
tryAddTag(tag, node.getTag(tag));
|
||||
for (String tag : amenity.getAdditionalInfo().keySet()) {
|
||||
tryAddTag(tag, amenity.getAdditionalInfo(tag));
|
||||
}
|
||||
String subType = amenity.getSubType();
|
||||
String key;
|
||||
|
@ -118,6 +123,9 @@ public class EditPoiData {
|
|||
|
||||
|
||||
private void notifyDatasetChanged(String tag) {
|
||||
if (mListeners.size() > 0) {
|
||||
hasChangesBeenMade = true;
|
||||
}
|
||||
for (TagsChangedListener listener : mListeners) {
|
||||
listener.onTagsChanged(tag);
|
||||
}
|
||||
|
@ -136,4 +144,8 @@ public class EditPoiData {
|
|||
void onTagsChanged(String tag);
|
||||
|
||||
}
|
||||
|
||||
public boolean hasChangesBeenMade() {
|
||||
return hasChangesBeenMade;
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ import android.widget.EditText;
|
|||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.Amenity;
|
||||
|
@ -63,7 +64,6 @@ import net.osmand.util.Algorithms;
|
|||
import org.apache.commons.logging.Log;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -78,7 +78,6 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
|
||||
private EditPoiData editPoiData;
|
||||
private ViewPager viewPager;
|
||||
private boolean isLocalEdit;
|
||||
private AutoCompleteTextView poiTypeEditText;
|
||||
private Node node;
|
||||
private Map<String, PoiType> allTranslatedSubTypes;
|
||||
|
@ -96,7 +95,6 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
} else if (!settings.isInternetConnectionAvailable(true)) {
|
||||
mOpenstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);
|
||||
} else {
|
||||
isLocalEdit = false;
|
||||
mOpenstreetmapUtil = new OpenstreetmapRemoteUtil(activity);
|
||||
}
|
||||
|
||||
|
@ -137,7 +135,7 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
dismissCheckForChanges();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -218,7 +216,12 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if (!getEditPoiData().isInEdit()) {
|
||||
getEditPoiData().putTag(OSMSettings.OSMTagKey.NAME.getValue(), s.toString());
|
||||
if (!TextUtils.isEmpty(s)) {
|
||||
getEditPoiData().putTag(OSMSettings.OSMTagKey.NAME.getValue(),
|
||||
s.toString());
|
||||
} else {
|
||||
getEditPoiData().removeTag(OSMSettings.OSMTagKey.NAME.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -243,11 +246,10 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
});
|
||||
poiNameEditText.setOnEditorActionListener(mOnEditorActionListener);
|
||||
poiTypeEditText.setOnEditorActionListener(mOnEditorActionListener);
|
||||
poiTypeEditText.setText(editPoiData.amenity.getSubType());
|
||||
|
||||
Button saveButton = (Button) view.findViewById(R.id.saveButton);
|
||||
int saveButtonTextId = isLocalEdit ? R.string.shared_string_save :
|
||||
R.string.default_buttons_commit;
|
||||
saveButton.setText(saveButtonTextId);
|
||||
saveButton.setText(R.string.shared_string_save);
|
||||
saveButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -339,17 +341,24 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
return true;
|
||||
} else {
|
||||
new AreYouSureDialogFrgament().show(getChildFragmentManager(),
|
||||
"AreYouSureDialogFrgament");
|
||||
dismissCheckForChanges();
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void dismissCheckForChanges() {
|
||||
if (editPoiData.hasChangesBeenMade()) {
|
||||
new AreYouSureDialogFragment().show(getChildFragmentManager(),
|
||||
"AreYouSureDialogFragment");
|
||||
} else {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
outState.putSerializable(TAGS_LIST, (Serializable) editPoiData.getTagValues());
|
||||
|
@ -483,7 +492,9 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
Object item = parent.getAdapter().getItem(position);
|
||||
LOG.debug("item=" + item);
|
||||
//noinspection SuspiciousMethodCalls
|
||||
if (subCategories.containsKey(item)) {
|
||||
//noinspection SuspiciousMethodCalls
|
||||
String keyName = subCategories.get(item).getKeyName();
|
||||
poiTypeEditText.setText(keyName);
|
||||
}
|
||||
|
@ -591,7 +602,7 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
}
|
||||
}
|
||||
|
||||
public static class AreYouSureDialogFrgament extends DialogFragment {
|
||||
public static class AreYouSureDialogFragment extends DialogFragment {
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
|
|
@ -1,788 +0,0 @@
|
|||
package net.osmand.plus.osmedit;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemSelectedListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.MapPoiTypes;
|
||||
import net.osmand.osm.PoiCategory;
|
||||
import net.osmand.osm.PoiType;
|
||||
import net.osmand.osm.edit.EntityInfo;
|
||||
import net.osmand.osm.edit.Node;
|
||||
import net.osmand.osm.edit.OSMSettings.OSMTagKey;
|
||||
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.DialogProvider;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.OpeningHoursView;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.OpeningHoursParser;
|
||||
import net.osmand.util.OpeningHoursParser.BasicOpeningHourRule;
|
||||
import net.osmand.util.OpeningHoursParser.OpeningHours;
|
||||
import net.osmand.util.OpeningHoursParser.OpeningHoursRule;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class EditingPOIDialogProvider implements DialogProvider {
|
||||
|
||||
private final Activity activity;
|
||||
private final OsmEditingPlugin plugin;
|
||||
private OpenstreetmapUtil openstreetmapUtil;
|
||||
private OpenstreetmapUtil openstreetmapUtilToLoad;
|
||||
private AutoCompleteTextView typeText;
|
||||
private EditText nameText;
|
||||
private Button typeButton;
|
||||
private TextView osmTagValue;
|
||||
private Button openHoursButton;
|
||||
private EditText openingHours;
|
||||
private EditText commentText;
|
||||
private EditText websiteText;
|
||||
private EditText phoneText;
|
||||
private EditText streetNameText;
|
||||
private EditText hnoText;
|
||||
private CheckBox closeChange;
|
||||
|
||||
// private final static Log log = LogUtil.getLog(EditingPOIActivity.class);
|
||||
|
||||
/* dialog stuff */
|
||||
public static final int DIALOG_PLUGIN = 600;
|
||||
private static final int DIALOG_CREATE_POI = DIALOG_PLUGIN + 0;
|
||||
private static final int DIALOG_EDIT_POI = DIALOG_PLUGIN + 1;
|
||||
protected static final int DIALOG_SUB_CATEGORIES = DIALOG_PLUGIN + 2;
|
||||
protected static final int DIALOG_POI_TYPES = DIALOG_PLUGIN + 3;
|
||||
private static final int DIALOG_DELETE_POI = DIALOG_PLUGIN + 4;
|
||||
private static final int DIALOG_OPENING_HOURS = DIALOG_PLUGIN + 5;
|
||||
|
||||
private static final String KEY_AMENITY_NODE = "amenity_node";
|
||||
private static final String KEY_AMENITY = "amenity";
|
||||
|
||||
private static Bundle dialogBundle = new Bundle();
|
||||
private OsmandSettings settings;
|
||||
private MapPoiTypes poiTypes;
|
||||
private boolean isLocalEdit;
|
||||
private Map<String, PoiType> allTranslatedSubTypes;
|
||||
|
||||
|
||||
public EditingPOIDialogProvider(MapActivity uiContext, OsmEditingPlugin plugin) {
|
||||
this.activity = uiContext;
|
||||
this.plugin = plugin;
|
||||
|
||||
}
|
||||
|
||||
private void prepareProvider() {
|
||||
poiTypes = ((OsmandApplication) activity.getApplication()).getPoiTypes();
|
||||
allTranslatedSubTypes = poiTypes.getAllTranslatedNames();
|
||||
settings = ((OsmandApplication) activity.getApplication()).getSettings();
|
||||
isLocalEdit = true;
|
||||
if (settings.OFFLINE_EDITION.get() || !settings.isInternetConnectionAvailable(true)) {
|
||||
this.openstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);
|
||||
this.openstreetmapUtilToLoad = openstreetmapUtil;
|
||||
} else if(!settings.isInternetConnectionAvailable(true)) {
|
||||
this.openstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);
|
||||
this.openstreetmapUtilToLoad = new OpenstreetmapRemoteUtil(activity);
|
||||
} else {
|
||||
isLocalEdit = false;
|
||||
this.openstreetmapUtil = new OpenstreetmapRemoteUtil(activity);
|
||||
this.openstreetmapUtilToLoad = openstreetmapUtil;
|
||||
}
|
||||
}
|
||||
|
||||
public void showEditDialog(final Amenity editA){
|
||||
prepareProvider();
|
||||
new AsyncTask<Void, Void, Node>() {
|
||||
|
||||
@Override
|
||||
protected Node doInBackground(Void... params) {
|
||||
return openstreetmapUtilToLoad.loadNode(editA);
|
||||
}
|
||||
|
||||
protected void onPostExecute(Node n) {
|
||||
if(n != null){
|
||||
showPOIDialog(DIALOG_EDIT_POI, n, editA);
|
||||
} else {
|
||||
AccessibleToast.makeText(activity, activity.getString(R.string.poi_error_poi_not_found), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
}.execute();
|
||||
}
|
||||
|
||||
public void showCreateDialog(double latitude, double longitude){
|
||||
prepareProvider();
|
||||
Node n = new Node(latitude, longitude, -1);
|
||||
showPOIDialog(DIALOG_CREATE_POI, n, null);
|
||||
}
|
||||
|
||||
private void showPOIDialog(int dialogID, Node node, Amenity amenity) {
|
||||
Amenity localAmenity;
|
||||
if(amenity == null) {
|
||||
localAmenity = new Amenity();
|
||||
localAmenity.setType(poiTypes.getOtherPoiCategory());
|
||||
localAmenity.setSubType("");
|
||||
localAmenity.setAdditionalInfo(OSMTagKey.OPENING_HOURS.getValue(), "");
|
||||
} else {
|
||||
localAmenity = new Amenity();
|
||||
localAmenity.copyNames(amenity);
|
||||
localAmenity.setType(amenity.getType());
|
||||
localAmenity.setSubType(amenity.getSubType());
|
||||
localAmenity.setAdditionalInfo(amenity.getAdditionalInfo());
|
||||
}
|
||||
// Amenity amenity = EntityParser.parseAmenity(node, node.getTags(), type, subType, MapRenderingTypes.getDefault());
|
||||
dialogBundle.putSerializable(KEY_AMENITY, localAmenity);
|
||||
dialogBundle.putSerializable(KEY_AMENITY_NODE, node);
|
||||
createPOIDialog(dialogID, dialogBundle).show();
|
||||
}
|
||||
|
||||
public void showDeleteDialog(final Amenity a){
|
||||
prepareProvider();
|
||||
new AsyncTask<Void, Void, Node>() {
|
||||
protected Node doInBackground(Void[] params) {
|
||||
return openstreetmapUtil.loadNode(a);
|
||||
};
|
||||
|
||||
protected void onPostExecute(Node n) {
|
||||
if(n == null){
|
||||
AccessibleToast.makeText(activity, activity.getResources().getString(R.string.poi_error_poi_not_found), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
dialogBundle.putSerializable(KEY_AMENITY, a);
|
||||
dialogBundle.putSerializable(KEY_AMENITY_NODE, n);
|
||||
activity.showDialog(DIALOG_DELETE_POI); //TODO from android 2.0 use showDialog(id,bundle)
|
||||
};
|
||||
}.execute(new Void[0]);
|
||||
}
|
||||
|
||||
private void prepareDeleteDialog(Dialog dlg, Bundle args) {
|
||||
Amenity a = (Amenity) args.getSerializable(KEY_AMENITY);
|
||||
dlg.setTitle(MessageFormat.format(this.activity.getResources().getString(R.string.poi_remove_confirm_template),
|
||||
OsmAndFormatter.getPoiStringWithoutType(a, settings.MAP_PREFERRED_LOCALE.get())));
|
||||
}
|
||||
|
||||
private Dialog createDeleteDialog(final Bundle args) {
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(R.string.poi_remove_title);
|
||||
LinearLayout ll = new LinearLayout(activity);
|
||||
ll.setPadding(4, 2, 4, 0);
|
||||
ll.setOrientation(LinearLayout.VERTICAL);
|
||||
final EditText comment = new EditText(activity);
|
||||
comment.setText(R.string.poi_remove_title);
|
||||
ll.addView(comment);
|
||||
final CheckBox closeChangeset ;
|
||||
if (!isLocalEdit) {
|
||||
closeChangeset = new CheckBox(activity);
|
||||
closeChangeset.setText(R.string.close_changeset);
|
||||
ll.addView(closeChangeset);
|
||||
} else {
|
||||
closeChangeset = null;
|
||||
}
|
||||
builder.setView(ll);
|
||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
builder.setPositiveButton(R.string.shared_string_delete, new DialogInterface.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Node n = (Node) args.getSerializable(KEY_AMENITY_NODE);
|
||||
String c = comment.getText().toString();
|
||||
commitNode(OsmPoint.Action.DELETE, n, openstreetmapUtil.getEntityInfo(), c,
|
||||
closeChangeset == null ? false : closeChangeset.isSelected(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocalEdit) {
|
||||
AccessibleToast.makeText(
|
||||
activity,R.string.osm_changes_added_to_local_edits,
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
AccessibleToast.makeText(activity, R.string.poi_remove_success, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
if(activity instanceof MapActivity){
|
||||
((MapActivity) activity).getMapView().refreshMap(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
private void preparePOIDialog(View dlg, Bundle args) {
|
||||
Amenity a = (Amenity) args.getSerializable(KEY_AMENITY);
|
||||
Node n = (Node) args.getSerializable(KEY_AMENITY_NODE);
|
||||
EditText nameText = ((EditText)dlg.findViewById(R.id.Name));
|
||||
nameText.setText(a.getName());
|
||||
EditText openingHours = ((EditText)dlg.findViewById(R.id.OpeningHours));
|
||||
openingHours.setText(a.getOpeningHours());
|
||||
EditText streetName = ((EditText)dlg.findViewById(R.id.StreetName));
|
||||
streetName.setText(n.getTag(OSMTagKey.ADDR_STREET));
|
||||
EditText houseNumber = ((EditText)dlg.findViewById(R.id.HouseNumber));
|
||||
houseNumber.setText(n.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));
|
||||
EditText phoneText = ((EditText)dlg.findViewById(R.id.Phone));
|
||||
phoneText.setText(a.getPhone());
|
||||
EditText websiteText = ((EditText)dlg.findViewById(R.id.Website));
|
||||
websiteText.setText(a.getSite());
|
||||
final TableLayout layout = ((TableLayout)dlg.findViewById(R.id.advancedModeTable));
|
||||
layout.setVisibility(View.GONE);
|
||||
updateType(a);
|
||||
}
|
||||
|
||||
private void addTagValueRow(final Node n, final TableLayout layout, String tg, String vl) {
|
||||
final TableRow newTagRow = new TableRow(activity);
|
||||
TableRow.LayoutParams tlp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);
|
||||
tlp.leftMargin = 5;
|
||||
tlp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
|
||||
newTagRow.setLayoutParams(tlp);
|
||||
|
||||
final AutoCompleteTextView tag = new AutoCompleteTextView(activity);
|
||||
final AutoCompleteTextView value = new AutoCompleteTextView(activity);
|
||||
final Button delete = new Button(activity);
|
||||
|
||||
tag.setDropDownWidth(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
value.setDropDownWidth(ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
tag.setLayoutParams(tlp);
|
||||
if(tg != null) {
|
||||
tag.setText(tg);
|
||||
} else {
|
||||
tag.setHint("Tag");
|
||||
}
|
||||
|
||||
final Set<String> tagKeys = new TreeSet<String>();
|
||||
for (OSMTagKey t : OSMTagKey.values()) {
|
||||
if ((t != OSMTagKey.NAME) && (t != OSMTagKey.OPENING_HOURS) && (t != OSMTagKey.PHONE)
|
||||
&& (t != OSMTagKey.WEBSITE)) {
|
||||
tagKeys.add(t.getValue());
|
||||
}
|
||||
}
|
||||
ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(activity, R.layout.list_textview, tagKeys.toArray());
|
||||
tag.setAdapter(adapter);
|
||||
tag.setThreshold(1);
|
||||
tag.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
final String[] tags = tagKeys.toArray(new String[tagKeys.size()]);
|
||||
builder.setItems(tags, new Dialog.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
tag.setText(tags[which]);
|
||||
}
|
||||
|
||||
});
|
||||
builder.create();
|
||||
builder.show();
|
||||
}
|
||||
});
|
||||
tlp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.FILL_PARENT);
|
||||
tlp.leftMargin = 5;
|
||||
tlp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
|
||||
value.setLayoutParams(tlp);
|
||||
if(vl != null) {
|
||||
value.setText(vl);
|
||||
} else {
|
||||
value.setHint("Value");
|
||||
}
|
||||
Set<String> subCategories = new LinkedHashSet<String>();
|
||||
// could be osm values
|
||||
// for (String s : poiTypes.getAllTranslatedNames().keySet()) {
|
||||
// if (!subCategories.contains(s)) {
|
||||
// subCategories.add(s);
|
||||
// }
|
||||
// } ;
|
||||
ArrayAdapter<Object> valueAdapter = new ArrayAdapter<Object>(activity, R.layout.list_textview, subCategories.toArray());
|
||||
value.setThreshold(1);
|
||||
value.setAdapter(valueAdapter);
|
||||
value.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if ((newTagRow != null) && (tag != null) && (value != null) && (tag.getText() != null)
|
||||
&& (value.getText() != null) && (!tag.getText().equals("")) && (!value.getText().equals(""))) {
|
||||
n.putTag(tag.getText().toString(), value.getText().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
});
|
||||
tlp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);
|
||||
tlp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
|
||||
tlp.rightMargin = 5;
|
||||
delete.setLayoutParams(tlp);
|
||||
delete.setText("X");
|
||||
delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
layout.removeView(newTagRow);
|
||||
layout.invalidate();
|
||||
n.removeTag(tag.getText().toString());
|
||||
}
|
||||
});
|
||||
newTagRow.addView(tag);
|
||||
newTagRow.addView(value);
|
||||
newTagRow.addView(delete);
|
||||
layout.addView(newTagRow);
|
||||
layout.invalidate();
|
||||
}
|
||||
|
||||
private Builder createPOIDialog(final int dialogID, Bundle args) {
|
||||
final View view = activity.getLayoutInflater().inflate(R.layout.editing_poi, null);
|
||||
final Builder dlg = new Builder(activity);
|
||||
dlg.setView(view);
|
||||
switch (dialogID) {
|
||||
case DIALOG_CREATE_POI:
|
||||
dlg.setTitle(R.string.poi_create_title);
|
||||
break;
|
||||
case DIALOG_EDIT_POI:
|
||||
dlg.setTitle(R.string.poi_edit_title);
|
||||
break;
|
||||
}
|
||||
|
||||
//dlg.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);;
|
||||
|
||||
nameText = ((EditText)view.findViewById(R.id.Name));
|
||||
openingHours = ((EditText)view.findViewById(R.id.OpeningHours));
|
||||
typeText = ((AutoCompleteTextView)view.findViewById(R.id.Type));
|
||||
typeButton = ((Button)view.findViewById(R.id.TypeButton));
|
||||
osmTagValue = ((TextView) view.findViewById(R.id.OsmTagValue));
|
||||
openHoursButton = ((Button)view.findViewById(R.id.OpenHoursButton));
|
||||
typeText = ((AutoCompleteTextView)view.findViewById(R.id.Type));
|
||||
typeText.setThreshold(1);
|
||||
commentText = ((EditText)view.findViewById(R.id.Comment));
|
||||
phoneText = ((EditText)view.findViewById(R.id.Phone));
|
||||
hnoText = ((EditText)view.findViewById(R.id.HouseNumber));
|
||||
streetNameText = ((EditText)view.findViewById(R.id.StreetName));
|
||||
websiteText = ((EditText)view.findViewById(R.id.Website));
|
||||
closeChange = ((CheckBox) view.findViewById(R.id.CloseChangeset));
|
||||
closeChange.setVisibility(isLocalEdit ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
||||
TextView linkToOsmDoc = (TextView) view.findViewById(R.id.LinkToOsmDoc);
|
||||
linkToOsmDoc.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://wiki.openstreetmap.org/wiki/Map_Features")));
|
||||
}
|
||||
});
|
||||
linkToOsmDoc.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
final Amenity amenity = (Amenity) args.getSerializable(KEY_AMENITY);
|
||||
final Node node = (Node) args.getSerializable(KEY_AMENITY_NODE);
|
||||
dlg.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
dlg.setPositiveButton(
|
||||
isLocalEdit ? R.string.shared_string_save :
|
||||
R.string.default_buttons_commit, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Resources resources = view.getResources();
|
||||
final String msg = node.getId() == -1 ? resources.getString(R.string.poi_action_add) : resources
|
||||
.getString(R.string.poi_action_change);
|
||||
OsmPoint.Action action = node.getId() == -1 ? OsmPoint.Action.CREATE : OsmPoint.Action.MODIFY;
|
||||
String subType = typeText.getText().toString().trim().toLowerCase();
|
||||
if (allTranslatedSubTypes.get(subType) != null) {
|
||||
PoiType pt = allTranslatedSubTypes.get(subType);
|
||||
node.putTag(pt.getOsmTag(), pt.getOsmValue());
|
||||
if (pt.getOsmTag2() != null) {
|
||||
node.putTag(pt.getOsmTag2(), pt.getOsmValue2());
|
||||
}
|
||||
} else {
|
||||
node.putTag(amenity.getType().getDefaultTag(), subType);
|
||||
}
|
||||
String name = nameText.getText().toString();
|
||||
if(name.length() > 0) {
|
||||
node.putTag(OSMTagKey.NAME.getValue(), name);
|
||||
}
|
||||
if (openingHours.getText().toString().length() == 0) {
|
||||
node.removeTag(OSMTagKey.OPENING_HOURS.getValue());
|
||||
} else {
|
||||
node.putTag(OSMTagKey.OPENING_HOURS.getValue(), openingHours.getText().toString());
|
||||
}
|
||||
String website = websiteText.getText().toString();
|
||||
if (website.length() > 0 ){
|
||||
node.putTag(OSMTagKey.WEBSITE.getValue(), website);
|
||||
} else {
|
||||
node.removeTag(OSMTagKey.WEBSITE.getValue());
|
||||
}
|
||||
String phone = phoneText.getText().toString();
|
||||
if (phone.length() > 0 ){
|
||||
node.putTag(OSMTagKey.PHONE.getValue(), phone);
|
||||
} else {
|
||||
node.removeTag(OSMTagKey.PHONE.getValue());
|
||||
}
|
||||
String str = streetNameText.getText().toString();
|
||||
if (str .length() > 0 ){
|
||||
node.putTag(OSMTagKey.ADDR_STREET.getValue(), str);
|
||||
} else {
|
||||
node.removeTag(OSMTagKey.ADDR_STREET.getValue());
|
||||
}
|
||||
String hno = hnoText.getText().toString();
|
||||
if (hno .length() > 0 ){
|
||||
node.putTag(OSMTagKey.ADDR_HOUSE_NUMBER.getValue(), hno);
|
||||
} else {
|
||||
node.removeTag(OSMTagKey.ADDR_HOUSE_NUMBER.getValue());
|
||||
}
|
||||
commitNode(action, node, openstreetmapUtil.getEntityInfo(), commentText.getText().toString(), closeChange.isSelected(),
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isLocalEdit) {
|
||||
AccessibleToast.makeText(
|
||||
activity,R.string.osm_changes_added_to_local_edits,
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
AccessibleToast.makeText(
|
||||
activity,
|
||||
MessageFormat.format(
|
||||
activity.getResources().getString(
|
||||
R.string.poi_action_succeded_template), msg),
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
if (activity instanceof MapActivity) {
|
||||
((MapActivity) activity).getMapView().refreshMap(true);
|
||||
}
|
||||
activity.removeDialog(dialogID);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
preparePOIDialog(view, args);
|
||||
attachListeners(view, amenity, node);
|
||||
updateOsmTagValue(amenity);
|
||||
return dlg;
|
||||
}
|
||||
|
||||
private void updateOsmTagValue(final Amenity a) {
|
||||
String subType = typeText.getText().toString().trim().toLowerCase();
|
||||
String s = "OSM ";
|
||||
if (allTranslatedSubTypes.get(subType) != null) {
|
||||
PoiType pt = allTranslatedSubTypes.get(subType);
|
||||
s = pt.getOsmTag() + "=" + pt.getOsmValue();
|
||||
if (pt.getOsmTag2() != null) {
|
||||
s += " " + pt.getOsmTag2() + "=" + pt.getOsmValue2();
|
||||
}
|
||||
} else {
|
||||
s += a.getType().getDefaultTag() + "=" + subType;
|
||||
}
|
||||
osmTagValue.setText(s);
|
||||
}
|
||||
|
||||
private void attachListeners(final View dlg, final Amenity a, final Node n) {
|
||||
// DO NOT show on focus with empty text predefined list of subcategories - problems when rotating
|
||||
typeText.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showSubCategory(a);
|
||||
}
|
||||
});
|
||||
typeText.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
showSubCategory(a);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
openHoursButton.setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
activity.showDialog(DIALOG_OPENING_HOURS);
|
||||
}
|
||||
});
|
||||
typeText.addTextChangedListener(new TextWatcher(){
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
String str = s.toString();
|
||||
a.setSubType(str);
|
||||
PoiType st = allTranslatedSubTypes.get(str.trim().toLowerCase());
|
||||
if(st != null && a.getType() != st.getCategory() && st.getCategory() != null){
|
||||
a.setType(st.getCategory());
|
||||
typeButton.setText(st.getCategory().getTranslation());
|
||||
updateSubTypesAdapter(st.getCategory());
|
||||
}
|
||||
updateOsmTagValue(a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
});
|
||||
|
||||
typeButton.setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
activity.showDialog(DIALOG_POI_TYPES);
|
||||
}
|
||||
});
|
||||
|
||||
final Button advancedModeButton = ((Button)dlg.findViewById(R.id.advancedMode));
|
||||
advancedModeButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
final TableLayout layout = ((TableLayout) dlg.findViewById(R.id.advancedModeTable));
|
||||
TableLayout.LayoutParams tlParams = new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT,
|
||||
TableLayout.LayoutParams.WRAP_CONTENT);
|
||||
layout.setLayoutParams(tlParams);
|
||||
layout.setColumnStretchable(1, true);
|
||||
layout.setVisibility((layout.getVisibility() == View.VISIBLE) ? View.GONE : View.VISIBLE);
|
||||
Button addTag = (Button) dlg.findViewById(R.id.addTag);
|
||||
addTag.setVisibility((layout.getVisibility() == View.VISIBLE) ? View.VISIBLE : View.GONE);
|
||||
if (layout.getVisibility() == View.VISIBLE) {
|
||||
addTag.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
addTagValueRow(n, layout, null, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
while (layout.getChildCount() > 0) {
|
||||
layout.removeViewAt(0);
|
||||
}
|
||||
layout.requestLayout();
|
||||
for (String tg : n.getTagKeySet()) {
|
||||
if (!tg.equals(OSMTagKey.NAME.getValue()) && !tg.equals(OSMTagKey.OPENING_HOURS.getValue())
|
||||
&& !tg.equals(OSMTagKey.PHONE.getValue()) && !tg.equals(OSMTagKey.WEBSITE.getValue())) {
|
||||
if(a == null || a.getType() == null || !a.getType().getDefaultTag().equals(tg)) {
|
||||
addTagValueRow(n, layout, tg, n.getTag(tg));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showSubCategory(Amenity a) {
|
||||
if(typeText.getText().length() == 0 && a.getType() != null){
|
||||
activity.showDialog(DIALOG_SUB_CATEGORIES);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSubTypesAdapter(PoiCategory poiCategory) {
|
||||
final Map<String, PoiType> subCategories = getSubCategoriesMap(poiCategory);
|
||||
final ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(activity, R.layout.list_textview, subCategories.keySet().toArray());
|
||||
typeText.setAdapter(adapter);
|
||||
typeText.setOnItemSelectedListener(new OnItemSelectedListener() {
|
||||
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
Object item = parent.getAdapter().getItem(position);
|
||||
if(subCategories.containsKey(item)) {
|
||||
String kn = subCategories.get(item).getKeyName();
|
||||
typeText.setText(kn);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Map<String, PoiType> getSubCategoriesMap(PoiCategory poiCategory) {
|
||||
Map<String, PoiType> subCategories = new LinkedHashMap<>(poiTypes.getAllTranslatedNames(poiCategory, false));
|
||||
for (Map.Entry<String, PoiType> s : allTranslatedSubTypes.entrySet()) {
|
||||
if (!subCategories.containsKey(s.getKey())) {
|
||||
subCategories.put(Algorithms.capitalizeFirstLetterAndLowercase(s.getKey()), s.getValue());
|
||||
}
|
||||
}
|
||||
ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(activity, R.layout.list_textview,
|
||||
subCategories.keySet().toArray());
|
||||
typeText.setAdapter(adapter);
|
||||
return subCategories;
|
||||
}
|
||||
|
||||
private void updateType(Amenity a){
|
||||
typeText.setText(a.getSubType());
|
||||
typeButton.setText(a.getType().getTranslation());
|
||||
updateSubTypesAdapter(a.getType());
|
||||
updateOsmTagValue(a);
|
||||
}
|
||||
|
||||
|
||||
private Dialog createOpenHoursDlg(){
|
||||
OpeningHours time = OpeningHoursParser.parseOpenedHours(openingHours.getText().toString());
|
||||
if(time == null){
|
||||
AccessibleToast.makeText(activity, activity.getString(R.string.opening_hours_not_supported), Toast.LENGTH_LONG).show();
|
||||
return null;
|
||||
}
|
||||
|
||||
List<BasicOpeningHourRule> simple = null;
|
||||
if(time != null){
|
||||
simple = new ArrayList<BasicOpeningHourRule>();
|
||||
for(OpeningHoursRule r : time.getRules()){
|
||||
if(r instanceof BasicOpeningHourRule){
|
||||
simple.add((BasicOpeningHourRule) r);
|
||||
} else {
|
||||
time = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
final OpeningHoursView v = new OpeningHoursView(activity);
|
||||
builder.setView(v.createOpeningHoursEditView(simple));
|
||||
builder.setPositiveButton(activity.getString(R.string.shared_string_apply), new DialogInterface.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
OpeningHours oh = new OpeningHours((ArrayList<OpeningHoursRule>) v.getTime());
|
||||
openingHours.setText(oh.toString());
|
||||
activity.removeDialog(DIALOG_OPENING_HOURS);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(activity.getString(R.string.shared_string_cancel), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
activity.removeDialog(DIALOG_OPENING_HOURS);
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
|
||||
public void commitNode(final OsmPoint.Action action, final Node n, final EntityInfo info, final String comment,
|
||||
final boolean closeChangeSet,
|
||||
final Runnable successAction) {
|
||||
if (info == null && OsmPoint.Action.CREATE != action) {
|
||||
AccessibleToast.makeText(activity, activity.getResources().getString(R.string.poi_error_info_not_loaded), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
new AsyncTask<Void, Void, Node>() {
|
||||
ProgressDialog progress;
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
progress = ProgressDialog.show(activity, activity.getString(R.string.uploading), activity.getString(R.string.uploading_data));
|
||||
super.onPreExecute();
|
||||
}
|
||||
@Override
|
||||
protected Node doInBackground(Void... params) {
|
||||
Node node = openstreetmapUtil.commitNodeImpl(action, n, info, comment, closeChangeSet);
|
||||
return node;
|
||||
}
|
||||
@Override
|
||||
protected void onPostExecute(Node result) {
|
||||
progress.dismiss();
|
||||
if (result != null) {
|
||||
successAction.run();
|
||||
}
|
||||
};
|
||||
}.execute();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(int id) {
|
||||
Bundle args = dialogBundle;
|
||||
switch (id) {
|
||||
case DIALOG_DELETE_POI:
|
||||
return createDeleteDialog(args);
|
||||
case DIALOG_SUB_CATEGORIES: {
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
final Amenity a = (Amenity) args.getSerializable(KEY_AMENITY);
|
||||
final Map<String, PoiType> allTranslatedNames = poiTypes.getAllTranslatedNames(a.getType(), true);
|
||||
final String[] subCats = allTranslatedNames.keySet().toArray(new String[0]);
|
||||
builder.setItems(subCats, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
PoiType poiType = allTranslatedNames.get(subCats[which]);
|
||||
typeText.setText(subCats[which]);
|
||||
activity.removeDialog(DIALOG_SUB_CATEGORIES);
|
||||
}
|
||||
});
|
||||
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
activity.removeDialog(DIALOG_SUB_CATEGORIES);
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
case DIALOG_POI_TYPES: {
|
||||
final Amenity a = (Amenity) args.getSerializable(KEY_AMENITY);
|
||||
Builder builder = new AlertDialog.Builder(activity);
|
||||
final List<PoiCategory> categories = poiTypes.getCategories(false);
|
||||
String[] vals = new String[categories.size()];
|
||||
for (int i = 0; i < vals.length; i++) {
|
||||
vals[i] = categories.get(i).getTranslation();
|
||||
}
|
||||
builder.setItems(vals, new Dialog.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
PoiCategory aType = categories.get(which);
|
||||
if (aType != a.getType()) {
|
||||
a.setType(aType);
|
||||
a.setSubType(""); //$NON-NLS-1$
|
||||
updateType(a);
|
||||
}
|
||||
activity.removeDialog(DIALOG_POI_TYPES);
|
||||
}
|
||||
});
|
||||
builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
activity.removeDialog(DIALOG_POI_TYPES);
|
||||
}
|
||||
});
|
||||
return builder.create();
|
||||
}
|
||||
case DIALOG_OPENING_HOURS: {
|
||||
return createOpenHoursDlg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareDialog(int id, Dialog dialog) {
|
||||
prepareProvider();
|
||||
Bundle args = dialogBundle;
|
||||
switch (id) {
|
||||
case DIALOG_DELETE_POI:
|
||||
prepareDeleteDialog(dialog,args);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -47,7 +47,6 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
private OsmandApplication app;
|
||||
OpenstreetmapsDbHelper dbpoi;
|
||||
OsmBugsDbHelper dbbug;
|
||||
private EditingPOIDialogProvider poiActions;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
|
@ -137,13 +136,6 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
return SettingsOsmEditingActivity.class;
|
||||
}
|
||||
|
||||
public EditingPOIDialogProvider getPoiActions(MapActivity activity) {
|
||||
if (poiActions == null) {
|
||||
poiActions = new EditingPOIDialogProvider(activity, this);
|
||||
}
|
||||
return poiActions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerMapContextMenuActions(final MapActivity mapActivity,
|
||||
final double latitude,
|
||||
|
|
|
@ -90,7 +90,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
if (this.settings.SHOW_FAVORITES.get()) {
|
||||
if (tileBox.getZoom() >= startZoom) {
|
||||
float iconSize = FavoriteImageDrawable.getOrCreate(view.getContext(), 0,
|
||||
tileBox.getDensity()).getIntrinsicWidth() * 3 / 2.5f;
|
||||
true).getIntrinsicWidth() * 3 / 2.5f;
|
||||
QuadTree<QuadRect> boundIntersections = initBoundIntersections(tileBox);
|
||||
|
||||
// request to load
|
||||
|
@ -124,7 +124,7 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
cache.add(o);
|
||||
int x = (int) tileBox.getPixXFromLatLon(o.getLatitude(), o.getLongitude());
|
||||
int y = (int) tileBox.getPixYFromLatLon(o.getLatitude(), o.getLongitude());
|
||||
FavoriteImageDrawable fid = FavoriteImageDrawable.getOrCreate(view.getContext(), o.getColor(), tileBox.getDensity());
|
||||
FavoriteImageDrawable fid = FavoriteImageDrawable.getOrCreate(view.getContext(), o.getColor(), true);
|
||||
fid.drawBitmapInCenter(canvas, x, y);
|
||||
// canvas.drawBitmap(favoriteIcon, x - favoriteIcon.getWidth() / 2,
|
||||
// y - favoriteIcon.getHeight(), paint);
|
||||
|
|
|
@ -277,7 +277,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
int visitedColor = view.getContext().getResources().getColor(R.color.color_ok);
|
||||
if (tileBox.getZoom() >= startZoom) {
|
||||
float iconSize = FavoriteImageDrawable.getOrCreate(view.getContext(), 0,
|
||||
tileBox.getDensity()).getIntrinsicWidth() * 3 / 2.5f;
|
||||
true).getIntrinsicWidth() * 3 / 2.5f;
|
||||
QuadTree<QuadRect> boundIntersections = initBoundIntersections(tileBox);
|
||||
|
||||
// request to load
|
||||
|
@ -305,8 +305,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
float y = tileBox.getPixYFromLatLon(o.lat, o.lon);
|
||||
boolean visit = isPointVisited(o);
|
||||
int pointColor = visit ? visitedColor : o.getColor(fcolor);
|
||||
FavoriteImageDrawable fid = FavoriteImageDrawable.getOrCreate(view.getContext(), pointColor,
|
||||
tileBox.getDensity());
|
||||
FavoriteImageDrawable fid = FavoriteImageDrawable.getOrCreate(view.getContext(), pointColor, true);
|
||||
fid.drawBitmapInCenter(canvas, x, y);
|
||||
}
|
||||
}
|
||||
|
|