Use gravity instead of calculations

For avoid freezes when trying to add an attachment

Fixes #5583
Closes #5601
// FREEBIE
fork-5.53.8
Mikhail Klementyev 2016-08-06 04:49:25 +03:00 zatwierdzone przez Moxie Marlinspike
rodzic 643da569ec
commit 716ed251bc
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -90,8 +90,7 @@ public class AttachmentTypeSelector extends PopupWindow {
public void show(@NonNull Activity activity, final @NonNull View anchor) {
this.currentAnchor = anchor;
int screenHeight = activity.getWindowManager().getDefaultDisplay().getHeight();
showAtLocation(anchor, Gravity.NO_GRAVITY, 0, screenHeight - getHeight());
showAtLocation(anchor, Gravity.BOTTOM, 0, 0);
getContentView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override