Don-
Here is one way to do this:
In your activity declaration, add this interface:
MyActivity extends Activity implements OnItemClickListener
Then implement as follows:
/**
* Implements OnItemClickListener
*/
public void onItemClick(AdapterView<?> parent, View view, int
position, long id) {
if (parent == myAutoCompleteTextView) {
// handle item click
}
}
For additional tricks, see also OnItemSelectedListener.
Hope this helps.
--Andy
On Thu, Jan 15, 2009 at 5:45 AM, Don Rules <[email protected]> wrote:
> I have written an application to show the contacts in the
> AutoCompleteTextView.
> while the user types the alphabets, it fetches the matching contacts to
> display.
>
> For this I have used a CursorAdapter
>
> Now I have to get the Contact name when the contact is clicked.
>
> How do i use setOnItemSelectedListener(AdapterView.OnItemSelectedListener l)
> for the AutoCompleteTextvView.
>
> Please help.
>
> Regards,
> Don.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---