开发者

How to assign the value of AutoCompleteTextView from Dropdown selected value to another String

Friend's I need help on setting the data content开发者_如何学Python showing from DropDownlist of auto complete text box to another string,when i click the particular content from dropdown list. Help me.

thanks in advance.


I set onitemclicklistener for my AutoCompleteTextView and in it I manually do setText for the 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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜