Index: mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenu.java |
=================================================================== |
--- a/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenu.java |
+++ b/mobile/android/base/java/org/mozilla/gecko/menu/GeckoMenu.java |
@@ -835,17 +835,28 @@ public class GeckoMenu extends ListView |
listView.performItemClick(actionView, pos + listView.getHeaderViewsCount(), id); |
} |
}); |
} |
// Initialize the view. |
view.setShowIcon(mShowIcons); |
view.initialize(item); |
- return (View) view; |
+ |
+ // Dropdown menu items can be up to 2 lines long |
+ // See https://issues.adblockplus.org/ticket/5470 |
+ if (view instanceof android.widget.TextView) |
+ { |
+ final android.widget.TextView textView = (android.widget.TextView) view; |
+ textView.setSingleLine(false); |
+ textView.setMaxLines(2); |
+ textView.setEllipsize(android.text.TextUtils.TruncateAt.END); |
+ } |
+ |
+ return (View) view; |
} |
@Override |
public int getItemViewType(int position) { |
return getItem(position).getGeckoActionProvider() == null ? VIEW_TYPE_DEFAULT : VIEW_TYPE_ACTION_MODE; |
} |
@Override |