From 764273db684c22d537ba0784ce877741d2c245ab Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 28 Jul 2021 14:47:19 +0200 Subject: [PATCH] Added re/fwd option title --- .../java/eu/faircode/email/FragmentOptionsSend.java | 8 ++++++-- app/src/main/res/layout/fragment_options_send.xml | 13 ++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java index 739756db8b..150d0a6dd3 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java @@ -449,13 +449,17 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc String re2 = getString(R.string.title_subject_reply_alt, ""); ((RadioButton) view.findViewById(R.id.rbRe1)).setText(re1); ((RadioButton) view.findViewById(R.id.rbRe2)).setText(re2); - rgRe.setVisibility(Objects.equals(re1, re2) ? View.GONE : View.VISIBLE); + boolean re = !Objects.equals(re1, re2); + for (int i = 0; i < rgRe.getChildCount(); i++) + rgRe.getChildAt(i).setEnabled(re); String fwd1 = getString(R.string.title_subject_forward, ""); String fwd2 = getString(R.string.title_subject_forward_alt, ""); ((RadioButton) view.findViewById(R.id.rbFwd1)).setText(fwd1); ((RadioButton) view.findViewById(R.id.rbFwd2)).setText(fwd2); - rgFwd.setVisibility(Objects.equals(fwd1, fwd2) ? View.GONE : View.VISIBLE); + boolean fwd = !Objects.equals(fwd1, fwd2); + for (int i = 0; i < rgFwd.getChildCount(); i++) + rgFwd.getChildAt(i).setEnabled(fwd); PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this); diff --git a/app/src/main/res/layout/fragment_options_send.xml b/app/src/main/res/layout/fragment_options_send.xml index 7bf545d0ac..140bfc6d60 100644 --- a/app/src/main/res/layout/fragment_options_send.xml +++ b/app/src/main/res/layout/fragment_options_send.xml @@ -183,6 +183,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swSuggestFrequently" /> + + + app:layout_constraintTop_toBottomOf="@id/tvAltReFws"> Suggest addresses found in sent messages Suggest addresses found in received messages Sort suggested addresses on frequency of use + Alternative reply/forward prefix Show reminders Delay sending messages Show non-obtrusive send delayed icon