【发布时间】:2012-03-25 13:39:40
【问题描述】:
我遇到了 AutoCompleteTextView 的问题。
我在几个活动中使用它,除了一个以对话为主题的活动之外,它对所有活动都适用。
在此特定活动中,建议列表根本不显示
这是我的代码:
<AutoCompleteTextView android:layout_height="wrap_content" android:id="@+id/etTesterName" android:completionThreshold="1" android:gravity="center" android:layout_width="fill_parent" android:layout_weight="1"></AutoCompleteTextView>
mTestersList = new ArrayList<Testers>();
mAdapter = new ArrayAdapter<Testers>(this, android.R.layout.simple_dropdown_item_1line, mTestersList);
((AutoCompleteTextView) findViewById(R.id.etTesterName)).setAdapter(mAdapter);
...
mTestersList = result;
mAdapter.notifyDataSetChanged();
mTestersList,是一个覆盖了 toString() 的 Testers 类的列表。此代码适用于我的所有活动,但主题为..任何人都知道为什么?
弗拉德
【问题讨论】:
标签: android dialog autocompletetextview