зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1107386 - Set internal container height as height of MenuPopup. r=mhaigh
Solution via http://stackoverflow.com/a/7698709
This commit is contained in:
Родитель
fbc63534a7
Коммит
3368691d5d
|
@ -66,7 +66,9 @@ public class MenuPopup extends PopupWindow {
|
|||
@Override
|
||||
public void showAsDropDown(View anchor) {
|
||||
// Set a height, so that the popup will not be displayed below the bottom of the screen.
|
||||
setHeight(mPopupMinHeight);
|
||||
// We use the exact height of the internal content, which is the technique described in
|
||||
// http://stackoverflow.com/a/7698709
|
||||
setHeight(mPanel.getHeight());
|
||||
|
||||
// Attempt to align the center of the popup with the center of the anchor. If the anchor is
|
||||
// near the edge of the screen, the popup will just align with the edge of the screen.
|
||||
|
|
Загрузка…
Ссылка в новой задаче