I have a AutoCompleteTextView
, defined as your adapter I have a list that gets the name of cities like, for example, São Paulo, but if I enter it in the field the value Sao Paulo, without the accent, it does not display any item , that's why AutoCompleteTextView
probably does not identify the a == ã
character.
How can I make the value with an accent display when the value without an accent is entered?
Code that I created separately for testing:
ArrayList<String>cidades = new ArrayList<>();
cidades.add("São Paulo");
cidades.add("São Luiz");
autoComplete = (AppCompatAutoCompleteTextView)findViewById(R.id.autoComplete);
ArrayAdapter<String> lista = new ArrayAdapter<>(this,android.R.layout.simple_dropdown_item_1line,cidades);
autoComplete.setAdapter(lista);
Q.: I can add the items without an accent in the list easily.