pull/175/head
M66B 5 years ago
parent 4779332b46
commit 4cbe36613c

@ -27,7 +27,6 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.IntentSender; import android.content.IntentSender;
import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
@ -49,7 +48,6 @@ import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Lifecycle;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.preference.PreferenceManager;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

@ -43,7 +43,6 @@ import androidx.preference.PreferenceManager;
public class FragmentOptionsBehavior extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener { public class FragmentOptionsBehavior extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
private SwitchCompat swDoubleBack; private SwitchCompat swDoubleBack;
private SwitchCompat swPull; private SwitchCompat swPull;
private SwitchCompat swHideActionBar;
private SwitchCompat swAutoScroll; private SwitchCompat swAutoScroll;
private SwitchCompat swDoubleTap; private SwitchCompat swDoubleTap;
private SwitchCompat swSwipeNav; private SwitchCompat swSwipeNav;
@ -66,7 +65,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
private NumberPicker npDefaultSnooze; private NumberPicker npDefaultSnooze;
private final static String[] RESET_OPTIONS = new String[]{ private final static String[] RESET_OPTIONS = new String[]{
"double_back", "pull", "hide_actionbar", "autoscroll", "doubletap", "swipenav", "volumenav", "reversed", "double_back", "pull", "autoscroll", "doubletap", "swipenav", "volumenav", "reversed",
"autoexpand", "expand_all", "expand_one", "collapse_multiple", "autoexpand", "expand_all", "expand_one", "collapse_multiple",
"autoclose", "onclose", "quick_filter", "quick_scroll", "autoclose", "onclose", "quick_filter", "quick_scroll",
"autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance", "discard_delete", "autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance", "discard_delete",
@ -85,7 +84,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swDoubleBack = view.findViewById(R.id.swDoubleBack); swDoubleBack = view.findViewById(R.id.swDoubleBack);
swPull = view.findViewById(R.id.swPull); swPull = view.findViewById(R.id.swPull);
swHideActionBar = view.findViewById(R.id.swHideActionBar);
swAutoScroll = view.findViewById(R.id.swAutoScroll); swAutoScroll = view.findViewById(R.id.swAutoScroll);
swDoubleTap = view.findViewById(R.id.swDoubleTap); swDoubleTap = view.findViewById(R.id.swDoubleTap);
swSwipeNav = view.findViewById(R.id.swSwipeNav); swSwipeNav = view.findViewById(R.id.swSwipeNav);
@ -130,13 +128,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
} }
}); });
swHideActionBar.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("hide_actionbar", checked).apply();
}
});
swAutoScroll.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swAutoScroll.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -339,7 +330,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swDoubleBack.setChecked(prefs.getBoolean("double_back", true)); swDoubleBack.setChecked(prefs.getBoolean("double_back", true));
swPull.setChecked(prefs.getBoolean("pull", true)); swPull.setChecked(prefs.getBoolean("pull", true));
swHideActionBar.setChecked(prefs.getBoolean("hide_actionbar", false));
swAutoScroll.setChecked(prefs.getBoolean("autoscroll", true)); swAutoScroll.setChecked(prefs.getBoolean("autoscroll", true));
swDoubleTap.setChecked(prefs.getBoolean("doubletap", false)); swDoubleTap.setChecked(prefs.getBoolean("doubletap", false));
swSwipeNav.setChecked(prefs.getBoolean("swipenav", true)); swSwipeNav.setChecked(prefs.getBoolean("swipenav", true));

@ -40,18 +40,6 @@
app:layout_constraintTop_toBottomOf="@id/swDoubleBack" app:layout_constraintTop_toBottomOf="@id/swDoubleBack"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swHideActionBar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_hide_actionbar"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swPull"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swAutoScroll" android:id="@+id/swAutoScroll"
android:layout_width="0dp" android:layout_width="0dp"
@ -61,7 +49,7 @@
android:text="@string/title_advanced_autoscroll" android:text="@string/title_advanced_autoscroll"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swHideActionBar" app:layout_constraintTop_toBottomOf="@id/swPull"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat

@ -344,7 +344,6 @@
<string name="title_advanced_double_back">Double \'back\' to exit</string> <string name="title_advanced_double_back">Double \'back\' to exit</string>
<string name="title_advanced_pull_refresh">Pull down to refresh</string> <string name="title_advanced_pull_refresh">Pull down to refresh</string>
<string name="title_advanced_hide_actionbar">Hide action bar on scrolling down</string>
<string name="title_advanced_autoscroll">Scroll to top on receiving new messages</string> <string name="title_advanced_autoscroll">Scroll to top on receiving new messages</string>
<string name="title_advanced_double_tap">Double tap to mark message read/unread</string> <string name="title_advanced_double_tap">Double tap to mark message read/unread</string>
<string name="title_advanced_swipenav">Swipe left/right to go to next/previous conversation</string> <string name="title_advanced_swipenav">Swipe left/right to go to next/previous conversation</string>

Loading…
Cancel
Save