From c9d36cf9d18e2a221e579b97c8822b7ca3f76c3d Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 8 Oct 2020 17:11:28 +0200 Subject: [PATCH] Use item view as anchor --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 79fb908710..09aca035fa 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -2093,12 +2093,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private void onSwipeAsk(final @NonNull TupleMessageEx message, @NonNull RecyclerView.ViewHolder viewHolder) { - // Use fixed anchor - ConstraintLayout.LayoutParams lparam = (ConstraintLayout.LayoutParams) vwAnchor.getLayoutParams(); - lparam.topMargin = viewHolder.itemView.getTop() + viewHolder.itemView.getHeight(); - vwAnchor.setLayoutParams(lparam); - - PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor); + PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), viewHolder.itemView); if (message.ui_seen) popupMenu.getMenu().add(Menu.NONE, R.string.title_unseen, 1, R.string.title_unseen);