Add the option to highlight entries when tapped

This adds an option to highlight tapped entries, so that it's easier to
distinguisch between the one you're trying to enter into a website and the other
ones.

Only one entry can be highlighted at a time. Perhaps it would make sense to
change our tap to reveal functionality to behave the same, so that the two
features are nicely in sync. I can address that in a separate PR if we decide to
do so.
This commit is contained in:
Alexander Bakker 2019-09-07 22:26:34 +02:00
parent 5e7697039a
commit 51a0a16afb
8 changed files with 123 additions and 24 deletions

View file

@ -207,6 +207,12 @@ public class PreferencesFragment extends PreferenceFragmentCompat {
return true;
});
Preference entryHighlightPreference = findPreference("pref_highlight_entry");
entryHighlightPreference.setOnPreferenceChangeListener((preference, newValue) -> {
_result.putExtra("needsRefresh", true);
return true;
});
Preference tapToRevealPreference = findPreference("pref_tap_to_reveal");
tapToRevealPreference.setOnPreferenceChangeListener((preference, newValue) -> {
_result.putExtra("needsRefresh", true);
@ -348,7 +354,7 @@ public class PreferencesFragment extends PreferenceFragmentCompat {
}
@Override
public void onActivityCreated (Bundle savedInstanceState) {
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
updateEncryptionPreferences();
}