From 4a2f9f2f1b50f9b548949e14a843d6ab1d39fda0 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 23 Feb 2024 09:43:40 +0100 Subject: [PATCH] Added markdown indicator --- .../main/java/eu/faircode/email/FragmentCompose.java | 4 ++++ app/src/main/res/layout/fragment_compose.xml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 5d853926f4..22270037a8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -256,6 +256,7 @@ public class FragmentCompose extends FragmentBase { private TextView tvResend; private TextView tvPlainTextOnly; private EditTextCompose etBody; + private ImageView ivMarkdown; private TextView tvNoInternet; private TextView tvSignature; private CheckBox cbSignature; @@ -414,6 +415,7 @@ public class FragmentCompose extends FragmentBase { tvResend = view.findViewById(R.id.tvResend); tvPlainTextOnly = view.findViewById(R.id.tvPlainTextOnly); etBody = view.findViewById(R.id.etBody); + ivMarkdown = view.findViewById(R.id.ivMarkdown); tvNoInternet = view.findViewById(R.id.tvNoInternet); tvSignature = view.findViewById(R.id.tvSignature); cbSignature = view.findViewById(R.id.cbSignature); @@ -1102,6 +1104,7 @@ public class FragmentCompose extends FragmentBase { tvPlainTextOnly.setVisibility(View.GONE); etBody.setText(null); etBody.setHint(null); + ivMarkdown.setVisibility(View.GONE); grpHeader.setVisibility(View.GONE); grpExtra.setVisibility(View.GONE); @@ -7777,6 +7780,7 @@ public class FragmentCompose extends FragmentBase { etBody.setHint(hint); grpBody.setVisibility(View.VISIBLE); + ivMarkdown.setVisibility(markdown ? View.VISIBLE : View.GONE); cbSignature.setChecked(draft.signature); tvSignature.setAlpha(draft.signature ? 1.0f : Helper.LOW_LIGHT); diff --git a/app/src/main/res/layout/fragment_compose.xml b/app/src/main/res/layout/fragment_compose.xml index 09cc086094..3485780b29 100644 --- a/app/src/main/res/layout/fragment_compose.xml +++ b/app/src/main/res/layout/fragment_compose.xml @@ -348,6 +348,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvPlainTextOnly" /> + +