From 6a45a60536aa55b5ab76e6ba1ce917b4a8a6c805 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 21 Jan 2021 16:44:52 +0100 Subject: [PATCH] Added optional notes button --- .../java/eu/faircode/email/AdapterMessage.java | 16 ++++++++++++++++ .../res/drawable/twotone_sticky_note_2_24.xml | 15 +++++++++++++++ .../res/layout/include_message_navigation.xml | 12 +++++++++++- app/src/main/res/menu/popup_message_more.xml | 4 ++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/twotone_sticky_note_2_24.xml diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index c0727a3478..ea95ee3f05 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -430,6 +430,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0 || tos > 0) ? View.VISIBLE : View.GONE); ibSeen.setVisibility(tools && button_seen && !outbox && seen ? View.VISIBLE : View.GONE); ibAnswer.setVisibility(!tools || outbox || (!expand_all && expand_one) ? View.GONE : View.VISIBLE); + ibNotes.setVisibility(tools && button_notes ? View.VISIBLE : View.GONE); ibLabels.setVisibility(tools && labels_header && labels ? View.VISIBLE : View.GONE); ibKeywords.setVisibility(tools && button_keywords && keywords ? View.VISIBLE : View.GONE); ibCopy.setVisibility(tools && button_copy && move ? View.VISIBLE : View.GONE); @@ -2981,6 +2989,9 @@ public class AdapterMessage extends RecyclerView.Adapter + + + diff --git a/app/src/main/res/layout/include_message_navigation.xml b/app/src/main/res/layout/include_message_navigation.xml index 56b7759f52..393449a89b 100644 --- a/app/src/main/res/layout/include_message_navigation.xml +++ b/app/src/main/res/layout/include_message_navigation.xml @@ -41,7 +41,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="3dp" - app:constraint_referenced_ids="ibMore,ibInbox,ibJunk,ibTrash,ibArchive,ibMove,ibCopy,ibKeywords,ibLabels,ibAnswer,ibSeen,ibSearch,ibEvent,ibShare,ibPrint,ibUnsubscribe,ibRule,ibUndo" + app:constraint_referenced_ids="ibMore,ibInbox,ibJunk,ibTrash,ibArchive,ibMove,ibCopy,ibKeywords,ibLabels,ibNotes,ibAnswer,ibSeen,ibSearch,ibEvent,ibShare,ibPrint,ibUnsubscribe,ibRule,ibUndo" app:flow_horizontalBias="0" app:flow_horizontalGap="3dp" app:flow_horizontalStyle="packed" @@ -154,6 +154,16 @@ app:srcCompat="@drawable/twotone_label_24" tools:ignore="MissingConstraints" /> + + +