开发者

Building an auto complete text view to hold email message contacts

I need to create an auto complete text view that will be used in a send email form, the auto complete text view will be loaded with the email contacts of the phone, The user can select from the auto complete drop down list any contact he wants, When he chooses another contact, the value of the开发者_如何学运维 auto complete is replaced by the new one, I want the new value to be added to the original one, any one knows what event should i use?


This example demonstrates how to create a class that handles the event given by the spinner when it's changed:

Spinner on value Change

You extend the OnItemSelectedListener class, override onItemSelected() and put your code in there to update the view with the new contact's details.

Then apply your listener to the spinner, perhaps in the onCreate() of your activity:

spinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜