android-testify icon indicating copy to clipboard operation
android-testify copied to clipboard

HideTextSuggestionsViewModification does not consistently work

Open DanielJette opened this issue 3 years ago • 0 comments

Current logic:

    @Override
    protected void performModification(View view) {
        int inputType = ((EditText) view).getInputType();
        ((EditText) view).setInputType(inputType | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
    }

I suspect this isn't working if the existing input has a conflicting mode. ex. if the EditText is already set to "show suggestions" adding the "no suggestions" flag may be a no-op. I didn't want to blow away the existing input type, just turn off suggestions. But, it seems this doesn't work.

May need a different approach or to create a list of input types to remove before applying "no suggestions"

DanielJette avatar Mar 22 '22 15:03 DanielJette