Made removing HTML formatting an advanced option

Default off
This commit is contained in:
M66B
2018-08-28 09:10:31 +00:00
parent 8fa2bcd2f8
commit 6fafbaac5a
5 changed files with 51 additions and 9 deletions

View File

@@ -36,6 +36,7 @@ import androidx.annotation.Nullable;
public class FragmentOptions extends FragmentEx {
private CheckBox cbWebView;
private TextView tvCustomTabs;
private CheckBox cbSanitize;
private CheckBox cbDebug;
@Override
@@ -48,6 +49,7 @@ public class FragmentOptions extends FragmentEx {
// Get controls
cbWebView = view.findViewById(R.id.cbWebView);
tvCustomTabs = view.findViewById(R.id.tvCustomTabs);
cbSanitize = view.findViewById(R.id.cbSanitize);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
@@ -62,6 +64,14 @@ public class FragmentOptions extends FragmentEx {
}
});
cbSanitize.setChecked(prefs.getBoolean("sanitize", false));
cbSanitize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("sanitize", checked).apply();
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override