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 b0443dd424
commit 3c7afb3139

View file

@ -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() {