Added info button to debug info dialog

pull/214/head
M66B 1 year ago
parent ca5fe2c666
commit f35f1adb7a

@ -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<EntityAccount> adapterAccount;
etIssue.addTextChangedListener(new TextWatcher() {
@Override

@ -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 @@
<TextView
android:id="@+id/tvCaption"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:drawableStart="@drawable/twotone_bug_report_24"
android:drawablePadding="6dp"
android:drawableTint="?android:attr/textColorPrimary"
android:text="@string/title_debug_info"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintEnd_toStartOf="@+id/ibInfo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/ibInfo"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_info"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/twotone_info_24"
app:tint="?attr/colorAccent" />
<TextView
android:id="@+id/tvIssue"
android:layout_width="wrap_content"
@ -39,7 +55,6 @@
android:gravity="top"
android:imeOptions="actionNone|flagNoEnterAction"
android:inputType="textCapSentences|textMultiLine|textAutoCorrect"
android:minHeight="60dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -100,5 +115,16 @@
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbSend" />
<TextView
android:id="@+id/tvQuestion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_debug_info_question"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic|bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSendRemark" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -2287,6 +2287,7 @@
<string name="title_debug_info_contact">We recently had contact about this problem</string>
<string name="title_debug_info_send">Send immediately</string>
<string name="title_debug_info_send_remark">Normally, the debug info will be stored as draft message first, so you can check what will be sent</string>
<string name="title_debug_info_question">Please use the info button if you just have a question</string>
<string name="title_unexpected_info_remark">Please describe what you were doing when you got the error:</string>
<string name="title_issue_subject" translatable="false">FairEmail %1$s issue</string>

Loading…
Cancel
Save