From 5e948bd11a62b0b2d6e9c9ce9cffb690fe7794dc Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 20 Feb 2018 11:11:47 +0200 Subject: [PATCH] assigned "all points of the group" to top of the context menu --- .../net/osmand/plus/activities/FavoritesTreeFragment.java | 1 + .../src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 292f8e0fe3..deff5c90dc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -194,6 +194,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { if (groupNameToShow != null) { int position = favouritesAdapter.getGroupPosition(groupNameToShow); if (position != -1) { + listView.expandGroup(position); listView.setSelectedGroup(position); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 8019cca758..be61768d76 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -301,9 +301,6 @@ public class MenuBuilder { public void build(View view) { firstRow = true; hidden = false; - if (showTitleIfTruncated) { - buildTitleRow(view); - } if (showTransportRoutes()) { buildRow(view, 0, null, app.getString(R.string.transport_Routes), 0, true, getCollapsableTransportStopRoutesView(view.getContext(), false, false), false, 0, false, null, true); @@ -315,11 +312,14 @@ public class MenuBuilder { false, 0, false, null, true); } } + buildInternal(view); + if (showTitleIfTruncated) { + buildTitleRow(view); + } buildNearestWikiRow(view); if (needBuildPlainMenuItems()) { buildPlainMenuItems(view); } - buildInternal(view); if (showOnlinePhotos) { buildNearestPhotosRow(view); }