diff --git a/OsmAnd-java/src/main/java/net/osmand/data/Amenity.java b/OsmAnd-java/src/main/java/net/osmand/data/Amenity.java index faab53994a..db84ec2297 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/Amenity.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/Amenity.java @@ -19,6 +19,8 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeSet; import java.util.zip.GZIPInputStream; import gnu.trove.list.array.TIntArrayList; @@ -218,6 +220,13 @@ public class Amenity extends MapObject { return lng; } + public Set getSupportedContentLocales() { + Set supported = new TreeSet<>(); + supported.addAll(getNames("content", "en")); + supported.addAll(getNames("description", "en")); + return supported; + } + public List getNames(String tag, String defTag) { List l = new ArrayList(); for (String nm : getAdditionalInfo().keySet()) { diff --git a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java index 309101f720..5124d40cf4 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java @@ -39,7 +39,6 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; -import java.util.Map; import java.util.Set; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; @@ -346,7 +345,7 @@ public class SearchUICore { } } - public void setFilterOrders(Map filterOrders) { + public void setFilterOrders(List filterOrders) { for (SearchCoreAPI capi : apis) { if (capi instanceof SearchAmenityTypesAPI) { ((SearchAmenityTypesAPI) capi).setFilterOrders(filterOrders); diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java index 449695c283..ed9924d69f 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchCoreFactory.java @@ -639,7 +639,7 @@ public class SearchCoreFactory { private List customPoiFilters = new ArrayList<>(); private TIntArrayList customPoiFiltersPriorites = new TIntArrayList(); private MapPoiTypes types; - private Map filterOrders = new HashMap<>(); + private List filterOrders = new ArrayList<>(); public SearchAmenityTypesAPI(MapPoiTypes types) { super(ObjectType.POI_TYPE); @@ -656,7 +656,7 @@ public class SearchCoreFactory { this.customPoiFiltersPriorites.add(priority); } - public void setFilterOrders(Map filterOrders) { + public void setFilterOrders(List filterOrders) { this.filterOrders = filterOrders; } @@ -737,8 +737,8 @@ public class SearchCoreFactory { res.firstUnknownWordMatches = startMatch.matches(res.localeName); if (showTopFiltersOnly) { String stdFilterId = getStandardFilterId(pt); - if (filterOrders.containsKey(stdFilterId)) { - res.priority = SEARCH_AMENITY_TYPE_PRIORITY + filterOrders.get(stdFilterId); + if (filterOrders.contains(stdFilterId)) { + res.priority = SEARCH_AMENITY_TYPE_PRIORITY + filterOrders.indexOf(stdFilterId); resultMatcher.publish(res); } } else { @@ -754,8 +754,8 @@ public class SearchCoreFactory { res.object = csf; res.objectType = ObjectType.POI_TYPE; if (showTopFiltersOnly) { - if (filterOrders.containsKey(csf.getFilterId())) { - res.priority = SEARCH_AMENITY_TYPE_PRIORITY + filterOrders.get(csf.getFilterId()); + if (filterOrders.contains(csf.getFilterId())) { + res.priority = SEARCH_AMENITY_TYPE_PRIORITY + filterOrders.indexOf(csf.getFilterId()); resultMatcher.publish(res); } } else { diff --git a/OsmAnd/assets/poi_categories.json b/OsmAnd/assets/poi_categories.json deleted file mode 100644 index 51afd627af..0000000000 --- a/OsmAnd/assets/poi_categories.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "categories" : { - "special" : { - "icons" : [ - "special_star", "special_star_stroked", "special_marker", "special_flag_stroke", "special_house", "special_building" - ] - }, - "amenity" : { - "icons": [ - "amenity_bar", "amenity_cafe", "amenity_atm", "amenity_biergarten", "amenity_cinema", "amenity_fire_station", "amenity_parking" - ] - } - } -} \ No newline at end of file diff --git a/OsmAnd/res/layout/edit_arrangement_list_fragment.xml b/OsmAnd/res/layout/edit_arrangement_list_fragment.xml index 2ec9131aee..ee9654d322 100644 --- a/OsmAnd/res/layout/edit_arrangement_list_fragment.xml +++ b/OsmAnd/res/layout/edit_arrangement_list_fragment.xml @@ -8,11 +8,7 @@ - - - - + android:layout_height="wrap_content" /> + android:layout_marginStart="@dimen/list_content_padding_large" /> + android:layout_marginLeft="@dimen/settings_divider_margin_start" + android:layout_marginStart="@dimen/settings_divider_margin_start" /> + android:paddingEnd="@dimen/list_header_padding" + android:paddingRight="@dimen/list_header_padding"> + android:layout_width="@dimen/favorites_icon_size" + android:layout_height="match_parent" + android:layout_gravity="center_vertical"> + tools:visibility="visible" /> + tools:src="@drawable/bg_point_circle"/> + android:layout_marginStart="@dimen/favorites_icon_right_margin" + android:layout_marginLeft="@dimen/favorites_icon_right_margin" + android:layout_marginEnd="@dimen/favorites_icon_right_margin" + android:layout_marginRight="@dimen/favorites_icon_right_margin" + android:paddingTop="@dimen/context_menu_padding_margin_small" + android:paddingBottom="@dimen/context_menu_padding_margin_small"> + tools:text="@string/lorem_ipsum" /> + android:textSize="@dimen/default_desc_text_size" + tools:text="100500 km" /> + android:layout_marginStart="@dimen/list_item_button_padding" + android:layout_marginLeft="@dimen/list_item_button_padding" + android:contentDescription="@string/favorite_category_name" + android:src="@drawable/ic_small_group" /> + android:textSize="@dimen/default_desc_text_size" /> + android:visibility="gone" /> + android:visibility="gone" /> \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_track_select_dialog.xml b/OsmAnd/res/layout/gpx_track_select_dialog.xml index 88c1985298..3a2c2ab41d 100644 --- a/OsmAnd/res/layout/gpx_track_select_dialog.xml +++ b/OsmAnd/res/layout/gpx_track_select_dialog.xml @@ -47,23 +47,4 @@ tools:listitem="@layout/gpx_track_select_item"> - - - - - \ No newline at end of file diff --git a/OsmAnd/res/layout/gpx_track_select_item.xml b/OsmAnd/res/layout/gpx_track_select_item.xml index 844b1382f2..21e925e64b 100644 --- a/OsmAnd/res/layout/gpx_track_select_item.xml +++ b/OsmAnd/res/layout/gpx_track_select_item.xml @@ -2,7 +2,8 @@ @@ -21,7 +22,7 @@ + android:gravity="center_vertical" + android:minHeight="@dimen/setting_list_item_large_height"> + android:layout_marginLeft="@dimen/list_content_padding" + android:layout_marginEnd="@dimen/list_content_padding" + android:layout_marginRight="@dimen/list_content_padding" + tools:src="@drawable/ic_map" /> - + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="horizontal"> - + - + + + + + + + + + + +