Reputation: 2903
I am looking to achieve the functionality of an AutocompleteTextView
but slightly different. Instead of getting a drop-down list with suggestions i want it to complete the sentence for me.
For example: i type abc
and i get completed, with the rest of the text in grey: [email protected]
and then click a button to keep this text or keep writing to filter this even further.
Do you think is is achievable somehow?
I have looked my problem up so far but all the answers i found involved a drop-down list, perhaps i haven't looked deep enough.
Upvotes: 2
Views: 1912
Reputation: 263
use below example ... i think help you...
http://teamandroid4u.blogspot.in/2012/06/autocompletetextview-example.html
Upvotes: 0
Reputation: 1215
Why don't you try to implement a custom view?
Basically, you need to the same things that the AutoCompleteTextView does but instead of displaying N elements into the drop down list you have to add the first option to your EditText.
Have a look at:
You can then play with indexes and spannables in order to keep track of the data input by the user and the data that you are suggesting.
One thing that I don't like about this idea is the fact that if you have got:
You need to type a lot of letters without the possibility to choose something different from the solution that you are providing.
Upvotes: 1