0

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.

Alon Shlider
  • 1,187
  • 1
  • 16
  • 46

1 Answers1

2

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

niceumang
  • 1,347
  • 1
  • 8
  • 21
  • @Alon Shilder check my edited answer and achieve your functionality !! – niceumang Nov 26 '19 at 13:49
  • Alright, trying to figure out which method I should override but the way Android class are written it's really hard to understand how to create my own implementation from the gives views. Basically what I need is to override each view being inflated and add to it an ImageView and have the ability to control it's text as I want, do you have any idea which methods I should override? – Alon Shlider Nov 26 '19 at 14:17
  • any ideas? I did not get anywhere – Alon Shlider Nov 27 '19 at 06:59
  • you can try to make custom view first for your autocompleteview spinner ? – niceumang Nov 27 '19 at 10:26