hi,

to use an AutoCompleteTextWiew  with an Array of string (mString)  we
can use for instance

contact.addTextChangedListener(this);
setAdapter(new ArrayAdapter<String>(this,
                         android.R.layout.simple_list_item_1,
                         mString));   }

It works, but, how to use it with a cursor or an ArrayList ?

I tried for instance for the cursor addr

        contact.addTextChangedListener(this);
        contact.setAdapter(new SimpleCursorAdapter
(this,R.layout.selectmail_item,addr,
                        new String[] {Contacts.ContactMethods.NAME},new int[]
{R.id.name}));

but all my contacts names are played

and for instance for the ArrayList  mStrings = new ArrayList<String[]>
();

contact.addTextChangedListener(this);
contact.setAdapter(new ArrayAdapter
(this,R.layout.selectmail_item,R.id.name,mStrings));


it doesn't work at all,I've tried a lot of things for nothing... If
somebody knows how to resolve this kind of problem It will be
fine!!!!!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to