From 3c7afb31397e36e688253cd9eb5b4c57a8c9286e Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 6 Feb 2018 12:07:42 +0300 Subject: [PATCH] Fix 'show all' button for POI additionals in context menu --- .../plus/mapcontextmenu/builders/AmenityMenuBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java index a80d0ccffe..fb0fdd293a 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -659,7 +659,7 @@ public class AmenityMenuBuilder extends MenuBuilder { } }); buttons.add(button); - if (buttons.size() > 3) { + if (buttons.size() > 3 && categoryTypes.size() > 4) { button.setVisibility(View.GONE); } view.addView(button); @@ -672,7 +672,7 @@ public class AmenityMenuBuilder extends MenuBuilder { view.addView(button); } - if (categoryTypes.size() > 3) { + if (categoryTypes.size() > 4) { final TextViewEx button = buildButtonInCollapsableView(context, false, true); button.setText(context.getString(R.string.shared_string_show_all)); button.setOnClickListener(new View.OnClickListener() {