我在我的android活动中在onResume()
方法中添加了以下代码。setNotifyOnChange(true)不起作用
username.addTextChangedListener(this);
usernames_adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_dropdown_item_1line,
users.getUserList());
username.setAdapter(usernames_adapter);
usernames_adapter.setNotifyOnChange(true);
我使用sql脚本将数据插入到数据库中。我需要显示在username
插入的数据(username
是AutoCompleteTextView)
刚插入后。所以我用usernames_adapter.setNotifyOnChange(true);
,但它不工作。我必须Force Stop
我的应用程序,以显示对AutoCompleteTextView
插入的数据。
我怎么能解决这个问题?
发布您的logcat, – kyogs 2013-02-13 05:17:20
没有什么特别的东西logcat – Bishan 2013-02-13 05:18:52
确保您的数据列表已更改和更新;即用户列表 – 2013-02-13 05:32:35