Use item view as anchor

pull/187/head
M66B 4 years ago
parent b29b4dba0a
commit c9d36cf9d1

@ -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);

Loading…
Cancel
Save