3
朋友的 當我從下拉列表中點擊特定內容時,需要幫助將從自動完成文本框的DropDownlist顯示的數據內容設置爲另一個字符串。 幫幫我。如何將AutoCompleteTextView的值從下拉列表中選擇值分配給另一個字符串
在此先感謝。
朋友的 當我從下拉列表中點擊特定內容時,需要幫助將從自動完成文本框的DropDownlist顯示的數據內容設置爲另一個字符串。 幫幫我。如何將AutoCompleteTextView的值從下拉列表中選擇值分配給另一個字符串
在此先感謝。
我設置onitemclicklistener我AutoCompleteTextView,並在其中我做手工的setText爲AutoCompleteTextView:
editNumber = (AutoCompleteTextView) findViewById(R.id.editNumber);
NumberAdapter adapter = new NumberAdapter(
this,
ContactInfo.getContacts(this.getContentResolver()));
editNumber.setAdapter(adapter);
editNumber.setOnItemClickListener(this);
....
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
ContactInfo ci = (ContactInfo)parent.getItemAtPosition(position);
editNumber.setText(ci.Number);
}