diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java
index 7a4ecd8ae9..36d2718a92 100644
--- a/app/src/main/java/eu/faircode/email/FragmentCompose.java
+++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java
@@ -2603,10 +2603,35 @@ public class FragmentCompose extends FragmentBase {
new Intent(getContext(), ActivitySetup.class)
.putExtra("tab", "encryption"));
else {
- FragmentDialogSend fragment = new FragmentDialogSend();
- fragment.setArguments(args);
- fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
- fragment.show(getParentFragmentManager(), "compose:send");
+ View vwAnchor = view.findViewById(R.id.vwAnchor);
+ PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor);
+ popupMenu.getMenu().add(Menu.NONE, R.string.title_send_dialog, 1, R.string.title_send_dialog);
+ popupMenu.getMenu().add(Menu.NONE, R.string.title_advanced_manage_certificates, 2, R.string.title_advanced_manage_certificates);
+
+ popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.string.title_send_dialog:
+ FragmentDialogSend fragment = new FragmentDialogSend();
+ fragment.setArguments(args);
+ fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
+ fragment.show(getParentFragmentManager(), "compose:send");
+ return true;
+
+ case R.string.title_advanced_manage_certificates:
+ startActivity(
+ new Intent(getContext(), ActivitySetup.class)
+ .putExtra("tab", "encryption"));
+ return true;
+
+ default:
+ return false;
+ }
+ }
+ });
+
+ popupMenu.show();
}
}
});
diff --git a/app/src/main/res/layout/fragment_compose.xml b/app/src/main/res/layout/fragment_compose.xml
index b7672c1cb1..26336d3d80 100644
--- a/app/src/main/res/layout/fragment_compose.xml
+++ b/app/src/main/res/layout/fragment_compose.xml
@@ -459,6 +459,13 @@
+
+