diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index ee4e70c3ea..5a5b29d508 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -53,6 +53,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.SwitchCompat; +import androidx.cardview.widget.CardView; import androidx.constraintlayout.widget.Group; import androidx.core.content.ContextCompat; import androidx.lifecycle.Lifecycle; @@ -131,7 +132,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private Button btnFiles; private Group grpUpdates; - private Group grpDebug; + private CardView cardDebug; private NumberFormat NF = NumberFormat.getNumberInstance(); @@ -237,7 +238,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc btnFiles = view.findViewById(R.id.btnFiles); grpUpdates = view.findViewById(R.id.grpUpdates); - grpDebug = view.findViewById(R.id.grpDebug); + cardDebug = view.findViewById(R.id.cardDebug); setOptions(); @@ -509,7 +510,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { prefs.edit().putBoolean("debug", checked).apply(); - grpDebug.setVisibility(checked || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); + cardDebug.setVisibility(checked || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); } }); @@ -981,7 +982,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc tvFingerprint.setText(Helper.getFingerprint(getContext())); - grpDebug.setVisibility(swDebug.isChecked() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); + cardDebug.setVisibility(swDebug.isChecked() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); } private void updateUsage() { diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 07f0e28cfa..147e861cb4 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -501,6 +501,43 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swDebug" /> + + + + + + + + + + - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9a1a8fa627..49605d0f8f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -363,6 +363,7 @@ Message Message header Message body + Debug Use two rows in portrait mode Use two columns in landscape mode