From f741ff886b4c0f7c32dea7b8f99affd018e7bca4 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 15 Apr 2022 08:52:31 +0200 Subject: [PATCH] Added misc/advanced card --- .../faircode/email/FragmentOptionsMisc.java | 26 +++++---- .../main/res/drawable/twotone_logo_dev_24.xml | 13 +++++ .../main/res/layout/fragment_options_misc.xml | 54 ++++++++++++++++--- 3 files changed, 74 insertions(+), 19 deletions(-) create mode 100644 app/src/main/res/drawable/twotone_logo_dev_24.xml diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index efb789cbc0..e9f30a5f60 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -697,6 +697,21 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); + swProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { + prefs.edit().putBoolean("protocol", checked).apply(); + if (checked) + prefs.edit() + .putLong("protocol_since", new Date().getTime()) + .putInt("log_level", android.util.Log.INFO) + .apply(); + else + EntityLog.clear(compoundButton.getContext()); + } + }); + + swLogInfo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -1004,17 +1019,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); - swProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { - prefs.edit().putBoolean("protocol", checked).apply(); - if (checked) - prefs.edit().putLong("protocol_since", new Date().getTime()).apply(); - else - EntityLog.clear(compoundButton.getContext()); - } - }); - swUndoManager.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/res/drawable/twotone_logo_dev_24.xml b/app/src/main/res/drawable/twotone_logo_dev_24.xml new file mode 100644 index 0000000000..8659d2da55 --- /dev/null +++ b/app/src/main/res/drawable/twotone_logo_dev_24.xml @@ -0,0 +1,13 @@ + + + + diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index bedd828a2f..2ca5ecadb7 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -533,15 +533,55 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvCleanupHint" /> + + + + + + + + + + - - + app:layout_constraintTop_toBottomOf="@id/cardAdvanced">