From 8f66c88f9bc018331957df38ae0582469563f3f9 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 27 Oct 2023 07:51:02 +0200 Subject: [PATCH] Added search index help button --- .../eu/faircode/email/FragmentOptionsMisc.java | 17 +++++++++++++---- .../main/res/layout/fragment_options_misc.xml | 14 +++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index b8c69cad85..a4bfef18da 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -117,6 +117,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private SwitchCompat swICalTentative; private ImageButton ibICalTentative; private SwitchCompat swFts; + private ImageButton ibFts; + private TextView tvFtsIndexed; + private TextView tvFtsPro; private SwitchCompat swClassification; private TextView tvClassMinProbability; private SeekBar sbClassMinProbability; @@ -124,8 +127,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private SeekBar sbClassMinDifference; private SwitchCompat swShowFiltered; private ImageButton ibClassification; - private TextView tvFtsIndexed; - private TextView tvFtsPro; private Spinner spLanguage; private SwitchCompat swUpdates; private TextView tvGithubPrivacy; @@ -386,6 +387,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc swICalTentative = view.findViewById(R.id.swICalTentative); ibICalTentative = view.findViewById(R.id.ibICalTentative); swFts = view.findViewById(R.id.swFts); + ibFts = view.findViewById(R.id.ibFts); + tvFtsIndexed = view.findViewById(R.id.tvFtsIndexed); + tvFtsPro = view.findViewById(R.id.tvFtsPro); swClassification = view.findViewById(R.id.swClassification); ibClassification = view.findViewById(R.id.ibClassification); tvClassMinProbability = view.findViewById(R.id.tvClassMinProbability); @@ -393,8 +397,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc tvClassMinDifference = view.findViewById(R.id.tvClassMinDifference); sbClassMinDifference = view.findViewById(R.id.sbClassMinDifference); swShowFiltered = view.findViewById(R.id.swShowFiltered); - tvFtsIndexed = view.findViewById(R.id.tvFtsIndexed); - tvFtsPro = view.findViewById(R.id.tvFtsPro); spLanguage = view.findViewById(R.id.spLanguage); swUpdates = view.findViewById(R.id.swUpdates); tvGithubPrivacy = view.findViewById(R.id.tvGithubPrivacy); @@ -664,6 +666,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); + ibFts.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), 13); + } + }); + Helper.linkPro(tvFtsPro); swClassification.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 0f766b1df1..235c46816d 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -203,6 +203,18 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swFts" /> + + + app:layout_constraintTop_toBottomOf="@id/ibFts" />