Indent related options

This commit is contained in:
M66B 2021-06-27 09:31:20 +02:00
parent 4aa7112adb
commit ec35e2a1a7
8 changed files with 21 additions and 1 deletions

View File

@ -79,6 +79,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
private SwitchCompat swExpandOne;
private SwitchCompat swAutoClose;
private TextView tvAutoSeenHint;
private TextView tvOnClose;
private Spinner spOnClose;
private Spinner spUndoTimeout;
private SwitchCompat swCollapseMultiple;
@ -132,6 +133,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swCollapseMultiple = view.findViewById(R.id.swCollapseMultiple);
tvAutoSeenHint = view.findViewById(R.id.tvAutoSeenHint);
swAutoClose = view.findViewById(R.id.swAutoClose);
tvOnClose = view.findViewById(R.id.tvOnClose);
spOnClose = view.findViewById(R.id.spOnClose);
spUndoTimeout = view.findViewById(R.id.spUndoTimeout);
swAutoRead = view.findViewById(R.id.swAutoRead);
@ -337,6 +339,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("autoclose", checked).apply();
tvOnClose.setEnabled(!checked);
spOnClose.setEnabled(!checked);
}
});
@ -490,6 +493,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
break;
}
tvOnClose.setEnabled(!swAutoClose.isChecked());
spOnClose.setEnabled(!swAutoClose.isChecked());
int undo_timeout = prefs.getInt("undo_timeout", 5000);

View File

@ -962,7 +962,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swThreadingUnread.setChecked(prefs.getBoolean("threading_unread", false));
swThreadingUnread.setEnabled(swThreading.isChecked());
swIndentation.setChecked(prefs.getBoolean("indentation", false));
swIndentation.setEnabled(swCards.isChecked());
swIndentation.setEnabled(swCards.isChecked() && swThreading.isChecked());
swSeekbar.setChecked(prefs.getBoolean("seekbar", false));
swActionbar.setChecked(prefs.getBoolean("actionbar", true));
swActionbarColor.setChecked(prefs.getBoolean("actionbar_color", false));

View File

@ -102,6 +102,7 @@
android:id="@+id/swConversationActionsReplies"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_conversation_actions_replies"
@ -397,6 +398,7 @@
android:id="@+id/swExpandFirst"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_expand_first"
@ -420,6 +422,7 @@
android:id="@+id/swExpandOne"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_expand_one"
app:layout_constraintEnd_toEndOf="parent"
@ -431,6 +434,7 @@
android:id="@+id/swCollapseMultiple"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_collapse_multiple"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -198,6 +198,7 @@
android:id="@+id/swDateBold"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_date_bold"
app:layout_constraintEnd_toEndOf="parent"
@ -347,6 +348,7 @@
android:id="@+id/swThreadingUnread"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_threading_unread"
app:layout_constraintEnd_toEndOf="parent"
@ -358,6 +360,7 @@
android:id="@+id/swIndentation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_indentation"
@ -393,6 +396,7 @@
android:id="@+id/swActionbarColor"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_actionbar_color"
app:layout_constraintEnd_toEndOf="parent"
@ -543,6 +547,7 @@
android:id="@+id/swIdenticons"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_identicons"
app:layout_constraintEnd_toEndOf="parent"
@ -923,6 +928,7 @@
android:id="@+id/swPreviewItalic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_preview_italic"
@ -935,6 +941,7 @@
android:id="@+id/tvPreviewLines"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_preview_lines"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
@ -947,6 +954,7 @@
android:id="@+id/spPreviewLines"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:entries="@array/linesNames"
app:layout_constraintStart_toStartOf="parent"

View File

@ -211,6 +211,7 @@
android:id="@+id/swAutocryptMutual"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_autocrypt_mutual"

View File

@ -312,6 +312,7 @@
android:id="@+id/swWeekly"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_check_weekly"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -92,6 +92,7 @@
android:id="@+id/swBrowseLinks"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_browse_links"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -540,6 +540,7 @@
android:id="@+id/swSyncSharedFolders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_sync_shared_folders"
app:layout_constraintEnd_toEndOf="parent"