我有一个关键词列表(大约1000个单词),我把它设置为一个ArrayAdapter,由AutoCompleteTextView处理.基本过程运行正常.当我选择一个长单词(上面10个字符),然后使用键盘退格按钮删除单词(按住按钮)时出现问题,删除5个字符后,应用程序崩溃时出现以下错误.
01-16 13:27:23.082: ERROR/AndroidRuntime(2874): FATAL EXCEPTION: main
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(-1, class android.widget.AutoCompleteTextView$DropDownListView) with Adapter(class com.hdm_i.dm.corp.android.muenchen.adapters.PoiAutoCompleteAdapter)]
at android.widget.ListView.layoutChildren(ListView.java:1527)
at android.widget.AbsListView.onLayout(AbsListView.java:1430)
at android.view.View.layout(View.java:7228)
at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
at android.view.View.layout(View.java:7228)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1145)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native …Run Code Online (Sandbox Code Playgroud)