开发者

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

开发者 https://www.devze.com 2023-01-22 05:16 出处:网络
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.

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

精彩评论

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