0

I have autocomplete textView with simple adapter everything works fine except one little thing. After I click on a suggestion, Autocomplete text view is filled with it but then there is another suggestion and I have to press back to disable it. It's just a cosmetic issue but still, Is there a way to avoid it?

to.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                Map<String, String> map = (Map<String, String>) adapterView.getItemAtPosition(i);

                String name  = map.get("Name");
                String number = map.get("Number");

                to.setText(number);
                saveAs.setText(name);

                to.setSelection(to.getText().length());
            }
        });
miskohut
  • 957
  • 1
  • 14
  • 34
  • http://stackoverflow.com/questions/15356193/autocompletetextview-detect-when-selected-entry-from-list-edited-by-user Did you check this. Its a good idea of implementing. Wont it help? – Vilas Jan 28 '15 at 10:51
  • I think you can do this by telling the autocomplete to drop the focus from the element once something is selected or the user presses done. – G_V Jan 28 '15 at 11:23

0 Answers0