Fix 'show all' button for POI additionals in context menu

This commit is contained in:
Alexey Kulish 2018-02-06 12:07:42 +03:00
parent 07c5c90ba2
commit 496df9ee6d

View file

@ -659,7 +659,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
} }
}); });
buttons.add(button); buttons.add(button);
if (buttons.size() > 3) { if (buttons.size() > 3 && categoryTypes.size() > 4) {
button.setVisibility(View.GONE); button.setVisibility(View.GONE);
} }
view.addView(button); view.addView(button);
@ -672,7 +672,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
view.addView(button); view.addView(button);
} }
if (categoryTypes.size() > 3) { if (categoryTypes.size() > 4) {
final TextViewEx button = buildButtonInCollapsableView(context, false, true); final TextViewEx button = buildButtonInCollapsableView(context, false, true);
button.setText(context.getString(R.string.shared_string_show_all)); button.setText(context.getString(R.string.shared_string_show_all));
button.setOnClickListener(new View.OnClickListener() { button.setOnClickListener(new View.OnClickListener() {