Alon Shlider
Alon Shlider

Reputation: 1298

AutoCompleteTextView - how to add an image and a text to auto completed text?

I have the following layout in my app -

enter image description here

What I want to achieve is the following -

enter image description here

1) The red line - I want to have above the suggestions a hard coded text saying "did you mean" and then the recommended. This text should be replaced when there are 0 characters in the AutoCompleteTextView and say "recent search". How can I do that?

2) The blue line - I want to have an image near each row item - how can I add them?

3) I would like to add a magnifying glass image before the searched text query starts to write. How can I add it?

As stated in the title, I am using AutoCompleteTextView.

Upvotes: 0

Views: 1132

Answers (1)

niceumang
niceumang

Reputation: 1432

You can create custom view for your autocomplete textview and set that view into adapter. custom view contain imageview and textview as you want in horizontal row.

still not getting idea check this Custom view for dropdown

Upvotes: 2

Related Questions