I would like when searched in my listview João
to display João, Joao, joão, joao
.
I'm using a searchview, I read something about Normalizer but I did not quite understand it.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.busca, menu);
MenuItem menuItem = menu.findItem(R.id.sv);
SearchView searchView = (SearchView) menuItem.getActionView();
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
arrayAdapter.getFilter().filter(newText);
return true;
}
});
getMenuInflater().inflate(R.menu.activity_main, menu);
return super.onCreateOptionsMenu(menu);
}