Add password digit highlighting and settings toggle#192
Open
metergames wants to merge 2 commits into
Open
Conversation
Render numeric digits in a distinct blue color when a password is revealed in CopyTextItem, so visually similar characters (e.g. 0 vs O, 1 vs l) can be told apart. Coloring is applied only while the password is shown - not while masked - so it never reveals digit positions behind the masking dots. Covers both the main password field and password-type custom fields, since both use CopyTextItem. Gated by a new COLOR_PASSWORD_DIGITS preference that defaults to on. Signed-off-by: Ryan Morov <metergames22@gmail.com>
Add a checkbox in settings to enable or disable highlighting of digits in revealed passwords. Defaults to enabled. Wires the COLOR_PASSWORD_DIGITS preference through SettingsFragment and adds the corresponding strings. Signed-off-by: Ryan Morov <metergames22@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature that allows users to highlight digits in revealed passwords with a different color, making it easier to distinguish similar-looking characters (like 0 and O). The feature can be enabled or disabled via a new setting in the app's settings screen. The implementation includes changes to the password display logic, user preferences, and the user interface.
Closes #191
Password Display Enhancements
CopyTextItemto highlight digits in revealed passwords using a custom color (password_digit) when the new setting is enabled. This is handled by the newrefreshDisplayedTextmethod, which applies aForegroundColorSpanto digits. [1] [2] [3] [4] [5]Settings and Preferences
COLOR_PASSWORD_DIGITSinSettingValuesto control whether password digits are highlighted.SettingsFragmentto include a new checkbox (settings_color_password_digits_switch) for enabling/disabling the digit-highlighting feature, and to persist the user's preference. [1] [2] [3] [4]fragment_settings.xml) to add the checkbox and its descriptive label.User Interface and Localization