Merge branch 'master' of github.com:osmandapp/Osmand
This commit is contained in:
commit
2eb1d6834a
52 changed files with 813 additions and 257 deletions
|
@ -4,7 +4,8 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent">
|
||||
android:background="@android:color/transparent"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/context_menu_main"
|
||||
|
@ -110,10 +111,10 @@
|
|||
android:id="@+id/title_button_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="44dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:paddingLeft="44dp"
|
||||
android:paddingRight="2dp"
|
||||
android:layout_marginTop="-16dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
@ -131,11 +132,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/title_button_right_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:layout_marginLeft="-4dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
android:text="— 00:26"/>
|
||||
|
@ -155,6 +156,64 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/title_progress_container"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="54dp"
|
||||
android:paddingRight="2dp"
|
||||
android:minHeight="52dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="-16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal"
|
||||
tools:visibility="visible"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginRight="12dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progressTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="visible"
|
||||
tools:text="@string/shared_string_downloading"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/progressButton"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:scaleType="center"
|
||||
tools:src="@drawable/ic_action_remove_dark"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/buttons_top_border"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources><string name="auto_zoom_none">Без аўтаматычнага маштабаваньня</string>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="auto_zoom_none">Без аўтаматычнага маштабаваньня</string>
|
||||
<string name="auto_zoom_close">Буйней</string>
|
||||
<string name="auto_zoom_far">Для сярэдняга маштаба</string>
|
||||
<string name="auto_zoom_farthest">Драбней</string>
|
||||
|
@ -1964,10 +1965,41 @@
|
|||
<string name="shared_string_send">Адаслаць</string>
|
||||
<string name="application_dir_description">Выберыце, дзе вы хочаце захоўваць файлы мапаў.</string>
|
||||
<string name="share_menu_location">Падзяліцца месцазнаходжаньнем</string>
|
||||
<string name="share_geo">geo:</string>
|
||||
<string name="show_on_start_description">OsmAnd будзе пачынацца экранам з мапай</string>
|
||||
<string name="share_geo">геа:</string>
|
||||
<string name="show_on_start_description">\"Адключана\" непасрэдна запускае экран мапы</string>
|
||||
<string name="simulate_initial_startup">Імітаваць першы старт праграмы</string>
|
||||
<string name="shared_string_qr_code">QR-код</string>
|
||||
<string name="map_downloaded">Мапа сьцягнутая</string>
|
||||
<string name="feedback">галасаваньне</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">Фота %1$s</string>
|
||||
<string name="shared_string_upload">Адаслаць</string>
|
||||
<string name="osm_edit_created_poi">Створана OSM POI</string>
|
||||
<string name="osm_edit_created_bug">Створана OSM памылка</string>
|
||||
<string name="go_to_map">Перайсьці да мапы</string>
|
||||
<string name="rec_audio_description">Аўдыё %1$s</string>
|
||||
<string name="rec_video_description">Відэа %1$s</string>
|
||||
<string name="new_version">Новая вэрсія</string>
|
||||
<string name="features_menu_group">Адметнасьці</string>
|
||||
<string name="other_menu_group">Іншае</string>
|
||||
<string name="plugins_menu_group">Модулі</string>
|
||||
<string name="faq_item">Часта задаваныя пытаньні</string>
|
||||
<string name="versions_item">Вэрсіі</string>
|
||||
<string name="contact_us">Напішыце нам</string>
|
||||
<string name="map_legend">Легенда мапы</string>
|
||||
<string name="shared_string_update">Абнавіць</string>
|
||||
<string name="world_map_download_descr">Базавая мапа сьвету (якая пакрывае ўвесь сьвет пры малым павелічэньні) адсутнічае або састарэла. Калі ласка, загрузіце базавую мапу сьвету для паўнаты працоўнага асяродзьдзя.</string>
|
||||
<string name="map_downloaded_descr">Мапа %1$s загружаная. Вярніцеся да мапы, каб пачаць яе выкарыстоўваць.</string>
|
||||
<string name="simulate_initial_startup_descr">Усталёўвае прыкмету першага запуску праграмы, не зьмяняе іншых наладаў</string>
|
||||
<string name="enter_country_name">Увядзіце назву краіны</string>
|
||||
<string name="begin_with_osmand_menu_group">Першыя крокі з OsmAnd</string>
|
||||
<string name="help_us_to_improve_menu_group">Дапамажыце палепшыць OsmAnd</string>
|
||||
<string name="first_usage_item">Першы запуск</string>
|
||||
<string name="first_usage_item_description">Як загрузіць мапы, усталяваць асноўныя налады</string>
|
||||
<string name="navigation_item_description">Налада навігацыі</string>
|
||||
<string name="planning_trip_item">Планаваньне паездкі</string>
|
||||
<string name="faq_item_description">Як карыстацца модулямі</string>
|
||||
<string name="map_viewing_item">Агляд мапы</string>
|
||||
<string name="search_on_the_map_item">Пошук мапы</string>
|
||||
<string name="instalation_troubleshooting_item">Усталёўка і вырашэньне праблемаў</string>
|
||||
<string name="techical_articles_item">Тэхнічныя артыкулы</string>
|
||||
</resources>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<string name="poi_anime">Botiga d\'anime</string>
|
||||
<string name="poi_baby_goods">Articles per nadons</string>
|
||||
<string name="poi_bathroom_furnishing">Mobles de bany</string>
|
||||
<string name="poi_bed">Matalasseria</string>
|
||||
<string name="poi_bed">Mobles de dormitori</string>
|
||||
<string name="poi_boutique">Boutique</string>
|
||||
<string name="poi_computer">Botiga d\'informàtica</string>
|
||||
<string name="poi_copyshop">Copisteria</string>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources><string name="show_warnings_title">Mostra els missatges d\'avís…</string>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="show_warnings_title">Mostra els missatges d\'avís…</string>
|
||||
<string name="map_widget_fluorescent">Rutes amb fluorescència</string>
|
||||
<string name="map_widget_show_ruler">Mostra el regle</string>
|
||||
<string name="map_widget_transparent">Aparença amb transparència</string>
|
||||
|
@ -1987,4 +1988,31 @@ Per retornar a l\'estil habitual dels mapes d\'OsmAnd, només cal desactivar aqu
|
|||
<string name="world_map_download_descr">El mapa base mundial (que abasta el món sencer però amb poca ampliació) no es troba o està malmès. Considereu baixar-lo per una operació completa.</string>
|
||||
<string name="show_on_start_description">Si es desactiva s\'engega amb la pantalla del mapa</string>
|
||||
<string name="enter_country_name">Indiqueu el nom del país</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">Fotografia %1$s</string>
|
||||
<string name="rec_audio_description">Àudio %1$s</string>
|
||||
<string name="rec_video_description">Vídeo %1$s</string>
|
||||
<string name="shared_string_upload">Pujada</string>
|
||||
<string name="osm_edit_created_poi">S\'ha creat un PDI a OSM</string>
|
||||
<string name="osm_edit_created_bug">S\'ha obert un nou error a OSM</string>
|
||||
<string name="new_version">Versió nova</string>
|
||||
<string name="begin_with_osmand_menu_group">Primeres passes a OsmAnd</string>
|
||||
<string name="features_menu_group">Característiques</string>
|
||||
<string name="help_us_to_improve_menu_group">Ajudeu-nos a millorar OsmAnd</string>
|
||||
<string name="other_menu_group">Altres</string>
|
||||
<string name="plugins_menu_group">Connectors</string>
|
||||
<string name="first_usage_item">Primera utilització</string>
|
||||
<string name="first_usage_item_description">Com baixar mapes, fixar la configuració bàsica</string>
|
||||
<string name="navigation_item_description">confifuració de la navegació</string>
|
||||
<string name="planning_trip_item">Planeja un viatge</string>
|
||||
<string name="faq_item">PMF</string>
|
||||
<string name="faq_item_description">Com utilitzar connectors</string>
|
||||
<string name="map_viewing_item">Visualització del mapa</string>
|
||||
<string name="search_on_the_map_item">Cerca al mapa</string>
|
||||
<string name="instalation_troubleshooting_item">Instal·lació i solució de problemes</string>
|
||||
<string name="techical_articles_item">Articles tècnics</string>
|
||||
<string name="versions_item">Versions</string>
|
||||
<string name="feedback">Comentaris</string>
|
||||
<string name="contact_us">Contacteu-nos</string>
|
||||
<string name="map_legend">Llegenda del mapa</string>
|
||||
<string name="shared_string_update">Actualitza</string>
|
||||
</resources>
|
||||
|
|
|
@ -1299,4 +1299,5 @@
|
|||
<string name="poi_defibrillator_yes">Defibrilátor: ano</string>
|
||||
|
||||
<string name="poi_office_camping">Kancelář kempu</string>
|
||||
<string name="poi_traffic_calming_island">Dopravní ostrůvek</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="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>
|
||||
|
||||
|
@ -1984,4 +1984,9 @@
|
|||
<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>
|
||||
</resources>
|
||||
<string name="shared_string_update">Aktualizovat</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Zvuk %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_upload">Odeslat</string>
|
||||
</resources>
|
||||
|
|
|
@ -2425,4 +2425,8 @@
|
|||
<string name="poi_wiki_link">Wiki</string>
|
||||
|
||||
|
||||
<string name="poi_traffic_calming_island">Trafikhelle</string>
|
||||
<string name="poi_boat_storage">Bådopbevaring</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="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>
|
||||
|
@ -2004,4 +2004,8 @@
|
|||
<string name="osm_edit_created_bug">Oprettede OSM fejlregistrering</string>
|
||||
<string name="map_legend">Signaturforklaring</string>
|
||||
<string name="shared_string_upload">Overfør</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_update">Opdatering</string>
|
||||
</resources>
|
||||
|
|
|
@ -2399,4 +2399,8 @@
|
|||
<string name="poi_bathing_yes">Permitido bañarse</string>
|
||||
<string name="poi_bathing_no">Prohibido bañarse</string>
|
||||
|
||||
<string name="poi_traffic_calming_island">Mediana</string>
|
||||
<string name="poi_boat_storage">Almacén de botes (marina)</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -2017,4 +2017,9 @@
|
|||
<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>
|
||||
</resources>
|
||||
<string name="shared_string_update">Actualizar</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_upload">Subir</string>
|
||||
</resources>
|
||||
|
|
|
@ -2403,4 +2403,8 @@
|
|||
<string name="poi_bathing_yes">Permitido bañarse</string>
|
||||
<string name="poi_bathing_no">Prohibido bañarse</string>
|
||||
|
||||
<string name="poi_traffic_calming_island">Isleta vial</string>
|
||||
<string name="poi_boat_storage">Almacén de botes</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -2135,4 +2135,9 @@
|
|||
<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>
|
||||
</resources>
|
||||
<string name="shared_string_update">Actualizar</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_upload">Subir</string>
|
||||
</resources>
|
||||
|
|
|
@ -2078,4 +2078,8 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
|
|||
<string name="osm_edit_created_bug">Bugs déclarés sur OSM</string>
|
||||
<string name="map_legend">Légende</string>
|
||||
<string name="shared_string_upload">Téléchargement</string>
|
||||
<string name="rec_photo_description">Photo %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Vidéo %1$s</string>
|
||||
<string name="shared_string_update">Mise à jour</string>
|
||||
</resources>
|
||||
|
|
|
@ -2035,4 +2035,8 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
|
|||
<string name="map_legend">Legenda della mappa</string>
|
||||
<string name="shared_string_upload">Carica</string>
|
||||
<string name="feedback">Feedback</string>
|
||||
<string name="shared_string_update">Aggiorna</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?><resources>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<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>
|
||||
|
@ -58,7 +59,7 @@
|
|||
<string name="first_time_msg">Ačiū kad naudojate OsmAnd. Pagrindinių programos funkcijų naudojimui įrenginyje turi būti regiono duomenys, kuriuos galite parsisiųsti \'Nustatymai\' → \'Valdyti žemėlapius\'. Tik po to galėsite ieškoti adreso, LV ar viešojo transporto.</string>
|
||||
<string name="basemap_was_selected_to_download">Programos funkcionavimui reikalingas bazinis žemėlapis. Jis buvo pažymėtas parsiuntimui.</string>
|
||||
<string name="select_index_file_to_download">Nieko nerasta. Jei nerandate savo regiono, jį galite pasigaminti patys (eikite į http://osmand.net).</string>
|
||||
<string name="local_indexes_cat_tile">Žemėlapiai internete</string>
|
||||
<string name="local_indexes_cat_tile">Žemėlapiai internete ir laikinai išsaugoti žemėlapiai</string>
|
||||
<string name="local_indexes_cat_map">Įprastiniai žemėlapiai (vektoriniai)</string>
|
||||
|
||||
<string name="index_settings_descr">Parsisiųsti, peržiūrėti detalią informaciją ir valdyti parsiųstus žemėlapius</string>
|
||||
|
@ -1891,12 +1892,12 @@
|
|||
<string name="show_gpx">Rodyti GPX</string>
|
||||
<string name="recent_places">Vėliausios vietos</string>
|
||||
<string name="address_unknown">Adresas vis dar nežinomas</string>
|
||||
<string name="routing_attr_avoid_shuttle_train_name">Vengti greitųjų traukinių</string>
|
||||
<string name="routing_attr_avoid_shuttle_train_name">Vengti priemiestinių traukinių</string>
|
||||
<string name="routing_attr_avoid_shuttle_train_description">Vengti priemiestinių traukinių</string>
|
||||
<string name="dahboard_options_dialog_title">Duomenų skydelio nustatymai</string>
|
||||
<string name="show_on_start">Rodyti aktyvuojant</string>
|
||||
<string name="offline_maps_and_navigation">Offline žemėlapiai\n& navigacija</string>
|
||||
<string name="commit_poi">Užfiksuoti LV</string>
|
||||
<string name="offline_maps_and_navigation">Parsiųsti žemėlapiai\n& navigacija</string>
|
||||
<string name="commit_poi">Išsiųsti LV</string>
|
||||
<string name="count_of_lines">Eilučių kiekis</string>
|
||||
<string name="are_you_sure">Ar įsitikinę?</string>
|
||||
<string name="unsaved_changes_will_be_lost">Neišsaugoti duomenys bus prarasti. Ar norite tęsti?</string>
|
||||
|
@ -1917,7 +1918,7 @@
|
|||
<string name="si_min_km">Minutės per kilometrą</string>
|
||||
<string name="si_min_m">Minutės per mylią</string>
|
||||
<string name="si_nm_h">Jūrmylė per valandą (mazgas)</string>
|
||||
<string name="nm_h">nmh</string>
|
||||
<string name="nm_h">mzg</string>
|
||||
<string name="min_mile">min/m</string>
|
||||
<string name="min_km">min/km</string>
|
||||
<string name="m_s">m/s</string>
|
||||
|
@ -1954,7 +1955,7 @@
|
|||
<string name="other_menu_group">Kita</string>
|
||||
<string name="plugins_menu_group">Įskiepiai</string>
|
||||
<string name="faq_item">DUK</string>
|
||||
<string name="search_on_the_map_item">Ieškoti žemėlapyje</string>
|
||||
<string name="search_on_the_map_item">Paieška žemėlapyje</string>
|
||||
<string name="planning_trip_item">Kelionės planavimas</string>
|
||||
|
||||
<string name="osm_editing_item">OSM redagavimas</string>
|
||||
|
@ -1968,7 +1969,7 @@
|
|||
<string name="tab_title_basic">Pagrindinis</string>
|
||||
<string name="tab_title_advanced">Išplėstinis</string>
|
||||
<string name="activate_srtm_plugin">Prašom aktyvuoti SRTM įskiepį</string>
|
||||
<string name="begin_with_osmand_menu_group">Darbo su OsmAnd pradžia</string>
|
||||
<string name="begin_with_osmand_menu_group">Pirmi žngsniai su OsmAnd</string>
|
||||
<string name="features_menu_group">Galimybės</string>
|
||||
<string name="faq_item_description">Kaip naudotis įskiepiais</string>
|
||||
<string name="map_viewing_item">Žemėlapio peržiūra</string>
|
||||
|
@ -1976,6 +1977,28 @@
|
|||
|
||||
<string name="techical_articles_item">Techniniai straipsniai</string>
|
||||
|
||||
<string name="osm_edit_created_poi"/>
|
||||
<string name="osm_edit_created_poi">Sukurta OSM LV</string>
|
||||
<string name="osm_edit_created_bug">Sukurtas OSM riktas</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">Fotografijos %1$s</string>
|
||||
<string name="rec_audio_description">Garsas %1$s</string>
|
||||
<string name="rec_video_description">Vaizdas %1$s</string>
|
||||
<string name="shared_string_upload">Išsiųsti</string>
|
||||
<string name="shared_string_update">Atnaujinti</string>
|
||||
<string name="simulate_initial_startup_descr">Nustato kad programa pasileistų kaip pirmą kartą, visi kiti nustatymai nepakitę</string>
|
||||
<string name="simulate_initial_startup">Imituoti pirmą programos paleidimą</string>
|
||||
<string name="hillshade_layer_disabled">Reljefo sluoksnis išjungtas</string>
|
||||
<string name="favourites_edit_dialog_title">Įsimintos vietos informacija</string>
|
||||
<string name="simulate_your_location_stop_descr">Išjungti mano pozicijos simuliavimą</string>
|
||||
<string name="simulate_your_location_descr">Simuliuoti naudojant apskaičiuotą maršrutą ar įrašytą GPX</string>
|
||||
<string name="av_locations_descr">GPX failas su užrašų vietomis</string>
|
||||
<string name="favourites_context_menu_add">Pridėti įsimintą vietą</string>
|
||||
<string name="number_of_rows_in_dash">Eilučių skaičius %1$s puslapyje</string>
|
||||
<string name="favourites">Įsimintos vietos</string>
|
||||
<string name="show_free_version_banner">Rodyti nemokamos versijos pranešimą</string>
|
||||
<string name="show_free_version_banner_description">Net jei ir turite mokamą versiją vistiek galite matyti mokamos versijos pranešimą</string>
|
||||
<string name="activate_seamarks_plugin">Prašome aktyvuoti jūrlapių įskiepį</string>
|
||||
<string name="first_usage_item_description">Kaip atsisiųsti žemėlapius, parinkti pagrindinius nustatymus</string>
|
||||
<string name="navigation_item_description">Navigacijos nustatymas</string>
|
||||
<string name="feedback">Atsiliepimai</string>
|
||||
<string name="map_legend">Legenda</string>
|
||||
</resources>
|
||||
|
|
|
@ -2369,5 +2369,8 @@
|
|||
<string name="poi_bathing_yes">Купание: да</string>
|
||||
<string name="poi_bathing_no">Купание: нет</string>
|
||||
|
||||
<string name="poi_traffic_calming_island">Островок (препятствие)</string>
|
||||
|
||||
<string name="poi_boat_storage">Место для хранения лодок</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -708,11 +708,11 @@
|
|||
<string name="osb_close_dialog_error">Возникло исключение: ошибка не была закрыта</string>
|
||||
<string name="osb_comment_menu_item">Добавить комментарий</string>
|
||||
<string name="osb_close_menu_item">Закрыть ошибку</string>
|
||||
<string name="osb_comment_dialog_message">Сообщение</string>
|
||||
<string name="osb_comment_dialog_message">Комментарий</string>
|
||||
<string name="osb_comment_dialog_author">Автор</string>
|
||||
<string name="poi_edit_title">Редактирование POI</string>
|
||||
<string name="poi_create_title">Добавление POI</string>
|
||||
<string name="poi_error_poi_not_found">POI не найдена или не является точкой</string>
|
||||
<string name="poi_error_poi_not_found">POI не является точкой или не найдена</string>
|
||||
<string name="poi_remove_confirm_template">Вы действительно хотите удалить {0}?</string>
|
||||
<string name="poi_remove_title">Удаление POI</string>
|
||||
<string name="poi_remove_success">POI успешно удалена</string>
|
||||
|
@ -951,7 +951,7 @@
|
|||
<string name="context_menu_item_intermediate_point">Добавить промежуточную точку</string>
|
||||
<string name="map_widget_intermediate_distance">Промежуточная точка</string>
|
||||
<string name="ending_point_too_far">Начало маршрута слишком далеко от ближайшей дороги.</string>
|
||||
<string name="add_tag">Добавить метку</string>
|
||||
<string name="add_tag">Добавить тег</string>
|
||||
<string name="btn_advanced_mode">Расширенный режим…</string>
|
||||
<string name="poi_filter_parking">Парковки</string>
|
||||
<string name="poi_filter_emergency">Чрезвычайные обстоятельства</string>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<string name="poi_baby_goods">Butega pro pitzinnos</string>
|
||||
<string name="poi_bag">Valigeria</string>
|
||||
<string name="poi_bathroom_furnishing">Arredu bagnu</string>
|
||||
<string name="poi_bed">Arredu aposentu de letu</string>
|
||||
<string name="poi_bed">Butega arredu aposentu de letu</string>
|
||||
<string name="poi_boutique">Butega de moda</string>
|
||||
<string name="poi_carpet">Butega de tapetes</string>
|
||||
<string name="poi_chemist">Potecaria</string>
|
||||
|
@ -1484,4 +1484,67 @@
|
|||
<string name="poi_wiki_link">Wiki</string>
|
||||
|
||||
|
||||
</resources>
|
||||
<string name="poi_traffic_calming_island">Ìsula iscrobatràfficu</string>
|
||||
<string name="poi_tourism_yes">Ogetu turìsticu</string>
|
||||
<string name="poi_information_route_marker">Marcadore de àndala</string>
|
||||
<string name="poi_board_type_notice">Betrinedda</string>
|
||||
<string name="poi_garden">Giardinu</string>
|
||||
|
||||
<string name="poi_heath">Ghiddostraju</string>
|
||||
<string name="poi_grass">Erba</string>
|
||||
<string name="poi_grassland">Campura</string>
|
||||
<string name="poi_scrub">Prunitzàrgiu</string>
|
||||
<string name="poi_farmland">Terrinu agrìculu</string>
|
||||
<string name="poi_logging">Àrea pro disboscamentu</string>
|
||||
<string name="poi_windfall">Frutos rutos in terra</string>
|
||||
<string name="poi_level">Livellu</string>
|
||||
<string name="poi_rtsa_scale">Iscala RTSA</string>
|
||||
|
||||
<string name="poi_piste_difficulty_easy">Dificultade pista: fàtzile</string>
|
||||
<string name="poi_piste_difficulty_intermediate">Dificultade pista: intermèdia</string>
|
||||
<string name="poi_piste_difficulty_advanced">Dificultade pista: avantzada</string>
|
||||
<string name="poi_piste_difficulty_novice">Dificultade pista: printzipiante</string>
|
||||
<string name="poi_piste_difficulty_expert">Dificultade pista: espertu</string>
|
||||
<string name="poi_piste_difficulty_freeride">Dificultade pista: movimentu lìberu (freeride)</string>
|
||||
<string name="poi_garden_type_residential">Casta de giardinu: residentziale</string>
|
||||
<string name="poi_garden_type_community">Casta de giardinu: comunitàriu</string>
|
||||
<string name="poi_garden_type_private">Casta de giardinu: privadu</string>
|
||||
<string name="poi_garden_type_botanical">Casta de giardinu: botànicu</string>
|
||||
|
||||
<string name="poi_garden_style_kitchen">Casta de giardinu: coghina</string>
|
||||
<string name="poi_garden_style_rosarium">Casta de giardinu: rosedu</string>
|
||||
<string name="poi_garden_style_french">Casta de giardinu: frantzesu</string>
|
||||
<string name="poi_garden_style_english">Casta de giardinu: inglesu</string>
|
||||
<string name="poi_garden_style_japanese">Casta de giardinu: giaponesu</string>
|
||||
|
||||
<string name="poi_capacity">Capatzidade</string>
|
||||
<string name="poi_capacity_disabled_yes">Logu riservadu pro sos disàbiles</string>
|
||||
<string name="poi_capacity_disabled_no">Perunu logu riservadu pro sos disàbiles</string>
|
||||
<string name="poi_capacity_disabled">Logu riservadu pro sos disàbiles</string>
|
||||
<string name="poi_capacity_women_yes">Logu riservadu pro sas fèminas</string>
|
||||
<string name="poi_capacity_women_no">Perunu logu riservadu pro sas fèminas</string>
|
||||
<string name="poi_capacity_women">Logu riservadu pro sas fèminas</string>
|
||||
<string name="poi_capacity_pupils">Logu riservadu pro sos istudiantes</string>
|
||||
<string name="poi_capacity_teachers">Logu riservadu pro sos insinnantes</string>
|
||||
<string name="poi_capacity_parent_yes">Logu riservadu pro babbos e mammas</string>
|
||||
<string name="poi_capacity_parent_no">Perunu logu riservadu pro babbos e mammas</string>
|
||||
<string name="poi_capacity_parent">Logu riservadu pro babbos e mammas</string>
|
||||
|
||||
<string name="poi_aerialway_occupancy">Capatzidade cabina/cadira/màchina</string>
|
||||
<string name="poi_aerialway_capacity">Capatzidade pro ora</string>
|
||||
<string name="poi_aerialway_duration">Tempus de biàgiu mèdiu (minutos)</string>
|
||||
<string name="poi_aerialway_bubble_yes">Tancadu</string>
|
||||
<string name="poi_aerialway_bubble_no">Non tancadu</string>
|
||||
<string name="poi_aerialway_heating_yes">Caentamentu</string>
|
||||
<string name="poi_aerialway_heating_no">Chene caentamentu</string>
|
||||
<string name="poi_aerialway_bicycle_yes">Bitzicletas: permitias</string>
|
||||
<string name="poi_aerialway_bicycle_no">Bitzicletas: non permitias</string>
|
||||
<string name="poi_aerialway_bicycle_summer">Bitzicletas: permitias in s\'istiu ebbia</string>
|
||||
<string name="poi_aerialway_access_entry">Intrada ebbia</string>
|
||||
<string name="poi_aerialway_access_exit">Essida ebbia</string>
|
||||
<string name="poi_aerialway_access_both">Intrada e essida</string>
|
||||
<string name="poi_aerialway_summer_access_entry">Atzessu in s\'istiu: intrada ebbia</string>
|
||||
<string name="poi_aerialway_summer_access_exit">Atzessu in s\'istiu: essida ebbia</string>
|
||||
<string name="poi_aerialway_summer_access_both">Atzessu in s\'istiu: intrada e essida</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1977,4 +1977,8 @@
|
|||
<string name="osm_edit_created_bug">Nota de errore de OSM creada</string>
|
||||
<string name="map_legend">Legenda de sa mapa</string>
|
||||
<string name="shared_string_upload">Càrriga</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Àudio %1$s</string>
|
||||
<string name="rec_video_description">Vìdeu %1$s</string>
|
||||
<string name="shared_string_update">Agiorna</string>
|
||||
</resources>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<string name="poi_baby_goods">Potreby pre bábätká</string>
|
||||
<string name="poi_bag">Kabelky/Tašky</string>
|
||||
<string name="poi_bathroom_furnishing">Vybavenie kúpeľňe</string>
|
||||
<string name="poi_bed">Vybavenie spálne</string>
|
||||
<string name="poi_bed">Posteľné vybavenie</string>
|
||||
<string name="poi_boutique">Butik</string>
|
||||
<string name="poi_carpet">Koberce</string>
|
||||
<string name="poi_chemist">Drogéria</string>
|
||||
|
@ -578,7 +578,7 @@
|
|||
<string name="poi_fuel_e10">E10</string>
|
||||
<string name="poi_fuel_e20">E20</string>
|
||||
<string name="poi_fuel_e85">E85</string>
|
||||
<string name="poi_fuel_biogas">E85</string>
|
||||
<string name="poi_fuel_biogas">Bioplyn</string>
|
||||
<string name="poi_fuel_lh2">Tekutý vodík</string>
|
||||
<string name="poi_fuel_electricity">Elektrina</string>
|
||||
<string name="poi_junction">Križovatka</string>
|
||||
|
@ -839,7 +839,7 @@
|
|||
<string name="poi_sally_port">Vstup do pevnosti</string>
|
||||
<string name="poi_swing_gate">Otočná závora</string>
|
||||
<string name="poi_turnstile">Turniket</string>
|
||||
<string name="poi_barrier_entrance">Vstup</string>
|
||||
<string name="poi_barrier_entrance">Priechod v stene alebo plote</string>
|
||||
<string name="poi_entrance_main">Hlavný vchod</string>
|
||||
<string name="poi_entrance">Vchod</string>
|
||||
<string name="poi_entrance_exit">Východ</string>
|
||||
|
@ -990,11 +990,11 @@
|
|||
<string name="poi_monitoring_station">Meracia stanica</string>
|
||||
<string name="poi_capital">Hlavné mesto</string>
|
||||
<string name="poi_shower">Sprcha</string>
|
||||
<string name="poi_animal_shelter_bird">Prístrešok pre vtáky</string>
|
||||
<string name="poi_animal_shelter_bird">Typ prístrešku: vtáky</string>
|
||||
|
||||
<string name="poi_animal_shelter_dog">Prístrešok pre psy</string>
|
||||
<string name="poi_animal_shelter_cat">Prístrešok pre mačky</string>
|
||||
<string name="poi_animal_shelter_dog_cat">Prístrešok pre psy a mačky</string>
|
||||
<string name="poi_animal_shelter_dog">Typ prístrešku: psy</string>
|
||||
<string name="poi_animal_shelter_cat">Typ prístrešku: mačky</string>
|
||||
<string name="poi_animal_shelter_dog_cat">Typ prístrešku: psy a mačky</string>
|
||||
<string name="poi_fee_no">Bez poplatku</string>
|
||||
<string name="poi_drinking_water_yes">Pitná voda: áno</string>
|
||||
<string name="poi_drinking_water_no">Pitná voda: nie</string>
|
||||
|
@ -1386,4 +1386,6 @@
|
|||
<string name="poi_payment_telephone_cards_no">Neprijíma telefónne karty</string>
|
||||
<string name="poi_payment_credit_cards_yes">Prijíma kreditné karty</string>
|
||||
<string name="poi_payment_credit_cards_no">Neprijíma kreditné karty</string>
|
||||
<string name="poi_traffic_calming_island">Ostrovček v ceste</string>
|
||||
<string name="poi_tourism_yes">Turistický objekt</string>
|
||||
</resources>
|
||||
|
|
|
@ -2142,4 +2142,9 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
|
|||
<string name="feedback">Anketa</string>
|
||||
<string name="contact_us">Kontaktujte nás</string>
|
||||
<string name="map_legend">Vysvetlivky k mape</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Zvuk %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_upload">Odoslať</string>
|
||||
<string name="shared_string_update">Aktualizovať</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="search_button">Poišči</string>
|
||||
<string name="search_activity">Iskanje podatkov</string>
|
||||
|
@ -1979,4 +1979,9 @@
|
|||
|
||||
|
||||
<string name="map_legend">Legenda zemljevida</string>
|
||||
</resources>
|
||||
<string name="shared_string_update">Posodobitev</string>
|
||||
<string name="rec_photo_description">Fotografija %1$s</string>
|
||||
<string name="rec_audio_description">Zvočni posnetek %1$s</string>
|
||||
<string name="rec_video_description">Video posnetek %1$s</string>
|
||||
<string name="shared_string_upload">Pošlji</string>
|
||||
</resources>
|
||||
|
|
|
@ -1929,7 +1929,7 @@
|
|||
<string name="share_geo">geo:</string>
|
||||
|
||||
<string name="application_dir_description">Välj var du vill spara kartfilerna.</string>
|
||||
<string name="share_menu_location">Dela plats</string>
|
||||
<string name="share_menu_location">Dela platsen</string>
|
||||
<string name="shared_string_send">Sänd</string>
|
||||
<string name="hillshade_layer_disabled">Skuggad relief-lager inaktiverat</string>
|
||||
<string name="show_on_start_description">OsmAnd kommer att starta från kartskärmen</string>
|
||||
|
@ -1964,4 +1964,9 @@
|
|||
<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>
|
||||
<string name="shared_string_upload">Skicka</string>
|
||||
<string name="map_legend">Teckenförklaring</string>
|
||||
</resources>
|
||||
<string name="shared_string_update">Uppdatera</string>
|
||||
<string name="rec_photo_description">Foto %1$s</string>
|
||||
<string name="rec_audio_description">Ljud %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="feedback">Återkoppling</string>
|
||||
</resources>
|
||||
|
|
|
@ -2152,4 +2152,10 @@
|
|||
<string name="poi_dog_yes">允許狗入內</string>
|
||||
<string name="poi_dog_no">不允許狗入內</string>
|
||||
|
||||
<string name="poi_traffic_calming_island">安全島</string>
|
||||
<string name="poi_impromptu_yes">即興:是</string>
|
||||
<string name="poi_impromptu_no">即興:否</string>
|
||||
<string name="poi_refugee_yes">為難民的福利設施</string>
|
||||
<string name="poi_refugee_no">難民:無</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="rendering_attr_roadColors_description">選擇道路的色彩調配:</string>
|
||||
<string name="rendering_attr_roadColors_name">道路的色彩調配</string>
|
||||
|
@ -1962,4 +1962,8 @@
|
|||
<string name="osm_edit_created_bug">建立 OSM 的錯誤</string>
|
||||
<string name="map_legend">地圖圖例</string>
|
||||
<string name="shared_string_upload">上傳</string>
|
||||
</resources>
|
||||
<string name="rec_photo_description">照片 %1$s</string>
|
||||
<string name="rec_audio_description">音訊 %1$s</string>
|
||||
<string name="rec_video_description">視訊 %1$s</string>
|
||||
<string name="shared_string_update">更新</string>
|
||||
</resources>
|
||||
|
|
|
@ -196,6 +196,7 @@
|
|||
<string name="poi_traffic_calming_rumble_strip">Rumble strip</string>
|
||||
<string name="poi_traffic_calming_table">Table</string>
|
||||
<string name="poi_traffic_calming_choker">Choker</string>
|
||||
<string name="poi_traffic_calming_island">Traffic island</string>
|
||||
<string name="poi_traffic_signals">Stop light</string>
|
||||
|
||||
<string name="poi_car_repair">Car repair</string>
|
||||
|
@ -2373,6 +2374,7 @@
|
|||
<string name="poi_bathing_yes">Bathing: yes</string>
|
||||
<string name="poi_bathing_no">Bathing: no</string>
|
||||
|
||||
<string name="poi_boat_storage">Boat storage</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="shared_string_update">Update</string>
|
||||
<string name="rec_photo_description">Photo %1$s</string>
|
||||
<string name="rec_audio_description">Audio %1$s</string>
|
||||
<string name="rec_video_description">Video %1$s</string>
|
||||
<string name="shared_string_upload">Upload</string>
|
||||
<string name="osm_edit_created_poi">Created OSM POI</string>
|
||||
<string name="osm_edit_created_bug">Created OSM bug</string>
|
||||
|
|
|
@ -75,6 +75,7 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
|
@ -220,17 +221,23 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
private String formatDateTime(Context ctx, long dateTime) {
|
||||
DateFormat dateFormat = android.text.format.DateFormat.getMediumDateFormat(ctx);
|
||||
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(ctx);
|
||||
return dateFormat.format(dateTime) + " " + timeFormat.format(dateTime);
|
||||
}
|
||||
|
||||
public String getName(Context ctx) {
|
||||
String fileName = file.getName();
|
||||
String desc = getDescriptionName(fileName);
|
||||
if (desc != null) {
|
||||
return desc;
|
||||
} else if (this.isAudio()) {
|
||||
return ctx.getResources().getString(R.string.shared_string_audio);
|
||||
return ctx.getString(R.string.rec_audio_description, formatDateTime(ctx, file.lastModified()));
|
||||
} else if (this.isVideo()) {
|
||||
return ctx.getResources().getString(R.string.shared_string_video);
|
||||
return ctx.getString(R.string.rec_video_description, formatDateTime(ctx, file.lastModified()));
|
||||
} else if (this.isPhoto()) {
|
||||
return ctx.getResources().getString(R.string.shared_string_photo);
|
||||
return ctx.getString(R.string.rec_photo_description, formatDateTime(ctx, file.lastModified()));
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
|
|||
public void onPause() {
|
||||
super.onPause();
|
||||
getMyApplication().getAppCustomization().pauseActivity(DownloadActivity.class);
|
||||
downloadThread.setUiActivity(null);
|
||||
downloadThread.resetUiActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -518,7 +518,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
|
|||
};
|
||||
task.execute();
|
||||
}
|
||||
|
||||
|
||||
private void initSettingsFirstMap(WorldRegion reg) {
|
||||
getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.set(true);
|
||||
DrivingRegion drg = null;
|
||||
|
@ -652,7 +652,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
|
|||
srtmNeedsInstallation = srtmPlugin == null || srtmPlugin.needsInstallation();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static class AskMapDownloadFragment extends BottomSheetDownloadFragment {
|
||||
public static final String TAG = "AskMapDownloadFragment";
|
||||
|
||||
|
|
|
@ -88,6 +88,12 @@ public class DownloadIndexesThread {
|
|||
public void setUiActivity(DownloadEvents uiActivity) {
|
||||
this.uiActivity = uiActivity;
|
||||
}
|
||||
|
||||
public void resetUiActivity(DownloadEvents uiActivity) {
|
||||
if (this.uiActivity == uiActivity) {
|
||||
this.uiActivity = null;
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
protected void downloadInProgress() {
|
||||
|
@ -213,14 +219,17 @@ public class DownloadIndexesThread {
|
|||
}
|
||||
if (currentDownloadingItem == null) {
|
||||
execute(new DownloadIndexesAsyncTask());
|
||||
} else {
|
||||
downloadInProgress();
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelDownload(IndexItem item) {
|
||||
if(currentDownloadingItem == item) {
|
||||
downloadFileHelper.setInterruptDownloading(true);;
|
||||
downloadFileHelper.setInterruptDownloading(true);
|
||||
} else {
|
||||
indexItemDownloading.remove(item);
|
||||
downloadInProgress();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@ public class DownloadResources extends DownloadResourceGroup {
|
|||
|
||||
public IndexItem getIndexItem(String fileName) {
|
||||
IndexItem res = null;
|
||||
if (rawResources == null) {
|
||||
return null;
|
||||
}
|
||||
for (IndexItem item : rawResources) {
|
||||
if (fileName.equals(item.getFileName())) {
|
||||
res = item;
|
||||
|
@ -64,6 +67,19 @@ public class DownloadResources extends DownloadResourceGroup {
|
|||
return res;
|
||||
}
|
||||
|
||||
public List<IndexItem> getIndexItems(String fileNamePrefix) {
|
||||
List<IndexItem> res = new LinkedList<>();
|
||||
if (rawResources == null) {
|
||||
return res;
|
||||
}
|
||||
for (IndexItem item : rawResources) {
|
||||
if (item.getFileName().toLowerCase().startsWith(fileNamePrefix)) {
|
||||
res.add(item);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public void updateLoadedFiles() {
|
||||
initAlreadyLoadedFiles();
|
||||
prepareFilesToUpdate();
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper;
|
||||
import net.osmand.plus.poi.PoiUIFilter;
|
||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||
import net.osmand.util.Algorithms;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -89,7 +90,15 @@ public class WaypointDialogHelper {
|
|||
} else {
|
||||
textDist.setText("");
|
||||
}
|
||||
String descr = PointDescription.getSimpleName(point, app);
|
||||
|
||||
String descr;
|
||||
PointDescription pd = point.getPointDescription(app);
|
||||
if (Algorithms.isEmpty(pd.getName())) {
|
||||
descr = pd.getTypeName();
|
||||
} else {
|
||||
descr = pd.getName();
|
||||
}
|
||||
|
||||
if(textShadow != null) {
|
||||
textShadow.setText(descr);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController.MenuType;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
|
||||
import net.osmand.plus.mapcontextmenu.other.ShareMenu;
|
||||
import net.osmand.plus.views.ContextMenuLayer;
|
||||
import net.osmand.plus.views.OsmandMapLayer;
|
||||
|
@ -382,6 +383,14 @@ public class MapContextMenu extends MenuTitleController {
|
|||
}
|
||||
}
|
||||
|
||||
public TitleProgressController getTitleProgressController() {
|
||||
if (menuController != null) {
|
||||
return menuController.getTitleProgressController();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean fabVisible() {
|
||||
return menuController == null || menuController.fabVisible();
|
||||
}
|
||||
|
@ -389,4 +398,10 @@ public class MapContextMenu extends MenuTitleController {
|
|||
public boolean buttonsVisible() {
|
||||
return menuController == null || menuController.buttonsVisible();
|
||||
}
|
||||
|
||||
public void updateData() {
|
||||
if (menuController != null) {
|
||||
menuController.updateData();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,6 +26,7 @@ import android.widget.FrameLayout;
|
|||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -36,7 +37,9 @@ 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.download.DownloadIndexesThread.DownloadEvents;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
|
||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
|
||||
|
@ -45,7 +48,7 @@ import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_BOTTOM_DP
|
|||
import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
|
||||
|
||||
|
||||
public class MapContextMenuFragment extends Fragment {
|
||||
public class MapContextMenuFragment extends Fragment implements DownloadEvents {
|
||||
|
||||
public static final String TAG = "MapContextMenuFragment";
|
||||
|
||||
|
@ -61,6 +64,7 @@ public class MapContextMenuFragment extends Fragment {
|
|||
private TitleButtonController leftTitleButtonController;
|
||||
private TitleButtonController rightTitleButtonController;
|
||||
private TitleButtonController topRightTitleButtonController;
|
||||
private TitleProgressController titleProgressController;
|
||||
|
||||
private int menuTopViewHeight;
|
||||
private int menuTopShadowHeight;
|
||||
|
@ -128,6 +132,7 @@ public class MapContextMenuFragment extends Fragment {
|
|||
leftTitleButtonController = menu.getLeftTitleButtonController();
|
||||
rightTitleButtonController = menu.getRightTitleButtonController();
|
||||
topRightTitleButtonController = menu.getTopRightTitleButtonController();
|
||||
titleProgressController = menu.getTitleProgressController();
|
||||
|
||||
map = getMapActivity().getMapView();
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox().copy();
|
||||
|
@ -145,82 +150,60 @@ public class MapContextMenuFragment extends Fragment {
|
|||
origMarkerY = box.getCenterPixelY();
|
||||
}
|
||||
|
||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
||||
boolean light = getMyApplication().getSettings().isLightContent();
|
||||
|
||||
view = inflater.inflate(R.layout.map_context_menu_fragment, container, false);
|
||||
mainView = view.findViewById(R.id.context_menu_main);
|
||||
|
||||
// Title buttons
|
||||
final View titleButtonsContainer = view.findViewById(R.id.title_button_container);
|
||||
titleButtonsContainer.setVisibility(
|
||||
leftTitleButtonController != null || rightTitleButtonController != null ? View.VISIBLE : View.GONE);
|
||||
|
||||
// Left title button
|
||||
final Button leftTitleButton = (Button) view.findViewById(R.id.title_button);
|
||||
final TextView titleButtonRightText = (TextView) view.findViewById(R.id.title_button_right_text);
|
||||
if (leftTitleButtonController != null) {
|
||||
leftTitleButton.setText(leftTitleButtonController.getCaption());
|
||||
|
||||
Drawable leftIcon = leftTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
leftTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
leftTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
leftTitleButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
leftTitleButtonController.buttonPressed();
|
||||
}
|
||||
});
|
||||
|
||||
if (leftTitleButtonController.isNeedRightText()) {
|
||||
titleButtonRightText.setText(leftTitleButtonController.getRightTextCaption());
|
||||
} else {
|
||||
titleButtonRightText.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
leftTitleButton.setVisibility(View.GONE);
|
||||
titleButtonRightText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Right title button
|
||||
final Button rightTitleButton = (Button) view.findViewById(R.id.title_button_right);
|
||||
if (rightTitleButtonController != null) {
|
||||
rightTitleButton.setText(rightTitleButtonController.getCaption());
|
||||
|
||||
Drawable leftIcon = rightTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
rightTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
rightTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
rightTitleButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
rightTitleButtonController.buttonPressed();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
rightTitleButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Top Right title button
|
||||
final Button topRightTitleButton = (Button) view.findViewById(R.id.title_button_top_right);
|
||||
if (topRightTitleButtonController != null) {
|
||||
topRightTitleButton.setText(topRightTitleButtonController.getCaption());
|
||||
|
||||
Drawable leftIcon = topRightTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
topRightTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
topRightTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
topRightTitleButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
topRightTitleButtonController.buttonPressed();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
topRightTitleButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Progress bar
|
||||
if (titleProgressController != null) {
|
||||
final ImageView progressButton = (ImageView) view.findViewById(R.id.progressButton);
|
||||
progressButton.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_remove_dark,
|
||||
light ? R.color.icon_color : R.color.dashboard_subheader_text_dark));
|
||||
progressButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
titleProgressController.buttonPressed();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateButtonsAndProgress();
|
||||
|
||||
if (menu.isLandscapeLayout()) {
|
||||
mainView.setLayoutParams(new FrameLayout.LayoutParams(dpToPx(menu.getLandscapeWidthDp()),
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
@ -387,9 +370,6 @@ public class MapContextMenuFragment extends Fragment {
|
|||
|
||||
buildHeader();
|
||||
|
||||
IconsCache iconsCache = getMyApplication().getIconsCache();
|
||||
boolean light = getMyApplication().getSettings().isLightContent();
|
||||
|
||||
// FAB
|
||||
fabView = (ImageView)view.findViewById(R.id.context_menu_fab_view);
|
||||
if (menu.fabVisible()) {
|
||||
|
@ -458,8 +438,82 @@ public class MapContextMenuFragment extends Fragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
private void recalculateFullHeightMax() {
|
||||
menuFullHeightMax = menuTitleHeight + (menuBottomViewHeight > 0 ? menuBottomViewHeight : -dpToPx(SHADOW_HEIGHT_BOTTOM_DP));
|
||||
private void updateButtonsAndProgress() {
|
||||
// Title buttons
|
||||
boolean showButtonsContainer = (leftTitleButtonController != null || rightTitleButtonController != null)
|
||||
&& (titleProgressController == null || !titleProgressController.visible);
|
||||
final View titleButtonsContainer = view.findViewById(R.id.title_button_container);
|
||||
titleButtonsContainer.setVisibility(showButtonsContainer ? View.VISIBLE : View.GONE);
|
||||
|
||||
// Left title button
|
||||
final Button leftTitleButton = (Button) view.findViewById(R.id.title_button);
|
||||
final TextView titleButtonRightText = (TextView) view.findViewById(R.id.title_button_right_text);
|
||||
if (leftTitleButtonController != null) {
|
||||
leftTitleButton.setText(leftTitleButtonController.caption);
|
||||
leftTitleButton.setVisibility(leftTitleButtonController.visible ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
Drawable leftIcon = leftTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
leftTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
leftTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
|
||||
if (leftTitleButtonController.needRightText) {
|
||||
titleButtonRightText.setText(leftTitleButtonController.rightTextCaption);
|
||||
} else {
|
||||
titleButtonRightText.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
leftTitleButton.setVisibility(View.GONE);
|
||||
titleButtonRightText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Right title button
|
||||
final Button rightTitleButton = (Button) view.findViewById(R.id.title_button_right);
|
||||
if (rightTitleButtonController != null) {
|
||||
rightTitleButton.setText(rightTitleButtonController.caption);
|
||||
rightTitleButton.setVisibility(rightTitleButtonController.visible ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
Drawable leftIcon = rightTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
rightTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
rightTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
} else {
|
||||
rightTitleButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Top Right title button
|
||||
final Button topRightTitleButton = (Button) view.findViewById(R.id.title_button_top_right);
|
||||
if (topRightTitleButtonController != null) {
|
||||
topRightTitleButton.setText(topRightTitleButtonController.caption);
|
||||
topRightTitleButton.setVisibility(topRightTitleButtonController.visible ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
Drawable leftIcon = topRightTitleButtonController.getLeftIcon();
|
||||
if (leftIcon != null) {
|
||||
topRightTitleButton.setCompoundDrawablesWithIntrinsicBounds(leftIcon, null, null, null);
|
||||
topRightTitleButton.setCompoundDrawablePadding(dpToPx(4f));
|
||||
}
|
||||
} else {
|
||||
topRightTitleButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Progress bar
|
||||
final View titleProgressContainer = view.findViewById(R.id.title_progress_container);
|
||||
if (titleProgressController != null) {
|
||||
titleProgressContainer.setVisibility(titleProgressController.visible ? View.VISIBLE : View.GONE);
|
||||
|
||||
final ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.progressBar);
|
||||
final TextView progressTitle = (TextView) view.findViewById(R.id.progressTitle);
|
||||
progressTitle.setText(titleProgressController.caption);
|
||||
progressBar.setIndeterminate(titleProgressController.indeterminate);
|
||||
progressBar.setProgress(titleProgressController.progress);
|
||||
|
||||
final ImageView progressButton = (ImageView) view.findViewById(R.id.progressButton);
|
||||
progressButton.setVisibility(titleProgressController.buttonVisible ? View.VISIBLE : View.GONE);
|
||||
} else {
|
||||
titleProgressContainer.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void buildHeader() {
|
||||
|
@ -496,6 +550,18 @@ public class MapContextMenuFragment extends Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getMyApplication().getDownloadThread().setUiActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
getMyApplication().getDownloadThread().resetUiActivity(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
|
@ -534,7 +600,7 @@ public class MapContextMenuFragment extends Fragment {
|
|||
menuTitleHeight = menuTopShadowHeight + menuTopShadowAllHeight + dy;
|
||||
menuBottomViewHeight = view.findViewById(R.id.context_menu_bottom_view).getHeight();
|
||||
|
||||
recalculateFullHeightMax();
|
||||
menuFullHeightMax = menuTitleHeight + (menuBottomViewHeight > 0 ? menuBottomViewHeight : -dpToPx(SHADOW_HEIGHT_BOTTOM_DP));
|
||||
|
||||
ViewTreeObserver obs = view.getViewTreeObserver();
|
||||
|
||||
|
@ -772,6 +838,32 @@ public class MapContextMenuFragment extends Fragment {
|
|||
.addToBackStack(TAG).commit();
|
||||
}
|
||||
|
||||
//DownloadEvents
|
||||
@Override
|
||||
public void newDownloadIndexes() {
|
||||
updateOnDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadInProgress() {
|
||||
updateOnDownload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadHasFinished() {
|
||||
updateOnDownload();
|
||||
}
|
||||
|
||||
private void updateOnDownload() {
|
||||
boolean wasProgressVisible = menu.getTitleProgressController() != null && menu.getTitleProgressController().visible;
|
||||
menu.updateData();
|
||||
boolean progressVisible = menu.getTitleProgressController() != null && menu.getTitleProgressController().visible;
|
||||
updateButtonsAndProgress();
|
||||
if (wasProgressVisible != progressVisible) {
|
||||
runLayoutListener();
|
||||
}
|
||||
}
|
||||
|
||||
private MapActivity getMapActivity() {
|
||||
return (MapActivity)getActivity();
|
||||
}
|
||||
|
|
|
@ -47,43 +47,17 @@ public abstract class MenuController extends BaseMenuController {
|
|||
private MenuBuilder builder;
|
||||
private int currentMenuState;
|
||||
private MenuType menuType = MenuType.STANDARD;
|
||||
private PointDescription pointDescription;
|
||||
|
||||
protected TitleButtonController leftTitleButtonController;
|
||||
protected TitleButtonController rightTitleButtonController;
|
||||
protected TitleButtonController topRightTitleButtonController;
|
||||
|
||||
public abstract class TitleButtonController {
|
||||
protected TitleProgressController titleProgressController;
|
||||
|
||||
public String caption = "";
|
||||
public int leftIconId = 0;
|
||||
public boolean needRightText = false;
|
||||
public String rightTextCaption = "";
|
||||
|
||||
public String getCaption() {
|
||||
return caption;
|
||||
}
|
||||
|
||||
public boolean isNeedRightText() {
|
||||
return needRightText;
|
||||
}
|
||||
|
||||
public String getRightTextCaption() {
|
||||
return rightTextCaption;
|
||||
}
|
||||
|
||||
public Drawable getLeftIcon() {
|
||||
if (leftIconId != 0) {
|
||||
return getIcon(leftIconId, getResIdFromAttribute(R.attr.contextMenuButtonColor));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void buttonPressed();
|
||||
}
|
||||
|
||||
public MenuController(MenuBuilder builder, MapActivity mapActivity) {
|
||||
public MenuController(MenuBuilder builder, PointDescription pointDescription, MapActivity mapActivity) {
|
||||
super(mapActivity);
|
||||
this.pointDescription = pointDescription;
|
||||
this.builder = builder;
|
||||
this.currentMenuState = getInitialMenuState();
|
||||
}
|
||||
|
@ -98,23 +72,23 @@ public abstract class MenuController extends BaseMenuController {
|
|||
MenuController menuController = null;
|
||||
if (object != null) {
|
||||
if (object instanceof Amenity) {
|
||||
menuController = new AmenityMenuController(app, mapActivity, (Amenity) object);
|
||||
menuController = new AmenityMenuController(app, mapActivity, pointDescription, (Amenity) object);
|
||||
} else if (object instanceof FavouritePoint) {
|
||||
menuController = new FavouritePointMenuController(app, mapActivity, (FavouritePoint) object);
|
||||
menuController = new FavouritePointMenuController(app, mapActivity, pointDescription, (FavouritePoint) object);
|
||||
} else if (object instanceof SearchHistoryHelper.HistoryEntry) {
|
||||
menuController = new HistoryMenuController(app, mapActivity, (SearchHistoryHelper.HistoryEntry) object);
|
||||
menuController = new HistoryMenuController(app, mapActivity, pointDescription, (SearchHistoryHelper.HistoryEntry) object);
|
||||
} else if (object instanceof TargetPoint) {
|
||||
menuController = new TargetPointMenuController(app, mapActivity, (TargetPoint) object);
|
||||
menuController = new TargetPointMenuController(app, mapActivity, pointDescription, (TargetPoint) object);
|
||||
} else if (object instanceof OsMoDevice) {
|
||||
menuController = new OsMoMenuController(app, mapActivity, (OsMoDevice) object);
|
||||
menuController = new OsMoMenuController(app, mapActivity, pointDescription, (OsMoDevice) object);
|
||||
} else if (object instanceof Recording) {
|
||||
menuController = new AudioVideoNoteMenuController(app, mapActivity, (Recording) object);
|
||||
menuController = new AudioVideoNoteMenuController(app, mapActivity, pointDescription, (Recording) object);
|
||||
} else if (object instanceof OsmPoint) {
|
||||
menuController = new EditPOIMenuController(app, mapActivity, pointDescription, (OsmPoint) object);
|
||||
} else if (object instanceof WptPt) {
|
||||
menuController = new WptPtMenuController(app, mapActivity, (WptPt) object);
|
||||
menuController = new WptPtMenuController(app, mapActivity, pointDescription, (WptPt) object);
|
||||
} else if (object instanceof BinaryMapDataObject) {
|
||||
menuController = new MapDataMenuController(app, mapActivity, (BinaryMapDataObject) object);
|
||||
menuController = new MapDataMenuController(app, mapActivity, pointDescription, (BinaryMapDataObject) object);
|
||||
} else if (object instanceof LatLon) {
|
||||
if (pointDescription.isParking()) {
|
||||
menuController = new ParkingPositionMenuController(app, mapActivity, pointDescription);
|
||||
|
@ -146,6 +120,10 @@ public abstract class MenuController extends BaseMenuController {
|
|||
}
|
||||
}
|
||||
|
||||
public PointDescription getPointDescription() {
|
||||
return pointDescription;
|
||||
}
|
||||
|
||||
public int getInitialMenuState() {
|
||||
if (isLandscapeLayout()) {
|
||||
return MenuState.FULL_SCREEN;
|
||||
|
@ -218,6 +196,10 @@ public abstract class MenuController extends BaseMenuController {
|
|||
return topRightTitleButtonController;
|
||||
}
|
||||
|
||||
public TitleProgressController getTitleProgressController() {
|
||||
return titleProgressController;
|
||||
}
|
||||
|
||||
public boolean fabVisible() {
|
||||
return true;
|
||||
}
|
||||
|
@ -257,4 +239,46 @@ public abstract class MenuController extends BaseMenuController {
|
|||
public void share(LatLon latLon, String title) {
|
||||
ShareMenu.show(latLon, title, getMapActivity());
|
||||
}
|
||||
|
||||
public void updateData() {
|
||||
}
|
||||
|
||||
public abstract class TitleButtonController {
|
||||
public String caption = "";
|
||||
public int leftIconId = 0;
|
||||
public boolean needRightText = false;
|
||||
public String rightTextCaption = "";
|
||||
public boolean visible = true;
|
||||
|
||||
public Drawable getLeftIcon() {
|
||||
if (leftIconId != 0) {
|
||||
return getIcon(leftIconId, getResIdFromAttribute(R.attr.contextMenuButtonColor));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void buttonPressed();
|
||||
}
|
||||
|
||||
public abstract class TitleProgressController {
|
||||
public String caption = "";
|
||||
public int progress = 0;
|
||||
public boolean indeterminate;
|
||||
public boolean visible;
|
||||
public boolean buttonVisible;
|
||||
|
||||
public void setIndexesDownloadMode() {
|
||||
caption = getMapActivity().getString(R.string.downloading_list_indexes);
|
||||
indeterminate = true;
|
||||
buttonVisible = false;
|
||||
}
|
||||
|
||||
public void setMapDownloadMode() {
|
||||
indeterminate = false;
|
||||
buttonVisible = true;
|
||||
}
|
||||
|
||||
public abstract void buttonPressed();
|
||||
}
|
||||
}
|
|
@ -151,6 +151,7 @@ public abstract class MenuTitleController {
|
|||
nameStr = streetStr;
|
||||
addressUnknown = false;
|
||||
streetStr = "";
|
||||
getPointDescription().setName(nameStr);
|
||||
}
|
||||
getMapActivity().runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
|
|
|
@ -17,8 +17,8 @@ public class AmenityMenuController extends MenuController {
|
|||
|
||||
private final Amenity amenity;
|
||||
|
||||
public AmenityMenuController(OsmandApplication app, MapActivity mapActivity, final Amenity amenity) {
|
||||
super(new AmenityMenuBuilder(app, amenity), mapActivity);
|
||||
public AmenityMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final Amenity amenity) {
|
||||
super(new AmenityMenuBuilder(app, amenity), pointDescription, mapActivity);
|
||||
this.amenity = amenity;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,6 @@ public class AmenityMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return amenity.getName(getMapActivity().getMyApplication().getSettings().MAP_PREFERRED_LOCALE.get());
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.net.Uri;
|
|||
|
||||
import net.osmand.access.AccessibleAlertBuilder;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -16,23 +17,15 @@ import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording;
|
|||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.mapcontextmenu.builders.AudioVideoNoteMenuBuilder;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class AudioVideoNoteMenuController extends MenuController {
|
||||
private Recording recording;
|
||||
|
||||
private DateFormat dateFormat;
|
||||
private DateFormat timeFormat;
|
||||
private AudioVideoNotesPlugin plugin;
|
||||
|
||||
public AudioVideoNoteMenuController(OsmandApplication app, MapActivity mapActivity, final Recording recording) {
|
||||
super(new AudioVideoNoteMenuBuilder(app, recording), mapActivity);
|
||||
public AudioVideoNoteMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final Recording recording) {
|
||||
super(new AudioVideoNoteMenuBuilder(app, recording), pointDescription, mapActivity);
|
||||
this.recording = recording;
|
||||
plugin = OsmandPlugin.getPlugin(AudioVideoNotesPlugin.class);
|
||||
dateFormat = android.text.format.DateFormat.getMediumDateFormat(mapActivity);
|
||||
timeFormat = android.text.format.DateFormat.getTimeFormat(mapActivity);
|
||||
|
||||
leftTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
|
@ -94,15 +87,7 @@ public class AudioVideoNoteMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
File file = recording.getFile();
|
||||
String recType = recording.getType(getMapActivity());
|
||||
String recName = recording.getName(getMapActivity());
|
||||
if (file != null && recType.equals(recName)) {
|
||||
Date date = new Date(recording.getFile().lastModified());
|
||||
return dateFormat.format(date) + " " + timeFormat.format(date);
|
||||
} else {
|
||||
return recording.getName(getMapActivity());
|
||||
}
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,14 +30,12 @@ import java.util.Map;
|
|||
|
||||
public class EditPOIMenuController extends MenuController {
|
||||
|
||||
private PointDescription pointDescription;
|
||||
private OsmEditingPlugin plugin;
|
||||
private String pointTypeStr;
|
||||
private ProgressDialogPoiUploader poiUploader;
|
||||
|
||||
public EditPOIMenuController(OsmandApplication app, final MapActivity mapActivity, final PointDescription pointDescription, final OsmPoint osmPoint) {
|
||||
super(new EditPOIMenuBuilder(app, osmPoint), mapActivity);
|
||||
this.pointDescription = pointDescription;
|
||||
public EditPOIMenuController(OsmandApplication app, final MapActivity mapActivity, PointDescription pointDescription, final OsmPoint osmPoint) {
|
||||
super(new EditPOIMenuBuilder(app, osmPoint), pointDescription, mapActivity);
|
||||
plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class);
|
||||
|
||||
poiUploader = new ProgressDialogPoiUploader() {
|
||||
|
@ -138,7 +136,7 @@ public class EditPOIMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return pointDescription.getSimpleName(getMapActivity(), false);
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.graphics.drawable.Drawable;
|
|||
import android.support.v4.app.Fragment;
|
||||
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
|
@ -17,8 +18,8 @@ public class FavouritePointMenuController extends MenuController {
|
|||
|
||||
private FavouritePoint fav;
|
||||
|
||||
public FavouritePointMenuController(OsmandApplication app, MapActivity mapActivity, final FavouritePoint fav) {
|
||||
super(new FavouritePointMenuBuilder(app, fav), mapActivity);
|
||||
public FavouritePointMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final FavouritePoint fav) {
|
||||
super(new FavouritePointMenuBuilder(app, fav), pointDescription, mapActivity);
|
||||
this.fav = fav;
|
||||
}
|
||||
|
||||
|
@ -70,6 +71,6 @@ public class FavouritePointMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return fav.getName();
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.osmand.plus.mapcontextmenu.controllers;
|
|||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
|
@ -14,8 +15,8 @@ public class HistoryMenuController extends MenuController {
|
|||
|
||||
private HistoryEntry entry;
|
||||
|
||||
public HistoryMenuController(OsmandApplication app, MapActivity mapActivity, final HistoryEntry entry) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
public HistoryMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final HistoryEntry entry) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
this.entry = entry;
|
||||
}
|
||||
|
||||
|
@ -46,7 +47,7 @@ public class HistoryMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return entry.getName().getSimpleName(getMapActivity(), false);
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -11,36 +13,43 @@ import net.osmand.map.WorldRegion;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.download.DownloadActivity;
|
||||
import net.osmand.plus.download.DownloadActivityType;
|
||||
import net.osmand.plus.download.DownloadIndexesThread;
|
||||
import net.osmand.plus.download.DownloadValidationManager;
|
||||
import net.osmand.plus.download.IndexItem;
|
||||
import net.osmand.plus.helpers.FileNameTranslationHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public class MapDataMenuController extends MenuController {
|
||||
private WorldRegion region;
|
||||
private String regionName;
|
||||
private IndexItem indexItem;
|
||||
private List<IndexItem> otherIndexItems;
|
||||
private String name;
|
||||
|
||||
public MapDataMenuController(OsmandApplication app, MapActivity mapActivity, final BinaryMapDataObject dataObject) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
private DownloadValidationManager downloadValidationManager;
|
||||
private DownloadIndexesThread downloadThread;
|
||||
|
||||
public MapDataMenuController(final OsmandApplication app, final MapActivity mapActivity, PointDescription pointDescription, final BinaryMapDataObject dataObject) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
OsmandRegions osmandRegions = app.getRegions();
|
||||
String fullName = osmandRegions.getFullName(dataObject);
|
||||
final WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||
this.region = region;
|
||||
if (region != null) {
|
||||
regionName = region.getLocaleName();
|
||||
} else {
|
||||
regionName = dataObject.getName();
|
||||
}
|
||||
this.region = osmandRegions.getRegionData(fullName);
|
||||
name = getPointDescription().getName();
|
||||
downloadValidationManager = new DownloadValidationManager(app);
|
||||
downloadThread = app.getDownloadThread();
|
||||
|
||||
mapActivity.getSupportFragmentManager();
|
||||
leftTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
getMapActivity().getContextMenu().close();
|
||||
|
||||
final Intent intent = new Intent(getMapActivity(), getMapActivity().getMyApplication()
|
||||
.getAppCustomization().getDownloadIndexActivity());
|
||||
intent.putExtra(DownloadActivity.FILTER_KEY, regionName);
|
||||
intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.DOWNLOAD_TAB);
|
||||
getMapActivity().startActivity(intent);
|
||||
if (indexItem != null) {
|
||||
downloadValidationManager.startDownload(mapActivity, indexItem);
|
||||
}
|
||||
}
|
||||
};
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_download);
|
||||
|
@ -49,8 +58,9 @@ public class MapDataMenuController extends MenuController {
|
|||
rightTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
// todo delete
|
||||
//getMapActivity().getContextMenu().close();
|
||||
if (indexItem != null) {
|
||||
deleteItem();
|
||||
}
|
||||
}
|
||||
};
|
||||
rightTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_delete);
|
||||
|
@ -62,8 +72,22 @@ public class MapDataMenuController extends MenuController {
|
|||
// todo other maps
|
||||
}
|
||||
};
|
||||
topRightTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_others);
|
||||
topRightTitleButtonController.caption = getMapActivity().getString(R.string.download_select_map_types);
|
||||
|
||||
titleProgressController = new TitleProgressController() {
|
||||
@Override
|
||||
public void buttonPressed() {
|
||||
if (indexItem != null) {
|
||||
downloadThread.cancelDownload(indexItem);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!downloadThread.getIndexes().isDownloadedFromInternet) {
|
||||
downloadThread.runReloadIndexFiles();
|
||||
}
|
||||
|
||||
updateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -83,7 +107,7 @@ public class MapDataMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return regionName;
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -118,4 +142,101 @@ public class MapDataMenuController extends MenuController {
|
|||
public boolean buttonsVisible() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateData() {
|
||||
if (indexItem == null) {
|
||||
otherIndexItems = downloadThread.getIndexes().getIndexItems(region.getRegionDownloadNameLC());
|
||||
for (IndexItem i : otherIndexItems) {
|
||||
if (i.getType() == DownloadActivityType.NORMAL_FILE) {
|
||||
indexItem = i;
|
||||
otherIndexItems.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
topRightTitleButtonController.visible = otherIndexItems.size() > 0;
|
||||
if (indexItem != null) {
|
||||
if (indexItem.isOutdated()) {
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_update)
|
||||
+ " (" + indexItem.getSizeDescription(getMapActivity()) + ")";
|
||||
} else {
|
||||
leftTitleButtonController.caption = getMapActivity().getString(R.string.shared_string_download)
|
||||
+ " (" + indexItem.getSizeDescription(getMapActivity()) + ")";
|
||||
}
|
||||
}
|
||||
rightTitleButtonController.visible = indexItem != null && indexItem.isDownloaded();
|
||||
|
||||
boolean hasIndexes = downloadThread.getIndexes().isDownloadedFromInternet;
|
||||
boolean isDownloading = indexItem != null && downloadThread.isDownloading(indexItem);
|
||||
if (!hasIndexes) {
|
||||
titleProgressController.setIndexesDownloadMode();
|
||||
titleProgressController.visible = true;
|
||||
} else if (isDownloading) {
|
||||
titleProgressController.setMapDownloadMode();
|
||||
if (downloadThread.getCurrentDownloadingItem() == indexItem) {
|
||||
titleProgressController.indeterminate = false;
|
||||
titleProgressController.progress = downloadThread.getCurrentDownloadingItemProgress();
|
||||
} else {
|
||||
titleProgressController.indeterminate = true;
|
||||
titleProgressController.progress = 0;
|
||||
}
|
||||
double mb = indexItem.getArchiveSizeMB();
|
||||
String v ;
|
||||
if (titleProgressController.progress != -1) {
|
||||
v = getMapActivity().getString(R.string.value_downloaded_from_max, mb * titleProgressController.progress / 100, mb);
|
||||
} else {
|
||||
v = getMapActivity().getString(R.string.file_size_in_mb, mb);
|
||||
}
|
||||
if(indexItem.getType() == DownloadActivityType.ROADS_FILE) {
|
||||
titleProgressController.caption = indexItem.getType().getString(getMapActivity()) + " • " + v;
|
||||
} else {
|
||||
titleProgressController.caption = v;
|
||||
}
|
||||
titleProgressController.visible = true;
|
||||
} else {
|
||||
titleProgressController.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteItem() {
|
||||
final OsmandApplication app = getMapActivity().getMyApplication();
|
||||
final File fl = indexItem.getTargetFile(app);
|
||||
if (fl.exists()) {
|
||||
AlertDialog.Builder confirm = new AlertDialog.Builder(getMapActivity());
|
||||
confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
getMapActivity().getContextMenu().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
boolean successfull = Algorithms.removeAllFiles(fl.getAbsoluteFile());
|
||||
if (successfull) {
|
||||
app.getResourceManager().closeFile(fl.getName());
|
||||
}
|
||||
app.getDownloadThread().updateLoadedFiles();
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void onPostExecute(Void result) {
|
||||
getMapActivity().refreshMap();
|
||||
}
|
||||
|
||||
}.execute((Void) null);
|
||||
}
|
||||
});
|
||||
confirm.setNegativeButton(R.string.shared_string_no, null);
|
||||
String fn = FileNameTranslationHelper.getFileName(getMapActivity(), app.getRegions(),
|
||||
indexItem.getVisibleName(getMapActivity(), app.getRegions()));
|
||||
confirm.setMessage(getMapActivity().getString(R.string.delete_confirmation_msg, fn));
|
||||
confirm.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,8 @@ import net.osmand.plus.mapcontextmenu.MenuController;
|
|||
|
||||
public class MyLocationMenuController extends MenuController {
|
||||
|
||||
private PointDescription pointDescription;
|
||||
|
||||
public MyLocationMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
this.pointDescription = pointDescription;
|
||||
public MyLocationMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,6 +28,6 @@ public class MyLocationMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return pointDescription.getTypeName();
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.osmand.plus.mapcontextmenu.controllers;
|
|||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
|
@ -15,8 +16,8 @@ public class OsMoMenuController extends MenuController {
|
|||
|
||||
private OsMoDevice device;
|
||||
|
||||
public OsMoMenuController(OsmandApplication app, MapActivity mapActivity, final OsMoDevice device) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
public OsMoMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final OsMoDevice device) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
this.device = device;
|
||||
}
|
||||
|
||||
|
@ -41,7 +42,7 @@ public class OsMoMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return device.getVisibleName();
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,13 +14,11 @@ import net.osmand.util.Algorithms;
|
|||
|
||||
public class ParkingPositionMenuController extends MenuController {
|
||||
|
||||
private PointDescription pointDescription;
|
||||
private ParkingPositionPlugin plugin;
|
||||
private String parkingDescription = "";
|
||||
|
||||
public ParkingPositionMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
this.pointDescription = pointDescription;
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
plugin = OsmandPlugin.getPlugin(ParkingPositionPlugin.class);
|
||||
if (plugin != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -60,7 +58,7 @@ public class ParkingPositionMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return pointDescription.getTypeName();
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,11 +13,8 @@ import net.osmand.util.Algorithms;
|
|||
|
||||
public class PointDescriptionMenuController extends MenuController {
|
||||
|
||||
private PointDescription pointDescription;
|
||||
|
||||
public PointDescriptionMenuController(OsmandApplication app, MapActivity mapActivity, final PointDescription pointDescription) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
this.pointDescription = pointDescription;
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,7 +24,7 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public boolean needTypeStr() {
|
||||
String typeName = pointDescription.getTypeName();
|
||||
String typeName = getPointDescription().getTypeName();
|
||||
return (typeName != null && !Algorithms.isEmpty(typeName));
|
||||
}
|
||||
|
||||
|
@ -38,7 +35,7 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public Drawable getLeftIcon() {
|
||||
return getIcon(SearchHistoryFragment.getItemIcon(pointDescription));
|
||||
return getIcon(SearchHistoryFragment.getItemIcon(getPointDescription()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,13 +49,13 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return pointDescription.getSimpleName(getMapActivity(), false);
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
if (needTypeStr()) {
|
||||
return pointDescription.getTypeName();
|
||||
return getPointDescription().getTypeName();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
@ -66,6 +63,6 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public boolean needStreetName() {
|
||||
return !pointDescription.isAddress();
|
||||
return !getPointDescription().isAddress();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package net.osmand.plus.mapcontextmenu.controllers;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.Log;
|
||||
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
|
@ -15,8 +17,8 @@ public class TargetPointMenuController extends MenuController {
|
|||
|
||||
private TargetPoint targetPoint;
|
||||
|
||||
public TargetPointMenuController(OsmandApplication app, MapActivity mapActivity, final TargetPoint targetPoint) {
|
||||
super(new MenuBuilder(app), mapActivity);
|
||||
public TargetPointMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final TargetPoint targetPoint) {
|
||||
super(new MenuBuilder(app), pointDescription, mapActivity);
|
||||
this.targetPoint = targetPoint;
|
||||
leftTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
|
@ -41,7 +43,7 @@ public class TargetPointMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public boolean needTypeStr() {
|
||||
return true;
|
||||
return !Algorithms.isEmpty(getNameStr());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,14 +65,7 @@ public class TargetPointMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
String name = "";
|
||||
if (targetPoint.getOriginalPointDescription() != null) {
|
||||
name = targetPoint.getOriginalPointDescription().getSimpleName(getMapActivity(), false);
|
||||
}
|
||||
if (Algorithms.isEmpty(name)) {
|
||||
name = getTypeStr();
|
||||
}
|
||||
return name;
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,13 +73,8 @@ public class TargetPointMenuController extends MenuController {
|
|||
return targetPoint.getPointDescription(getMapActivity()).getTypeName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displayStreetNameinTitle() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needStreetName() {
|
||||
return Algorithms.isEmpty(targetPoint.getOnlyName());
|
||||
return !needTypeStr();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,22 +2,21 @@ package net.osmand.plus.mapcontextmenu.controllers;
|
|||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.GPXUtilities.WptPt;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.base.FavoriteImageDrawable;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.mapcontextmenu.builders.FavouritePointMenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.builders.WptPtMenuBuilder;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
public class WptPtMenuController extends MenuController {
|
||||
|
||||
private WptPt wpt;
|
||||
|
||||
public WptPtMenuController(OsmandApplication app, MapActivity mapActivity, final WptPt wpt) {
|
||||
super(new WptPtMenuBuilder(app, wpt), mapActivity);
|
||||
public WptPtMenuController(OsmandApplication app, MapActivity mapActivity, PointDescription pointDescription, final WptPt wpt) {
|
||||
super(new WptPtMenuBuilder(app, wpt), pointDescription, mapActivity);
|
||||
this.wpt = wpt;
|
||||
}
|
||||
|
||||
|
@ -45,7 +44,7 @@ public class WptPtMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public boolean needTypeStr() {
|
||||
return true;
|
||||
return wpt.category != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,16 +54,13 @@ public class WptPtMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public Drawable getSecondLineIcon() {
|
||||
return getIcon(R.drawable.ic_small_group);
|
||||
if (wpt.category != null) {
|
||||
return getIcon(R.drawable.ic_small_group);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public int getFavActionIconId() {
|
||||
return R.drawable.ic_action_edit_dark;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public String getTypeStr() {
|
||||
return wpt.category != null ? wpt.category : getMapActivity().getString(R.string.shared_string_none);
|
||||
|
@ -72,6 +68,6 @@ public class WptPtMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
public String getNameStr() {
|
||||
return wpt.name != null ? wpt.name : getMapActivity().getString(R.string.gpx_wpt);
|
||||
return getPointDescription().getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,11 +241,13 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
|
|||
|
||||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
// if(o instanceof OsMoDevice) {
|
||||
// return map.getString(R.string.osmo_user_name) + " " + ((OsMoDevice) o).getVisibleName();
|
||||
// }
|
||||
String desc = getObjectDescription(o);
|
||||
return desc == null ? null : new PointDescription(PointDescription.POINT_TYPE_MARKER, desc);
|
||||
if(o instanceof OsMoDevice) {
|
||||
return new PointDescription(PointDescription.POINT_TYPE_MARKER, map.getString(R.string.osmo_user_name) + " " + ((OsMoDevice) o).getVisibleName());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
//String desc = getObjectDescription(o);
|
||||
//return desc == null ? null : new PointDescription(PointDescription.POINT_TYPE_MARKER, desc);
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
|
|
|
@ -139,7 +139,7 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL
|
|||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
return new PointDescription(PointDescription.POINT_TYPE_PARKING_MARKER,
|
||||
view.getContext().getString(R.string.osmand_parking_position_name), "");
|
||||
view.getContext().getString(R.string.osmand_parking_position_name));
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
|
|
|
@ -334,7 +334,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
private boolean mIgnoreEvent = false;
|
||||
private Calendar cal = Calendar.getInstance();
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onTimeChanged(TimePicker timePicker, int hourOfDay, int minute) {
|
||||
if (mIgnoreEvent) {
|
||||
|
|
|
@ -356,6 +356,17 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe
|
|||
|
||||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
if (o instanceof BinaryMapDataObject) {
|
||||
String fullName = osmandRegions.getFullName((BinaryMapDataObject) o);
|
||||
final WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||
if (region != null) {
|
||||
return new PointDescription(PointDescription.POINT_TYPE_WORLD_REGION,
|
||||
view.getContext().getString(R.string.shared_string_map), region.getLocaleName());
|
||||
} else {
|
||||
return new PointDescription(PointDescription.POINT_TYPE_WORLD_REGION,
|
||||
view.getContext().getString(R.string.shared_string_map), ((BinaryMapDataObject) o).getName());
|
||||
}
|
||||
}
|
||||
return new PointDescription(PointDescription.POINT_TYPE_WORLD_REGION,
|
||||
view.getContext().getString(R.string.shared_string_map), "");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue