Merge branch 'master' of github.com:osmandapp/Osmand
This commit is contained in:
commit
00ef7bc0be
17 changed files with 460 additions and 80 deletions
|
@ -1,9 +1,7 @@
|
||||||
package net.osmand.osm;
|
package net.osmand.osm;
|
||||||
|
|
||||||
import net.osmand.CollatorStringMatcher;
|
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.StringMatcher;
|
import net.osmand.StringMatcher;
|
||||||
import net.osmand.CollatorStringMatcher.StringMatcherMode;
|
|
||||||
import net.osmand.data.Amenity;
|
import net.osmand.data.Amenity;
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
|
|
||||||
|
@ -375,6 +373,10 @@ public class MapPoiTypes {
|
||||||
(lastFilter != null ? lastFilter : lastCategory));
|
(lastFilter != null ? lastFilter : lastCategory));
|
||||||
tp.setTopVisible(Boolean.parseBoolean(parser.getAttributeValue("", "top")));
|
tp.setTopVisible(Boolean.parseBoolean(parser.getAttributeValue("", "top")));
|
||||||
tp.setText("text".equals(parser.getAttributeValue("", "type")));
|
tp.setText("text".equals(parser.getAttributeValue("", "type")));
|
||||||
|
String orderStr = parser.getAttributeValue("", "order");
|
||||||
|
if (!Algorithms.isEmpty(orderStr)) {
|
||||||
|
tp.setOrder(Integer.parseInt(orderStr));
|
||||||
|
}
|
||||||
tp.setOsmTag(otag);
|
tp.setOsmTag(otag);
|
||||||
tp.setNotEditableOsm("true".equals(parser.getAttributeValue("", "no_edit")));
|
tp.setNotEditableOsm("true".equals(parser.getAttributeValue("", "no_edit")));
|
||||||
tp.setOsmValue(parser.getAttributeValue("", "value"));
|
tp.setOsmValue(parser.getAttributeValue("", "value"));
|
||||||
|
@ -409,6 +411,10 @@ public class MapPoiTypes {
|
||||||
tp.setOsmTag2(parser.getAttributeValue("", "tag2"));
|
tp.setOsmTag2(parser.getAttributeValue("", "tag2"));
|
||||||
tp.setOsmValue2(parser.getAttributeValue("", "value2"));
|
tp.setOsmValue2(parser.getAttributeValue("", "value2"));
|
||||||
tp.setText("text".equals(parser.getAttributeValue("", "type")));
|
tp.setText("text".equals(parser.getAttributeValue("", "type")));
|
||||||
|
String orderStr = parser.getAttributeValue("", "order");
|
||||||
|
if (!Algorithms.isEmpty(orderStr)) {
|
||||||
|
tp.setOrder(Integer.parseInt(orderStr));
|
||||||
|
}
|
||||||
tp.setNameOnly("true".equals(parser.getAttributeValue("", "name_only")));
|
tp.setNameOnly("true".equals(parser.getAttributeValue("", "name_only")));
|
||||||
tp.setNameTag(parser.getAttributeValue("", "name_tag"));
|
tp.setNameTag(parser.getAttributeValue("", "name_tag"));
|
||||||
tp.setRelation("true".equals(parser.getAttributeValue("", "relation")));
|
tp.setRelation("true".equals(parser.getAttributeValue("", "relation")));
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class PoiType extends AbstractPoiType {
|
||||||
private boolean text;
|
private boolean text;
|
||||||
private boolean nameOnly;
|
private boolean nameOnly;
|
||||||
private boolean relation;
|
private boolean relation;
|
||||||
|
private int order = 90;
|
||||||
|
|
||||||
|
|
||||||
public PoiType(MapPoiTypes poiTypes, PoiCategory category, String name) {
|
public PoiType(MapPoiTypes poiTypes, PoiCategory category, String name) {
|
||||||
|
@ -145,6 +146,13 @@ public class PoiType extends AbstractPoiType {
|
||||||
this.relation = relation;
|
this.relation = relation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(int order) {
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
@ -159,6 +167,7 @@ public class PoiType extends AbstractPoiType {
|
||||||
", text=" + text +
|
", text=" + text +
|
||||||
", nameOnly=" + nameOnly +
|
", nameOnly=" + nameOnly +
|
||||||
", relation=" + relation +
|
", relation=" + relation +
|
||||||
|
", order=" + order +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ task updateNoTranslate(type: Copy) {
|
||||||
task validateTranslate {
|
task validateTranslate {
|
||||||
println "Validating translations"
|
println "Validating translations"
|
||||||
|
|
||||||
new java.io.File("res").eachFileRecurse groovy.io.FileType.FILES, {
|
file("res").eachFileRecurse groovy.io.FileType.FILES, {
|
||||||
if (it.name == "strings.xml" || it.name == "phrases.xml") {
|
if (it.name == "strings.xml" || it.name == "phrases.xml") {
|
||||||
it.eachLine { line ->
|
it.eachLine { line ->
|
||||||
if (line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") ||
|
if (line.contains("\$ s") || line.contains("\$ d") || line.contains("\$ f") ||
|
||||||
|
|
|
@ -142,6 +142,7 @@
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:textColor="?android:textColorPrimary"
|
android:textColor="?android:textColorPrimary"
|
||||||
android:textColorHint="?android:textColorSecondary"
|
android:textColorHint="?android:textColorSecondary"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
android:inputType="text"/>
|
android:inputType="text"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
android:textColor="?android:textColorPrimary"
|
android:textColor="?android:textColorPrimary"
|
||||||
android:textColorHint="?android:textColorSecondary"
|
android:textColorHint="?android:textColorSecondary"
|
||||||
android:text="Name"
|
android:text="Name"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
android:inputType="text"/>
|
android:inputType="text"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -590,7 +590,7 @@ OsmAnd е с отворен код и активно да се развива.
|
||||||
<string name="prefs_plugins_descr">Добавките внасят допълнителна функционалност на приложението</string>
|
<string name="prefs_plugins_descr">Добавките внасят допълнителна функционалност на приложението</string>
|
||||||
<string name="prefs_plugins">Добавки</string>
|
<string name="prefs_plugins">Добавки</string>
|
||||||
|
|
||||||
<string name="osm_editing_plugin_description"/>
|
<string name="osm_editing_plugin_description">Добавка за изпращане на данни към OSM - обекти (POI), бележки, GPX записани маршрути. За подробности по проекта OSM посетете http://openstreetmap.org. Вашият принос към проекта ще бъде оценен с благодарности. Необходимо е да се регистрирате на сайта на OSM и да въведете Вашето потребителско име и парола в това приложение.</string>
|
||||||
<string name="vector_maps_may_display_faster_on_some_devices">По-бързо изчертаване на векторни карти. Възможно е да не работи добре при някои устройства.</string>
|
<string name="vector_maps_may_display_faster_on_some_devices">По-бързо изчертаване на векторни карти. Възможно е да не работи добре при някои устройства.</string>
|
||||||
<string name="play_commands_of_currently_selected_voice">Анонсиране със зададения гласов пакет</string>
|
<string name="play_commands_of_currently_selected_voice">Анонсиране със зададения гласов пакет</string>
|
||||||
<string name="debugging_and_development">За разработчици</string>
|
<string name="debugging_and_development">За разработчици</string>
|
||||||
|
@ -1327,7 +1327,7 @@ OsmAnd е с отворен код и активно да се развива.
|
||||||
<string name="poi_dialog_comment_default">Промяна на POI</string>
|
<string name="poi_dialog_comment_default">Промяна на POI</string>
|
||||||
<string name="poi_dialog_other_tags_message">Всички други тагове се запазват</string>
|
<string name="poi_dialog_other_tags_message">Всички други тагове се запазват</string>
|
||||||
<string name="default_buttons_commit">Изпрати</string>
|
<string name="default_buttons_commit">Изпрати</string>
|
||||||
<string name="shared_string_clear">Нулиране</string>
|
<string name="shared_string_clear">Изчисти</string>
|
||||||
<string name="filter_current_poiButton">Филтър</string>
|
<string name="filter_current_poiButton">Филтър</string>
|
||||||
|
|
||||||
<string name="edit_filter_save_as_menu_item">Запиши като</string>
|
<string name="edit_filter_save_as_menu_item">Запиши като</string>
|
||||||
|
@ -2207,4 +2207,6 @@ OsmAnd е с отворен код и активно да се развива.
|
||||||
<string name="we_really_care_about_your_opinion">Вашето мнение е важно за нас.</string>
|
<string name="we_really_care_about_your_opinion">Вашето мнение е важно за нас.</string>
|
||||||
<string name="use_fast_recalculation_desc">Преизчисляване само началната част от дълги маршрути</string>
|
<string name="use_fast_recalculation_desc">Преизчисляване само началната част от дълги маршрути</string>
|
||||||
<string name="create_poi_link_to_osm_doc"><u>Онлайн OSM</u> класификация на картите с изображения</string>
|
<string name="create_poi_link_to_osm_doc"><u>Онлайн OSM</u> класификация на картите с изображения</string>
|
||||||
|
<string name="free_downloads_used_description">Показва използваните безплатни файлове за изтегляне</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1709,10 +1709,10 @@
|
||||||
<string name="poi_religion_multifaith">Mehrfachgläubig</string>
|
<string name="poi_religion_multifaith">Mehrfachgläubig</string>
|
||||||
<string name="poi_religion_scientologist">Scientology</string>
|
<string name="poi_religion_scientologist">Scientology</string>
|
||||||
<string name="poi_denomination_uniting">Vereinigung</string>
|
<string name="poi_denomination_uniting">Vereinigung</string>
|
||||||
<string name="poi_denomination_congregational">Congregational</string>
|
<string name="poi_denomination_congregational">Kongregationalismus</string>
|
||||||
<string name="poi_denomination_ethiopian_orthodox_tewahedo">Äthiopisch-orthodoxe tewahedo-Kirche</string>
|
<string name="poi_denomination_ethiopian_orthodox_tewahedo">Äthiopisch-orthodoxe tewahedo-Kirche</string>
|
||||||
<string name="poi_denomination_unitarian">Unitarisch</string>
|
<string name="poi_denomination_unitarian">Unitarisch</string>
|
||||||
<string name="poi_denomination_wesleyan">Wesleyan</string>
|
<string name="poi_denomination_wesleyan">Wesleyaner</string>
|
||||||
<string name="poi_denomination_shingon_shu">Schule des wahren Wortes</string>
|
<string name="poi_denomination_shingon_shu">Schule des wahren Wortes</string>
|
||||||
<string name="poi_denomination_mahayana">Mahayana</string>
|
<string name="poi_denomination_mahayana">Mahayana</string>
|
||||||
|
|
||||||
|
@ -2393,4 +2393,55 @@
|
||||||
<string name="poi_historic_period_roman_greece">Historisches Zeitalter: Römisch-griechisch (146 v. Chr - 330 n. Chr.)</string>
|
<string name="poi_historic_period_roman_greece">Historisches Zeitalter: Römisch-griechisch (146 v. Chr - 330 n. Chr.)</string>
|
||||||
<string name="poi_historic_period_roman_kingdom">Historisches Zeitalter: Römische Königszeit (756 - 509 v. Chr.)</string>
|
<string name="poi_historic_period_roman_kingdom">Historisches Zeitalter: Römische Königszeit (756 - 509 v. Chr.)</string>
|
||||||
<string name="poi_historic_period_dominate">Historisches Zeitalter: Dominat (285 - 476 n. Chr.)</string>
|
<string name="poi_historic_period_dominate">Historisches Zeitalter: Dominat (285 - 476 n. Chr.)</string>
|
||||||
|
<string name="poi_historic_period_ptolemaic_egypt">Historisches Zeitalter: Ptolemäisches Königreich (305 - 30 v. Chr.)</string>
|
||||||
|
<string name="poi_historic_period_villager">Historisches Zeitalter: Spiedler (Epoche I, II, 1580 v. Chr. - 133 n. Chr.)</string>
|
||||||
|
<string name="poi_historic_period_urban">Historisches Zeitalter: städtisch (Epoche III, 133 - 374 n. Chr.)</string>
|
||||||
|
<string name="poi_historic_period_classical">Historisches Zeitalter: Klassik (Epache IV, 374 - 900 n. Chr.)</string>
|
||||||
|
<string name="poi_historic_period_imperial">"Historisches Zeitalter: Imperialismus (Epoch V, 900 - 1200 n. Chr.)"</string>
|
||||||
|
|
||||||
|
<string name="poi_historic_era_paleolithic">Historische Epoche: Altsteinzeit (2,6 millionen Jahre - 10000 BP (vor heute))</string>
|
||||||
|
<string name="poi_historic_era_mesolithic">Historische Epoche: Mittelsteinzeit</string>
|
||||||
|
<string name="poi_historic_era_neolithic">Historische Epoche: Jungsteinzeit</string>
|
||||||
|
<string name="poi_historic_era_chalcolithic">Historische Epoche: Kupfersteinzeit (IV-III Jahrtausend v.Chr.)</string>
|
||||||
|
|
||||||
|
<string name="poi_stone_type_conciliation_cross">Typ: Steinkreuz</string>
|
||||||
|
<string name="poi_site_type_hut_circle">Typ: Hüttenkreis</string>
|
||||||
|
<string name="poi_site_type_petroglyph">Typ: Petroglyphe</string>
|
||||||
|
<string name="poi_megalith_type_nuraghe">Megalith-Typ: Nuraghe</string>
|
||||||
|
<string name="poi_megalith_type_stone_circle">Megalith-Typ: Steinkreis</string>
|
||||||
|
<string name="poi_megalith_type_passage_grave">Megalith-Typ: Ganggrab</string>
|
||||||
|
<string name="poi_summit_cross">Gipfelkreuz: Ja</string>
|
||||||
|
|
||||||
|
<string name="poi_conveying_yes">Vermittlung: Ja</string>
|
||||||
|
|
||||||
|
<string name="poi_wiki_lang_af">Afrikanisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_az">Aserbaidschanisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_bn">Bengalisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_bpy">Bishnupriyaisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_br">Bretonisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_cy">Walisisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_eo">Esperantoisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_eu">baskisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_fa">Farsisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_ml">Malayalamisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_mr">Marathisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_nv">Navajoisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_war">Warayisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_min">Minangkabauisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_zhminnan">Minnanisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_mg">Malagasisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_tt">Tatarisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_ky">kirgisisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_tg">Tadschikisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_ba">baschkirisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_sco">Schottisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_pnb">Panjabisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_cv">Tschuwaschisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_my">Burmesisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_yo">Yorubaisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_an">Aragonesisches Wiki</string>
|
||||||
|
<string name="poi_wiki_lang_gu">Gujaratisches Wiki</string>
|
||||||
|
<string name="poi_wetland_palsa_bog">Palsamoor</string>
|
||||||
|
<string name="poi_payment_icsf_yes">IC gespeicherte Fährfahrkarten akzeptiert</string>
|
||||||
|
<string name="poi_payment_icsf_no">IC gespeicherte Fährfahrkarten nicht akzeptiert</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1037,7 +1037,7 @@
|
||||||
<string name="recording_description">Nagranie %1$s %3$s %2$s</string>
|
<string name="recording_description">Nagranie %1$s %3$s %2$s</string>
|
||||||
<string name="recording_default_name">Nagranie</string>
|
<string name="recording_default_name">Nagranie</string>
|
||||||
<string name="shared_string_control_stop">Stop</string>
|
<string name="shared_string_control_stop">Stop</string>
|
||||||
<string name="shared_string_control_start">Rozpocznij</string>
|
<string name="shared_string_control_start">Start</string>
|
||||||
<string name="map_widget_av_notes">Notatki audio/video</string>
|
<string name="map_widget_av_notes">Notatki audio/video</string>
|
||||||
<string name="osmand_srtm_short_description_80_chars">Wtyczka OsmAnd do rysowania poziomic offline</string>
|
<string name="osmand_srtm_short_description_80_chars">Wtyczka OsmAnd do rysowania poziomic offline</string>
|
||||||
|
|
||||||
|
|
|
@ -526,7 +526,7 @@
|
||||||
<string name="poi_religion_shinto">Xintoísmo</string>
|
<string name="poi_religion_shinto">Xintoísmo</string>
|
||||||
<string name="poi_religion_taoist">Taoísmo</string>
|
<string name="poi_religion_taoist">Taoísmo</string>
|
||||||
|
|
||||||
<string name="poi_internet_access_wlan">Acesso à Internet: wlan</string>
|
<string name="poi_internet_access_wlan">Acesso à Internet: wifi</string>
|
||||||
<string name="poi_internet_access_terminal">Acesso à Internet: terminal</string>
|
<string name="poi_internet_access_terminal">Acesso à Internet: terminal</string>
|
||||||
<string name="poi_internet_access_wired">Acesso à Internet: com fio</string>
|
<string name="poi_internet_access_wired">Acesso à Internet: com fio</string>
|
||||||
<string name="poi_internet_access_public">Acesso à Internet: público</string>
|
<string name="poi_internet_access_public">Acesso à Internet: público</string>
|
||||||
|
@ -1746,10 +1746,194 @@
|
||||||
<string name="poi_resource_lignite">Linhite</string>
|
<string name="poi_resource_lignite">Linhite</string>
|
||||||
<string name="poi_resource_limestone">Pedra calcária</string>
|
<string name="poi_resource_limestone">Pedra calcária</string>
|
||||||
<string name="poi_resource_marble">Mármore</string>
|
<string name="poi_resource_marble">Mármore</string>
|
||||||
<string name="poi_resource_mercury"/>
|
<string name="poi_resource_mercury">Mercúrio</string>
|
||||||
<string name="poi_resource_mica">Mica</string>
|
<string name="poi_resource_mica">Mica</string>
|
||||||
<string name="poi_resource_mineral_oil">Óleo mineral</string>
|
<string name="poi_resource_mineral_oil">Óleo mineral</string>
|
||||||
<string name="poi_resource_nickel">Níquel</string>
|
<string name="poi_resource_nickel">Níquel</string>
|
||||||
<string name="poi_resource_oil">Petróleo</string>
|
<string name="poi_resource_oil">Petróleo</string>
|
||||||
<string name="poi_resource_opal">Opala</string>
|
<string name="poi_resource_opal">Opala</string>
|
||||||
|
<string name="poi_resource_peat">Turfa</string>
|
||||||
|
<string name="poi_resource_platinum">Platina</string>
|
||||||
|
<string name="poi_resource_radium">Rádio</string>
|
||||||
|
<string name="poi_resource_ruby">Rubi</string>
|
||||||
|
<string name="poi_resource_rutile">Rutilo</string>
|
||||||
|
<string name="poi_resource_salt">Sal</string>
|
||||||
|
<string name="poi_resource_sand">Areia</string>
|
||||||
|
<string name="poi_resource_sandstone">Arenito</string>
|
||||||
|
<string name="poi_resource_silica">Sílica</string>
|
||||||
|
<string name="poi_resource_silver">Prata</string>
|
||||||
|
<string name="poi_resource_slate_iron_ore_copper">Ardósia; minério de ferro; cobre</string>
|
||||||
|
<string name="poi_resource_slate">Ardósia</string>
|
||||||
|
<string name="poi_resource_stone">Pedra</string>
|
||||||
|
<string name="poi_resource_tin">Estanho</string>
|
||||||
|
<string name="poi_resource_tuff">Tufa</string>
|
||||||
|
<string name="poi_resource_uranium">Urânio</string>
|
||||||
|
<string name="poi_resource_vanadium">Vanádio</string>
|
||||||
|
<string name="poi_resource_water">Água</string>
|
||||||
|
<string name="poi_resource_zinc">Zinco</string>
|
||||||
|
<string name="poi_resource_zircon">Zircão</string>
|
||||||
|
|
||||||
|
<string name="poi_wetland_wet_meadow">Prado úmido</string>
|
||||||
|
<string name="poi_wetland_bog">Pântano</string>
|
||||||
|
<string name="poi_wetland_marsh">Charco</string>
|
||||||
|
<string name="poi_wetland_reedbed">Canavial</string>
|
||||||
|
<string name="poi_wetland_swamp">Brejo</string>
|
||||||
|
<string name="poi_wetland_saltern">Salina</string>
|
||||||
|
<string name="poi_chimney">Chaminé</string>
|
||||||
|
<string name="poi_palm">Palmeira</string>
|
||||||
|
<string name="poi_cypress">Cipreste</string>
|
||||||
|
<string name="poi_bench_yes">Com assento</string>
|
||||||
|
<string name="poi_bench_no">Sem assento</string>
|
||||||
|
<string name="poi_waste_basket_yes">Com lixeira</string>
|
||||||
|
<string name="poi_waste_basket_no">Sem lixeira</string>
|
||||||
|
|
||||||
|
<string name="poi_shelter_type_public_transport">Tipo de abrigo: transporte público</string>
|
||||||
|
<string name="poi_shelter_type_picnic_shelter">Tipo de abrigo: abrigo de piquenique</string>
|
||||||
|
<string name="poi_shelter_type_weather_shelter">Tipo de abrigo: abrigo do tempo</string>
|
||||||
|
<string name="poi_piste_grooming_scooter">Pista de preparação: scooter</string>
|
||||||
|
<string name="poi_piste_grooming_skating">Pista de preparação: skating</string>
|
||||||
|
<string name="poi_piste_grooming_no">Pista de preparação: não</string>
|
||||||
|
<string name="poi_piste_grooming_mogul">Pista de preparação: mogul</string>
|
||||||
|
|
||||||
|
<string name="poi_aerialway_bubble_yes">Bolha</string>
|
||||||
|
<string name="poi_aerialway_bubble_no">Sem bolha</string>
|
||||||
|
<string name="poi_vending_bicycle_tube">Tubos para bicicletas</string>
|
||||||
|
<string name="poi_branch">Seção</string>
|
||||||
|
|
||||||
|
<string name="poi_memorial_cross">Cruzeiro</string>
|
||||||
|
<string name="poi_wetland_tidalflat">Planície de maré</string>
|
||||||
|
<string name="poi_wetland_saltmarsh">Pântano salgado</string>
|
||||||
|
<string name="poi_wetland_mangrove">Mangue</string>
|
||||||
|
<string name="poi_wetland_string_bog">Cadeia de pântanos</string>
|
||||||
|
<string name="poi_wetland_fen">Pântano subeterrâneo</string>
|
||||||
|
<string name="poi_wetland_palsa_bog">Pântano palsa</string>
|
||||||
|
<string name="poi_wetland_mud">Lama</string>
|
||||||
|
|
||||||
|
<string name="poi_beach_sand">Tipo de praia: areia</string>
|
||||||
|
<string name="poi_beach_shingle">Tipo de praia: cascalho</string>
|
||||||
|
<string name="poi_beach_rocky">Tipo de praia: rocha</string>
|
||||||
|
|
||||||
|
<string name="poi_flagpole">Mastro de bandeira</string>
|
||||||
|
|
||||||
|
<string name="poi_shelter_type_lean_to">Tipo de abrigo: alpendre</string>
|
||||||
|
<string name="poi_shelter_type_basic_hut">Tipo de abrigo: cabana básica</string>
|
||||||
|
<string name="poi_shelter_type_building">Tipo de abrigo: edifício</string>
|
||||||
|
<string name="poi_shelter_type_wildlife_hide">Tipo de abrigo: esconderijo para animais selvagens</string>
|
||||||
|
<string name="poi_shelter_type_rock_shelter">Tipo de abrigo: rocha</string>
|
||||||
|
<string name="poi_shelter_type_sun_shelter">Tipo de abrigo: abrigo do sol</string>
|
||||||
|
<string name="poi_shelter_type_field_shelter">Tipo de abrigo: abrigo de campo</string>
|
||||||
|
<string name="poi_shelter_type_tent">Tipo de abrigo: tenda</string>
|
||||||
|
<string name="poi_shelter_type_abandoned">Tipo de abrigo: abandonado</string>
|
||||||
|
|
||||||
|
<string name="poi_internet_access_type_wlan">Tipo de acesso à Internet: wifi</string>
|
||||||
|
<string name="poi_internet_access_type_terminal">Tipo de acesso à Internet: terminal</string>
|
||||||
|
<string name="poi_internet_access_type_wired">Tipo de acesso à Internet: cabo</string>
|
||||||
|
<string name="poi_internet_access_type_public">Tipo de acesso à Internet: público</string>
|
||||||
|
<string name="poi_internet_access_type_service">Tipo de acesso à Internet: serviço</string>
|
||||||
|
<string name="poi_internet_access_type_no">Sem acesso à Internet</string>
|
||||||
|
<string name="poi_internet_access_type_yes">Com acesso à Internet</string>
|
||||||
|
|
||||||
|
<string name="poi_maxwidth">Largura máxima</string>
|
||||||
|
<string name="poi_iata">Código IATA</string>
|
||||||
|
<string name="poi_icao">Código ICAO</string>
|
||||||
|
<string name="poi_faa">Código FAA</string>
|
||||||
|
|
||||||
|
<string name="poi_artwork_type_sculpture">Tipo de obra de arte: escultura</string>
|
||||||
|
<string name="poi_artwork_type_statue">Tipo de obra de arte: estátua</string>
|
||||||
|
<string name="poi_artwork_type_mural">Tipo de obra de arte: mural</string>
|
||||||
|
<string name="poi_artwork_type_architecture">Tipo de obra de arte: arquitetura</string>
|
||||||
|
<string name="poi_artwork_type_painting">Tipo de obra de arte: pintura</string>
|
||||||
|
<string name="poi_artwork_type_stone">Tipo de obra de arte: pedra</string>
|
||||||
|
<string name="poi_artwork_type_bust">Tipo de obra de arte: busto</string>
|
||||||
|
<string name="poi_artwork_type_installation">Tipo de obra de arte: instalação</string>
|
||||||
|
<string name="poi_artwork_type_mosaic">Tipo de obra de arte: mosaico</string>
|
||||||
|
<string name="poi_artwork_type_relief">Tipo de obra de arte: relevo</string>
|
||||||
|
<string name="poi_artwork_type_graffiti">Tipo de obra de arte: grafite</string>
|
||||||
|
<string name="poi_artwork_type_stele">Tipo de obra de arte: estela</string>
|
||||||
|
<string name="poi_artwork_type_fountain">Tipo de obra de arte: fonte</string>
|
||||||
|
|
||||||
|
<string name="poi_width">Largura</string>
|
||||||
|
|
||||||
|
<string name="poi_architect_name">Arquiteto</string>
|
||||||
|
|
||||||
|
<string name="poi_architecture_modern">Arquitetura: moderna</string>
|
||||||
|
<string name="poi_architecture_stalinist_neoclassicism">Arquitetura: neoclassicismo stalinista</string>
|
||||||
|
<string name="poi_architecture_eclectic">Arquitetura: eclética</string>
|
||||||
|
<string name="poi_architecture_new_objectivity">Arquitetura: nova objetividade</string>
|
||||||
|
<string name="poi_architecture_contemporary">Arquitetura: contemporâneo</string>
|
||||||
|
<string name="poi_architecture_constructivism">Arquitetura: construtivismo</string>
|
||||||
|
<string name="poi_architecture_umgebinde">Arquitetura: umgebinde</string>
|
||||||
|
<string name="poi_architecture_timber_frame">Arquitetura: enxaimel</string>
|
||||||
|
<string name="poi_architecture_art_nouveau">Arquitetura: art nouveau</string>
|
||||||
|
<string name="poi_architecture_neoclassicism">Arquitetura: neoclassicismo</string>
|
||||||
|
<string name="poi_architecture_victorian">Arquitetura: vitoriana</string>
|
||||||
|
<string name="poi_architecture_brutalism">Arquitetura: brutalista</string>
|
||||||
|
<string name="poi_architecture_classicism">Arquitetura: classicismo</string>
|
||||||
|
<string name="poi_architecture_gothic">Arquitetura: gótica</string>
|
||||||
|
<string name="poi_architecture_oldrussian">Arquitetura: russa antiga</string>
|
||||||
|
<string name="poi_architecture_baroque">Arquitetura: barroca</string>
|
||||||
|
<string name="poi_architecture_postconstructivism">Arquitetura: pós-construtivismo</string>
|
||||||
|
<string name="poi_architecture_wilhelminian_style">Arquitetura: estilo guilhermina</string>
|
||||||
|
<string name="poi_architecture_renaissance">Arquitetura: renascentista</string>
|
||||||
|
<string name="poi_architecture_romanesque">Arquitetura: românica</string>
|
||||||
|
|
||||||
|
<string name="poi_tunnel_waterway">Túnel fluvial</string>
|
||||||
|
<string name="poi_tunnel_car">Túnel rodoviário</string>
|
||||||
|
<string name="poi_tunnel_pedestrian">Túnel para pedestre</string>
|
||||||
|
<string name="poi_tunnel_railway">Túnel ferroviário</string>
|
||||||
|
<string name="poi_bridge_car">Ponte rodoviária</string>
|
||||||
|
<string name="poi_bridge_pedestrian">Ponte para pedestre</string>
|
||||||
|
<string name="poi_bridge_bicycle">Ponte para ciclista</string>
|
||||||
|
<string name="poi_bridge_railway">Ponte ferroviária</string>
|
||||||
|
<string name="poi_bridge_waterway">Ponte fluvial</string>
|
||||||
|
<string name="poi_bridge_structure_beam">Estrutura de ponte: viga</string>
|
||||||
|
<string name="poi_bridge_structure_simple_suspension">Estrutura de ponte: suspensão simples</string>
|
||||||
|
<string name="poi_bridge_structure_suspension">Estrutura de ponte: suspensão</string>
|
||||||
|
<string name="poi_bridge_structure_arch">Estrutura de ponte: arco</string>
|
||||||
|
<string name="poi_bridge_structure_truss">Estrutura de ponte: treliça</string>
|
||||||
|
<string name="poi_bridge_structure_floating">Estrutura de ponte: flutuante</string>
|
||||||
|
<string name="poi_bridge_structure_humpback">Estrutura de ponte: corcunda</string>
|
||||||
|
<string name="poi_bridge_structure_cable_stayed">Estrutura de ponte: estaiada</string>
|
||||||
|
<string name="poi_bridge_structure_boardwalk">Estrutura de ponte: passarela</string>
|
||||||
|
<string name="poi_bridge_structure_simple_wooden">Estrutura de ponte: madeira simples</string>
|
||||||
|
<string name="poi_bridge_structure_viaduct">Estrutura de ponte: viaduto</string>
|
||||||
|
<string name="poi_bridge_structure_aqueduct">Estrutura de ponte: aqueduto</string>
|
||||||
|
<string name="poi_bridge_structure_log">Estrutura de ponte: tronco</string>
|
||||||
|
<string name="poi_bridge_type_movable">Tipo de ponte: móvel</string>
|
||||||
|
<string name="poi_bridge_movable_bascule">Tipo de ponte móvel: basculante</string>
|
||||||
|
<string name="poi_bridge_movable_swing">Tipo de ponte móvel: giratória</string>
|
||||||
|
<string name="poi_bridge_movable_lift">Tipo de ponte móvel: elevatória</string>
|
||||||
|
<string name="poi_bridge_movable_drawbridge">Tipo de ponte móvel: ponte levadiça</string>
|
||||||
|
<string name="poi_bridge_movable_submersible">Tipo de ponte móvel: submersível</string>
|
||||||
|
<string name="poi_bridge_movable_transporter">Tipo de ponte móvel: transportadora</string>
|
||||||
|
<string name="poi_bridge_movable_retractable">Tipo de ponte móvel: retrátil</string>
|
||||||
|
|
||||||
|
<string name="poi_lit_yes">Iluminado: sim</string>
|
||||||
|
<string name="poi_lit_no">Iluminado: não</string>
|
||||||
|
|
||||||
|
<string name="poi_surface_unpaved">Superfície: não pavimentada</string>
|
||||||
|
<string name="poi_surface_paved">Superfície: pavimentada</string>
|
||||||
|
<string name="poi_surface_asphalt">Superfície: asfalto</string>
|
||||||
|
<string name="poi_surface_concrete">Superfície: concreto</string>
|
||||||
|
<string name="poi_surface_sett">Superfície: paralelepípedo</string>
|
||||||
|
<string name="poi_surface_cobblestone">Superfície: piso de seixos</string>
|
||||||
|
<string name="poi_surface_paving_stones">Superfície: piso intertravado</string>
|
||||||
|
<string name="poi_surface_pebblestone">Superfície: cascalho</string>
|
||||||
|
<string name="poi_surface_stone">Superfície: pedra</string>
|
||||||
|
<string name="poi_surface_metal">Superfície: metal</string>
|
||||||
|
<string name="poi_surface_wood">Superfície: madeira</string>
|
||||||
|
<string name="poi_surface_gravel">Superfície: brita</string>
|
||||||
|
<string name="poi_surface_fine_gravel">Superfície: brita fina</string>
|
||||||
|
<string name="poi_surface_compacted">Superfície: solo compactado</string>
|
||||||
|
<string name="poi_surface_sand">Superfície: areia</string>
|
||||||
|
<string name="poi_surface_grass">Superfície: grama</string>
|
||||||
|
<string name="poi_surface_grass_paver">Superfície: piso grama</string>
|
||||||
|
<string name="poi_surface_ground">Superfície: chão</string>
|
||||||
|
<string name="poi_surface_dirt">Superfície: solo</string>
|
||||||
|
<string name="poi_surface_mud">Superfície: lama</string>
|
||||||
|
<string name="poi_surface_ice">Superfície: gelo</string>
|
||||||
|
<string name="poi_surface_salt">Superfície: sal</string>
|
||||||
|
<string name="poi_surface_snow">Superfície: neve</string>
|
||||||
|
|
||||||
|
<string name="poi_route_bus_ref">Ônibus</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2354,4 +2354,22 @@
|
||||||
|
|
||||||
<string name="poi_aerialway_length">長度</string>
|
<string name="poi_aerialway_length">長度</string>
|
||||||
|
|
||||||
</resources>
|
<string name="poi_wiki_lang_ast">阿斯圖爾-萊昂語維基</string>
|
||||||
|
<string name="poi_wiki_lang_tg">塔吉克語維基</string>
|
||||||
|
<string name="poi_wiki_lang_ba">巴什基爾語維基</string>
|
||||||
|
<string name="poi_wiki_lang_sco">低地蘇格蘭語維基</string>
|
||||||
|
<string name="poi_wiki_lang_pnb">旁遮普語維基</string>
|
||||||
|
<string name="poi_wiki_lang_cv">楚瓦什語維基</string>
|
||||||
|
<string name="poi_wiki_lang_lmo">倫巴底語維基</string>
|
||||||
|
<string name="poi_wiki_lang_my">緬甸語維基</string>
|
||||||
|
<string name="poi_wiki_lang_yo">約魯巴語維基</string>
|
||||||
|
<string name="poi_wiki_lang_an">亞拉岡語維基</string>
|
||||||
|
<string name="poi_wiki_lang_ne">尼泊爾語維基</string>
|
||||||
|
<string name="poi_wiki_lang_gu">古吉拉特語維基</string>
|
||||||
|
<string name="poi_wiki_lang_scn">西西里語維基</string>
|
||||||
|
<string name="poi_wiki_lang_bar">巴伐利亞語維基</string>
|
||||||
|
<string name="poi_wiki_lang_mn">蒙古語維基</string>
|
||||||
|
<string name="poi_wiki_lang_nap">那不勒斯語維基</string>
|
||||||
|
|
||||||
|
<string name="poi_craft_electronics">3C產品維修</string>
|
||||||
|
</resources>
|
||||||
|
|
|
@ -131,9 +131,9 @@
|
||||||
|
|
||||||
<!-- Map colors, layers, special purpose consistency colors -->
|
<!-- Map colors, layers, special purpose consistency colors -->
|
||||||
<color name="pos_heading">#320000FF</color>
|
<color name="pos_heading">#320000FF</color>
|
||||||
<color name="pos_heading_night">#880000FF</color>
|
<color name="pos_heading_night">#88ff8800</color>
|
||||||
<color name="pos_area">#280000FF</color>
|
<color name="pos_area">#280000FF</color>
|
||||||
<color name="pos_area_night">#660000FF</color>
|
<color name="pos_area_night">#66ff8800</color>
|
||||||
<color name="pos_around">#707CDC</color> <!-- family blue similar to above -->
|
<color name="pos_around">#707CDC</color> <!-- family blue similar to above -->
|
||||||
|
|
||||||
<color name="gpx_track">#B4B319FF</color>
|
<color name="gpx_track">#B4B319FF</color>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import net.osmand.StateChangedListener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -8,9 +12,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.osmand.StateChangedListener;
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
|
|
||||||
public class ApplicationMode {
|
public class ApplicationMode {
|
||||||
private static Map<String, Set<ApplicationMode>> widgets = new LinkedHashMap<String, Set<ApplicationMode>>();
|
private static Map<String, Set<ApplicationMode>> widgets = new LinkedHashMap<String, Set<ApplicationMode>>();
|
||||||
|
@ -99,8 +100,10 @@ public class ApplicationMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationModeBuilder carLocation(){
|
public ApplicationModeBuilder carLocation(){
|
||||||
applicationMode.bearingIcon = R.drawable.map_car_bearing;
|
applicationMode.bearingIconDay = R.drawable.map_car_bearing;
|
||||||
applicationMode.locationIcon = R.drawable.map_car_location;
|
applicationMode.bearingIconNight = R.drawable.map_car_bearing_night;
|
||||||
|
applicationMode.locationIconDay = R.drawable.map_car_location;
|
||||||
|
applicationMode.locationIconNight = R.drawable.map_car_location_night;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,14 +113,18 @@ public class ApplicationMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationModeBuilder bicycleLocation(){
|
public ApplicationModeBuilder bicycleLocation(){
|
||||||
applicationMode.bearingIcon = R.drawable.map_bicycle_bearing;
|
applicationMode.bearingIconDay = R.drawable.map_bicycle_bearing;
|
||||||
applicationMode.locationIcon = R.drawable.map_bicycle_location;
|
applicationMode.bearingIconNight = R.drawable.map_bicycle_bearing_night;
|
||||||
|
applicationMode.locationIconDay = R.drawable.map_bicycle_location;
|
||||||
|
applicationMode.locationIconNight = R.drawable.map_bicycle_location_night;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationModeBuilder defLocation(){
|
public ApplicationModeBuilder defLocation(){
|
||||||
applicationMode.bearingIcon = R.drawable.map_pedestrian_bearing;
|
applicationMode.bearingIconDay = R.drawable.map_pedestrian_bearing;
|
||||||
applicationMode.locationIcon = R.drawable.map_pedestrian_location;
|
applicationMode.bearingIconNight = R.drawable.map_pedestrian_bearing_night;
|
||||||
|
applicationMode.locationIconDay = R.drawable.map_pedestrian_location;
|
||||||
|
applicationMode.locationIconNight = R.drawable.map_pedestrian_location_night;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,21 +146,6 @@ public class ApplicationMode {
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private final int key;
|
|
||||||
private final String stringKey;
|
|
||||||
|
|
||||||
private ApplicationMode parent;
|
|
||||||
private int iconId = R.drawable.ic_browse_map;
|
|
||||||
private int smallIconDark = R.drawable.ic_world_globe_dark ;
|
|
||||||
private float defaultSpeed = 10f;
|
|
||||||
private int minDistanceForTurn = 50;
|
|
||||||
private int arrivalDistance = 90;
|
|
||||||
private int bearingIcon = R.drawable.map_pedestrian_bearing;
|
|
||||||
private int locationIcon = R.drawable.map_pedestrian_location;
|
|
||||||
private static StateChangedListener<String> listener;
|
|
||||||
|
|
||||||
private ApplicationMode(int key, String stringKey) {
|
private ApplicationMode(int key, String stringKey) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.stringKey = stringKey;
|
this.stringKey = stringKey;
|
||||||
|
@ -240,12 +232,20 @@ public class ApplicationMode {
|
||||||
return getDefaultSpeed() > 10;
|
return getDefaultSpeed() > 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getResourceBearing() {
|
public int getResourceBearingDay() {
|
||||||
return bearingIcon;
|
return bearingIconDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getResourceLocation() {
|
public int getResourceBearingNight() {
|
||||||
return locationIcon;
|
return bearingIconNight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResourceLocationDay() {
|
||||||
|
return locationIconDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResourceLocationNight() {
|
||||||
|
return locationIconNight;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStringKey() {
|
public String getStringKey() {
|
||||||
|
@ -293,7 +293,18 @@ public class ApplicationMode {
|
||||||
return this == mode || getParent() == mode;
|
return this == mode || getParent() == mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final int key;
|
||||||
|
private final String stringKey;
|
||||||
|
|
||||||
|
private ApplicationMode parent;
|
||||||
|
private int iconId = R.drawable.ic_browse_map;
|
||||||
|
private int smallIconDark = R.drawable.ic_world_globe_dark ;
|
||||||
|
private float defaultSpeed = 10f;
|
||||||
|
private int minDistanceForTurn = 50;
|
||||||
|
private int arrivalDistance = 90;
|
||||||
|
private int bearingIconDay = R.drawable.map_pedestrian_bearing;
|
||||||
|
private int bearingIconNight = R.drawable.map_pedestrian_bearing_night;
|
||||||
|
private int locationIconDay = R.drawable.map_pedestrian_location;
|
||||||
|
private int locationIconNight = R.drawable.map_pedestrian_location_night;
|
||||||
|
private static StateChangedListener<String> listener;
|
||||||
}
|
}
|
|
@ -702,7 +702,7 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
|
||||||
menuFullHeight = view.findViewById(R.id.context_menu_main).getHeight();
|
menuFullHeight = view.findViewById(R.id.context_menu_main).getHeight();
|
||||||
|
|
||||||
int dy = 0;
|
int dy = 0;
|
||||||
if (!menu.isLandscapeLayout() && menuTopViewHeight != 0) {
|
if (!menu.isLandscapeLayout() && menuTopViewHeight != 0 && menu.getCurrentMenuState() == MenuState.HEADER_ONLY) {
|
||||||
dy = Math.max(0, newMenuTopViewHeight - menuTopViewHeight);
|
dy = Math.max(0, newMenuTopViewHeight - menuTopViewHeight);
|
||||||
}
|
}
|
||||||
menuTopViewHeight = newMenuTopViewHeight;
|
menuTopViewHeight = newMenuTopViewHeight;
|
||||||
|
|
|
@ -23,6 +23,8 @@ import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.OpeningHoursParser;
|
import net.osmand.util.OpeningHoursParser;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -147,7 +149,8 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
if (Algorithms.isEmpty(preferredLang)) {
|
if (Algorithms.isEmpty(preferredLang)) {
|
||||||
preferredLang = app.getLanguage();
|
preferredLang = app.getLanguage();
|
||||||
}
|
}
|
||||||
List<AmenityDescription> descriptions = new LinkedList<>();
|
List<AmenityInfoRow> infoRows = new LinkedList<>();
|
||||||
|
List<AmenityInfoRow> descriptions = new LinkedList<>();
|
||||||
|
|
||||||
for (Map.Entry<String, String> e : amenity.getAdditionalInfo().entrySet()) {
|
for (Map.Entry<String, String> e : amenity.getAdditionalInfo().entrySet()) {
|
||||||
int iconId;
|
int iconId;
|
||||||
|
@ -160,6 +163,8 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
boolean isWiki = false;
|
boolean isWiki = false;
|
||||||
boolean isText = false;
|
boolean isText = false;
|
||||||
boolean needLinks = !"population".equals(key);
|
boolean needLinks = !"population".equals(key);
|
||||||
|
int poiTypeOrder = 0;
|
||||||
|
String poiTypeKeyName = "";
|
||||||
|
|
||||||
if (amenity.getType().isWiki()) {
|
if (amenity.getType().isWiki()) {
|
||||||
if (!hasWiki) {
|
if (!hasWiki) {
|
||||||
|
@ -211,6 +216,8 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
AbstractPoiType pt = poiTypes.getAnyPoiAdditionalTypeByKey(key);
|
AbstractPoiType pt = poiTypes.getAnyPoiAdditionalTypeByKey(key);
|
||||||
if (pt != null) {
|
if (pt != null) {
|
||||||
PoiType pType = (PoiType) pt;
|
PoiType pType = (PoiType) pt;
|
||||||
|
poiTypeOrder = pType.getOrder();
|
||||||
|
poiTypeKeyName = pType.getKeyName();
|
||||||
if (pType.getParentType() != null && pType.getParentType() instanceof PoiType) {
|
if (pType.getParentType() != null && pType.getParentType() instanceof PoiType) {
|
||||||
icon = getRowIcon(view.getContext(), ((PoiType) pType.getParentType()).getOsmTag() + "_" + pType.getOsmTag().replace(':', '_') + "_" + pType.getOsmValue());
|
icon = getRowIcon(view.getContext(), ((PoiType) pType.getParentType()).getOsmTag() + "_" + pType.getOsmTag().replace(':', '_') + "_" + pType.getOsmValue());
|
||||||
}
|
}
|
||||||
|
@ -229,17 +236,37 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isText && iconId == R.drawable.ic_action_note_dark) {
|
if (isText && iconId == R.drawable.ic_action_note_dark) {
|
||||||
descriptions.add(new AmenityDescription(key, textPrefix, vl));
|
descriptions.add(new AmenityInfoRow(key, R.drawable.ic_action_note_dark, textPrefix,
|
||||||
|
vl, 0, false, true, true, 0, ""));
|
||||||
} else if (icon != null) {
|
} else if (icon != null) {
|
||||||
buildRow(view, icon, vl, textPrefix, textColor, isWiki, isText, needLinks);
|
infoRows.add(new AmenityInfoRow(key, icon, textPrefix, vl, textColor, isWiki, isText,
|
||||||
|
needLinks, poiTypeOrder, poiTypeKeyName));
|
||||||
} else {
|
} else {
|
||||||
buildRow(view, iconId, vl, textPrefix, textColor, isWiki, isText, needLinks);
|
infoRows.add(new AmenityInfoRow(key, iconId, textPrefix, vl, textColor, isWiki, isText,
|
||||||
|
needLinks, poiTypeOrder, poiTypeKeyName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Collections.sort(infoRows, new Comparator<AmenityInfoRow>() {
|
||||||
|
@Override
|
||||||
|
public int compare(AmenityInfoRow row1, AmenityInfoRow row2) {
|
||||||
|
if (row1.order < row2.order) {
|
||||||
|
return -1;
|
||||||
|
} else if (row1.order == row2.order) {
|
||||||
|
return row1.name.compareTo(row2.name);
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (AmenityInfoRow info : infoRows) {
|
||||||
|
buildAmenityRow(view, info);
|
||||||
|
}
|
||||||
|
|
||||||
String langSuffix = ":" + preferredLang;
|
String langSuffix = ":" + preferredLang;
|
||||||
AmenityDescription descInPrefLang = null;
|
AmenityInfoRow descInPrefLang = null;
|
||||||
for (AmenityDescription desc : descriptions) {
|
for (AmenityInfoRow desc : descriptions) {
|
||||||
if (desc.key.length() > langSuffix.length()
|
if (desc.key.length() > langSuffix.length()
|
||||||
&& desc.key.substring(desc.key.length() - langSuffix.length(), desc.key.length()).equals(langSuffix)) {
|
&& desc.key.substring(desc.key.length() - langSuffix.length(), desc.key.length()).equals(langSuffix)) {
|
||||||
descInPrefLang = desc;
|
descInPrefLang = desc;
|
||||||
|
@ -251,20 +278,60 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
descriptions.add(0, descInPrefLang);
|
descriptions.add(0, descInPrefLang);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (AmenityDescription desc : descriptions) {
|
for (AmenityInfoRow info : descriptions) {
|
||||||
buildRow(view, R.drawable.ic_action_note_dark, desc.text, desc.textPrefix, 0, false, true, true);
|
buildAmenityRow(view, info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class AmenityDescription {
|
public void buildAmenityRow(View view, AmenityInfoRow info) {
|
||||||
|
if (info.icon != null) {
|
||||||
|
buildRow(view, info.icon, info.text, info.textPrefix, info.textColor, info.isWiki, info.isText, info.needLinks);
|
||||||
|
} else if (info.iconId != 0) {
|
||||||
|
buildRow(view, info.iconId, info.text, info.textPrefix, info.textColor, info.isWiki, info.isText, info.needLinks);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class AmenityInfoRow {
|
||||||
private String key;
|
private String key;
|
||||||
|
private Drawable icon;
|
||||||
|
private int iconId;
|
||||||
private String textPrefix;
|
private String textPrefix;
|
||||||
private String text;
|
private String text;
|
||||||
|
private int textColor;
|
||||||
|
private boolean isWiki;
|
||||||
|
private boolean isText;
|
||||||
|
private boolean needLinks;
|
||||||
|
private int order;
|
||||||
|
private String name;
|
||||||
|
|
||||||
public AmenityDescription(String key, String textPrefix, String text) {
|
public AmenityInfoRow(String key, Drawable icon, String textPrefix, String text,
|
||||||
|
int textColor, boolean isWiki, boolean isText, boolean needLinks,
|
||||||
|
int order, String name) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
|
this.icon = icon;
|
||||||
this.textPrefix = textPrefix;
|
this.textPrefix = textPrefix;
|
||||||
this.text = text;
|
this.text = text;
|
||||||
|
this.textColor = textColor;
|
||||||
|
this.isWiki = isWiki;
|
||||||
|
this.isText = isText;
|
||||||
|
this.needLinks = needLinks;
|
||||||
|
this.order = order;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AmenityInfoRow(String key, int iconId, String textPrefix, String text,
|
||||||
|
int textColor, boolean isWiki, boolean isText, boolean needLinks,
|
||||||
|
int order, String name) {
|
||||||
|
this.key = key;
|
||||||
|
this.iconId = iconId;
|
||||||
|
this.textPrefix = textPrefix;
|
||||||
|
this.text = text;
|
||||||
|
this.textColor = textColor;
|
||||||
|
this.isWiki = isWiki;
|
||||||
|
this.isText = isText;
|
||||||
|
this.needLinks = needLinks;
|
||||||
|
this.order = order;
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,6 @@ public class MyLocationMenuController extends MenuController {
|
||||||
@Override
|
@Override
|
||||||
public Drawable getLeftIcon() {
|
public Drawable getLeftIcon() {
|
||||||
ApplicationMode appMode = getMapActivity().getMyApplication().getSettings().getApplicationMode();
|
ApplicationMode appMode = getMapActivity().getMyApplication().getSettings().getApplicationMode();
|
||||||
return getMapActivity().getResources().getDrawable(appMode.getResourceLocation());
|
return getMapActivity().getResources().getDrawable(appMode.getResourceLocationDay());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.QuadPoint;
|
import net.osmand.data.QuadPoint;
|
||||||
import net.osmand.data.RotatedTileBox;
|
import net.osmand.data.RotatedTileBox;
|
||||||
|
@ -44,6 +45,7 @@ public abstract class PointEditorFragment extends Fragment {
|
||||||
|
|
||||||
private View view;
|
private View view;
|
||||||
private int mainViewHeight;
|
private int mainViewHeight;
|
||||||
|
private EditText nameEdit;
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +105,7 @@ public abstract class PointEditorFragment extends Fragment {
|
||||||
TextView categoryCaption = (TextView) view.findViewById(R.id.category_caption);
|
TextView categoryCaption = (TextView) view.findViewById(R.id.category_caption);
|
||||||
categoryCaption.setText(getCategoryCaption());
|
categoryCaption.setText(getCategoryCaption());
|
||||||
|
|
||||||
EditText nameEdit = (EditText) view.findViewById(R.id.name_edit);
|
nameEdit = (EditText) view.findViewById(R.id.name_edit);
|
||||||
nameEdit.setText(getNameInitValue());
|
nameEdit.setText(getNameInitValue());
|
||||||
AutoCompleteTextViewEx categoryEdit = (AutoCompleteTextViewEx) view.findViewById(R.id.category_edit);
|
AutoCompleteTextViewEx categoryEdit = (AutoCompleteTextViewEx) view.findViewById(R.id.category_edit);
|
||||||
categoryEdit.setText(getCategoryInitValue());
|
categoryEdit.setText(getCategoryInitValue());
|
||||||
|
@ -152,6 +154,16 @@ public abstract class PointEditorFragment extends Fragment {
|
||||||
getMapActivity().getContextMenu().setBaseFragmentVisibility(false);
|
getMapActivity().getContextMenu().setBaseFragmentVisibility(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (getEditor().isNew()) {
|
||||||
|
nameEdit.selectAll();
|
||||||
|
nameEdit.requestFocus();
|
||||||
|
AndroidUtils.softKeyboardDelayed(nameEdit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
@ -233,6 +245,7 @@ public abstract class PointEditorFragment extends Fragment {
|
||||||
|
|
||||||
private void hideKeyboard() {
|
private void hideKeyboard() {
|
||||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Activity.INPUT_METHOD_SERVICE);
|
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||||
|
if (inputMethodManager != null) {
|
||||||
View currentFocus = getActivity().getCurrentFocus();
|
View currentFocus = getActivity().getCurrentFocus();
|
||||||
if (currentFocus != null) {
|
if (currentFocus != null) {
|
||||||
IBinder windowToken = currentFocus.getWindowToken();
|
IBinder windowToken = currentFocus.getWindowToken();
|
||||||
|
@ -241,6 +254,7 @@ public abstract class PointEditorFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void savePressed() {
|
protected void savePressed() {
|
||||||
save(true);
|
save(true);
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
package net.osmand.plus.views;
|
package net.osmand.plus.views;
|
||||||
|
|
||||||
|
|
||||||
import net.osmand.Location;
|
|
||||||
import net.osmand.data.LatLon;
|
|
||||||
import net.osmand.data.PointDescription;
|
|
||||||
import net.osmand.data.RotatedTileBox;
|
|
||||||
import net.osmand.plus.ApplicationMode;
|
|
||||||
import net.osmand.plus.OsmAndLocationProvider;
|
|
||||||
import net.osmand.plus.R;
|
|
||||||
import net.osmand.plus.base.MapViewTrackingUtilities;
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
@ -17,9 +9,23 @@ import android.graphics.Paint.Style;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
|
|
||||||
|
import net.osmand.Location;
|
||||||
|
import net.osmand.PlatformUtil;
|
||||||
|
import net.osmand.data.LatLon;
|
||||||
|
import net.osmand.data.PointDescription;
|
||||||
|
import net.osmand.data.RotatedTileBox;
|
||||||
|
import net.osmand.plus.ApplicationMode;
|
||||||
|
import net.osmand.plus.OsmAndLocationProvider;
|
||||||
|
import net.osmand.plus.R;
|
||||||
|
import net.osmand.plus.base.MapViewTrackingUtilities;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
|
||||||
|
private static final Log LOG = PlatformUtil.getLog(PointLocationLayer.class);
|
||||||
|
|
||||||
protected final static int RADIUS = 7;
|
protected final static int RADIUS = 7;
|
||||||
protected final static float HEADING_ANGLE = 60;
|
protected final static float HEADING_ANGLE = 60;
|
||||||
|
|
||||||
|
@ -35,7 +41,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
private Bitmap locationIcon;
|
private Bitmap locationIcon;
|
||||||
private OsmAndLocationProvider locationProvider;
|
private OsmAndLocationProvider locationProvider;
|
||||||
private MapViewTrackingUtilities mapViewTrackingUtilities;
|
private MapViewTrackingUtilities mapViewTrackingUtilities;
|
||||||
private boolean nm;
|
private boolean nm = false;
|
||||||
|
|
||||||
public PointLocationLayer(MapViewTrackingUtilities mv) {
|
public PointLocationLayer(MapViewTrackingUtilities mv) {
|
||||||
this.mapViewTrackingUtilities = mv;
|
this.mapViewTrackingUtilities = mv;
|
||||||
|
@ -62,7 +68,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
headingPaint.setAntiAlias(true);
|
headingPaint.setAntiAlias(true);
|
||||||
headingPaint.setStyle(Style.FILL);
|
headingPaint.setStyle(Style.FILL);
|
||||||
|
|
||||||
checkAppMode(view.getSettings().getApplicationMode());
|
checkAppMode(view.getSettings().getApplicationMode(), false, false);
|
||||||
locationProvider = view.getApplication().getLocationProvider();
|
locationProvider = view.getApplication().getLocationProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,11 +92,14 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
}
|
}
|
||||||
// draw
|
// draw
|
||||||
boolean nm = nightMode != null && nightMode.isNightMode();
|
boolean nm = nightMode != null && nightMode.isNightMode();
|
||||||
|
boolean shouldForceUpdate = false;
|
||||||
if(nm != this.nm) {
|
if(nm != this.nm) {
|
||||||
this.nm = nm;
|
this.nm = nm;
|
||||||
area.setColor(view.getResources().getColor(!nm?R.color.pos_area : R.color.pos_area_night));
|
area.setColor(view.getResources().getColor(!nm?R.color.pos_area : R.color.pos_area_night));
|
||||||
headingPaint.setColor(view.getResources().getColor(!nm?R.color.pos_heading :R.color.pos_heading_night));
|
headingPaint.setColor(view.getResources().getColor(!nm?R.color.pos_heading :R.color.pos_heading_night));
|
||||||
|
shouldForceUpdate = true;
|
||||||
}
|
}
|
||||||
|
checkAppMode(view.getSettings().getApplicationMode(), nm, shouldForceUpdate);
|
||||||
Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
||||||
if(lastKnownLocation == null || view == null){
|
if(lastKnownLocation == null || view == null){
|
||||||
return;
|
return;
|
||||||
|
@ -108,7 +117,6 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
}
|
}
|
||||||
// draw bearing/direction/location
|
// draw bearing/direction/location
|
||||||
if (isLocationVisible(box, lastKnownLocation)) {
|
if (isLocationVisible(box, lastKnownLocation)) {
|
||||||
checkAppMode(view.getSettings().getApplicationMode());
|
|
||||||
boolean isBearing = lastKnownLocation.hasBearing();
|
boolean isBearing = lastKnownLocation.hasBearing();
|
||||||
|
|
||||||
Float heading = locationProvider.getHeading();
|
Float heading = locationProvider.getHeading();
|
||||||
|
@ -138,11 +146,19 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
|
||||||
public void destroyLayer() {
|
public void destroyLayer() {
|
||||||
|
|
||||||
}
|
}
|
||||||
public void checkAppMode(ApplicationMode appMode) {
|
public void checkAppMode(ApplicationMode appMode, boolean nighMode, boolean force) {
|
||||||
if (appMode != this.appMode) {
|
if (appMode != this.appMode || force) {
|
||||||
this.appMode = appMode;
|
this.appMode = appMode;
|
||||||
bearingIcon = BitmapFactory.decodeResource(view.getResources(), appMode.getResourceBearing());
|
|
||||||
locationIcon = BitmapFactory.decodeResource(view.getResources(), appMode.getResourceLocation());
|
final int resourceBearingDay = appMode.getResourceBearingDay();
|
||||||
|
final int resourceBearingNight = appMode.getResourceBearingNight();
|
||||||
|
final int resourceBearing = nighMode ? resourceBearingNight : resourceBearingDay;
|
||||||
|
bearingIcon = BitmapFactory.decodeResource(view.getResources(), resourceBearing);
|
||||||
|
|
||||||
|
final int resourceLocationDay = appMode.getResourceLocationDay();
|
||||||
|
final int resourceLocationNight = appMode.getResourceLocationNight();
|
||||||
|
final int resourceLocation = nighMode ? resourceLocationNight : resourceLocationDay;
|
||||||
|
locationIcon = BitmapFactory.decodeResource(view.getResources(), resourceLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue