mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 09:31:11 +01:00
Small layout fix
This commit is contained in:
@@ -50,6 +50,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
@@ -66,6 +67,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swSafeBrowsing;
|
||||
private Button btnSafeBrowsing;
|
||||
|
||||
private Group grpSafeBrowsing;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"confirm_links", "confirm_images", "confirm_html", "disable_tracking",
|
||||
"biometrics", "pin", "biometrics_timeout",
|
||||
@@ -95,6 +98,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
swSafeBrowsing = view.findViewById(R.id.swSafeBrowsing);
|
||||
btnSafeBrowsing = view.findViewById(R.id.btnSafeBrowsing);
|
||||
|
||||
grpSafeBrowsing = view.findViewById(R.id.grpSafeBrowsing);
|
||||
|
||||
setOptions();
|
||||
|
||||
// Wire controls
|
||||
@@ -195,7 +200,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swSafeBrowsing.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.GONE : View.VISIBLE);
|
||||
swSafeBrowsing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -210,6 +214,8 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
grpSafeBrowsing.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.GONE : View.VISIBLE);
|
||||
|
||||
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
||||
|
||||
return view;
|
||||
|
||||
Reference in New Issue
Block a user