Added identicons

This commit is contained in:
M66B
2018-11-03 16:34:35 +00:00
parent 3f3915ebf7
commit e6970faf6e
8 changed files with 88 additions and 9 deletions

View File

@@ -34,6 +34,7 @@ import androidx.appcompat.widget.SwitchCompat;
public class FragmentOptions extends FragmentEx {
private SwitchCompat swEnabled;
private SwitchCompat swAvatars;
private SwitchCompat swIdenticons;
private SwitchCompat swLight;
private SwitchCompat swBrowse;
private SwitchCompat swSwipe;
@@ -52,6 +53,7 @@ public class FragmentOptions extends FragmentEx {
// Get controls
swEnabled = view.findViewById(R.id.swEnabled);
swAvatars = view.findViewById(R.id.swAvatars);
swIdenticons = view.findViewById(R.id.swIdenticons);
swLight = view.findViewById(R.id.swLight);
swBrowse = view.findViewById(R.id.swBrowse);
swSwipe = view.findViewById(R.id.swSwipe);
@@ -84,6 +86,14 @@ public class FragmentOptions extends FragmentEx {
}
});
swIdenticons.setChecked(prefs.getBoolean("identicons", true));
swIdenticons.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("identicons", checked).apply();
}
});
swLight.setChecked(prefs.getBoolean("light", false));
swLight.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override