From f35f1adb7aadcf256d4bd40acc4c3d86634d6bda Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 27 Sep 2023 08:14:39 +0200 Subject: [PATCH] Added info button to debug info dialog --- .../faircode/email/FragmentDialogDebug.java | 9 ++++++ app/src/main/res/layout/dialog_debug.xml | 30 +++++++++++++++++-- app/src/main/res/values/strings.xml | 1 + 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogDebug.java b/app/src/main/java/eu/faircode/email/FragmentDialogDebug.java index b7790026a6..953017f69e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogDebug.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogDebug.java @@ -34,6 +34,7 @@ import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.CheckBox; import android.widget.EditText; +import android.widget.ImageButton; import android.widget.Spinner; import androidx.annotation.NonNull; @@ -54,11 +55,19 @@ public class FragmentDialogDebug extends FragmentDialogBase { final Context context = getContext(); View view = LayoutInflater.from(context).inflate(R.layout.dialog_debug, null); + final ImageButton ibInfo = view.findViewById(R.id.ibInfo); final EditText etIssue = view.findViewById(R.id.etIssue); final Spinner spAccount = view.findViewById(R.id.spAccount); final CheckBox cbContact = view.findViewById(R.id.cbContact); final CheckBox cbSend = view.findViewById(R.id.cbSend); + ibInfo.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + v.getContext().startActivity(Helper.getIntentIssue(v.getContext(), "debug")); + } + }); + final ArrayAdapter adapterAccount; etIssue.addTextChangedListener(new TextWatcher() { @Override diff --git a/app/src/main/res/layout/dialog_debug.xml b/app/src/main/res/layout/dialog_debug.xml index 93357b8f6f..981fe1d87f 100644 --- a/app/src/main/res/layout/dialog_debug.xml +++ b/app/src/main/res/layout/dialog_debug.xml @@ -3,6 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" + android:fadeScrollbars="false" android:padding="24dp" android:scrollbarStyle="outsideOverlay"> @@ -12,16 +13,31 @@ + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b4be5c9c65..aea9c1e2c6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -2287,6 +2287,7 @@ We recently had contact about this problem Send immediately Normally, the debug info will be stored as draft message first, so you can check what will be sent + Please use the info button if you just have a question Please describe what you were doing when you got the error: FairEmail %1$s issue