android - Display contacts name and phone number in multiautocomplete textview -


i have multiautocomplete textview autocompletes when user types on box respect data query on contactscontracts using content resolver. wanted display name , number on 1 list.

here code

        name_val = (string[]) c_name.toarray(new string[c_name.size()]);         phone_val= (string[]) c_number.toarray(new string[c_name.size()]);            arrayadapter<string> adapter = new arrayadapter<string>(getactivity(),r.layout.custom_dropdown, name_val);         txtphoneno.settokenizer(new multiautocompletetextview.commatokenizer());         txtphoneno.setadapter(adapter); 

unfortunately displays name. wanted display number after the contacts name.

you should use custom adapter or simple adapter custom view


Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

c++ - NetBeans Remote Development with additional configuration -

visual studio - TFS will not accept changes I've made to a Java project -