G
G
gochag2017-08-28 19:08:00
Android
gochag, 2017-08-28 19:08:00

What is the error (Edittext filter and search on ListView )?

When typing text in the EditText, the ArrayAdapter text is searched and filtered.

@Override
            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
                listView.setVisibility(View.VISIBLE);
                adapter.getFilter().filter(charSequence.toString());

                if(adapter.getCount()==1){
                                        mBashlangic.setText(adapter.getItem(0));
                }
            }

mBashlangic(EditText). Why does the program freeze?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-08-28
@gochag

because Watcher is on the same field that you change, and changes to it come instantly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question