使用MultiAutoCompleteTextView Validator

时间:2017-03-23 07:34:04

标签: android multiautocompletetextview

我正在使用MultiAutoCompleteTextView的验证器,每当我点击建议时应用程序挂起。这是我的验证码。

  participants.setValidator(new AutoCompleteTextView.Validator() {
            @Override
            public boolean isValid(CharSequence charSequence) {
                if (!tempList.contains(item)){
                    tempList.add(item);
                    Log.e("itemadding", item.getEid());
                    return true;
                }

                else
                    return false;
            }

            @Override
            public CharSequence fixText(CharSequence charSequence) {
                return "";
            }
        });

participants.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
                item = adapter.getItem(position);
                participants.performValidation();

            }
        });

编辑:=这是堆栈跟踪...

03-23 12:50:42.949 7419-7419/com.gensofterp.gensales D/HAWAII_EGL: Set SWAP INTERVAL 0
03-23 12:50:42.949 7419-7419/com.gensofterp.gensales D/HAWAII_EGL: eglCreateWindowSurface() surface: 0x5c8affa8, VC surface: 8, Thread: 7419
03-23 12:50:42.949 7419-7419/com.gensofterp.gensales D/HAWAII_EGL: eglMakeCurrent(0x510acaa0, 0x5c8affa8, 0x5c8affa8) Thread: 7419
03-23 12:50:43.019 7419-7419/com.gensofterp.gensales D/HAWAII_EGL: eglMakeCurrent(0x510acaa0, 0x5c305808, 0x5c305808) Thread: 7419
03-23 12:50:44.130 7419-7419/com.gensofterp.gensales D/HAWAII_EGL: eglMakeCurrent(0x510acaa0, 0x5c8affa8, 0x5c8affa8) Thread: 7419
03-23 12:50:44.791 7419-7422/com.gensofterp.gensales D/dalvikvm: GC_CONCURRENT freed 14854K, 69% free 6884K/21772K, paused 2ms+6ms, total 43ms
03-23 12:50:44.791 7419-7419/com.gensofterp.gensales D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 24ms
03-23 12:50:45.061 7419-7422/com.gensofterp.gensales D/dalvikvm: GC_CONCURRENT freed 2295K, 69% free 6756K/21772K, paused 2ms+5ms, total 36ms
03-23 12:50:45.061 7419-7419/com.gensofterp.gensales D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 20ms
03-23 12:50:45.321 7419-7422/com.gensofterp.gensales D/dalvikvm: GC_CONCURRENT freed 2123K, 69% free 6755K/21772K, paused 3ms+4ms, total 37ms
03-23 12:50:45.321 7419-7419/com.gensofterp.gensales D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 19ms

0 个答案:

没有答案