Last active
August 29, 2017 14:59
-
-
Save lmller/dd143275f88cad8a21f96843cfca0d58 to your computer and use it in GitHub Desktop.
Samsung Devices ignore TYPE_TEXT_FLAG_NO_SUGGESTIONS, so TYPE_TEXT_VARIATION_VISIBLE_PASSWORD is the only thing that works for them.
This file contains 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
public class SuggestionsCorrector { | |
public static final String SAMSUNG = "samsung"; | |
public EditText correctSuggestions(EditText editText) { | |
if(Build.BRAND.equalsIgnoreCase(SAMSUNG)) { | |
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); | |
} | |
return editText; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found out this code breaks Korean input. With "visible password", the Google Korean keyboard is showing latin symbols only.
Just something to consider when using this hack for Samsungs ;)