5

有没有办法更新 MultiAutoCompleteTextView 的数组适配器?我正在使用波纹管代码,但它不起作用。另请注意,“emailList”是一个字符串数组列表。提前致谢

recipientsTextView.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                long arg3) {
            final String selectedEmail = (String) arg0.getItemAtPosition(arg2);
            if (emailList.contains(selectedEmail)) {
                runOnUiThread(new Runnable() {

                    @Override
                    public void run() {
                        emailList.remove(selectedEmail);
                        adapter.notifyDataSetChanged();
                    }
                });

            }
        }
    });
4

0 回答 0