Android MultiAutoCompleteTextView - display custom views in it

I am implementing a MultiAutoCompleteTextView with email suggestions. What I want is to display the contact icons in the contents of the MultiAutoCompleteTextView instead of strings. This is a Gmail app for Android. Basically I want what is shown in the drop-down list that will be displayed in the MultiAutoCompleteTextView (contact photo, name and email address) after entering or selecting a contact. Is it possible?

Sschot

+6
source share
1 answer

Google does this with custom ImageSpan. I have just successfully implemented this application for one of my applications. You should look at RecipientEditTextView.java to see how they do it. Essentially, they create the ability to draw with Canvas and assign this value to a custom, custom ImageSpan. I cannot post any code since ... well there is a ton, however you should get a good idea looking through the source.

+5
source

All Articles