Android Question Multi AutoCompleteEditText or Searchview

apty

Active Member
Licensed User
Longtime User
Greetings.
I have an edittext and an autocompletetextview that is supposed to show suggestions on edittext textchanged event. For example, I would like to be able to type words in an edittext and get suggestions for every word i type.
e.g. if i type "How" i get suggestion "How are you". Once i click on this, the edittext has the text "How are you". I then type another word "to" and i get suggestion from autocompleteedittext "today". Once i click on it, the edittext content becomes "How are you today". In other words, every text i type on edittext gets suggestion and once i click on the suggestion, it adds to the words already typed in edittext. Please assist.
 

Star-Dust

Expert
Licensed User
Longtime User
Very interesting, a nice idea, similar to the one that uses google for the search.

We should create a special class. If I did then I would not distribute it but I would sell it :p
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
SearchView - It reads from an SQLite database and displays possible autocomplete words being currently types as long as you have the words in the SQLite DB file. It's extremely lightweight and should only take you a short time to implement. All you do then is add the words to the database that you are using.
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
Searchview shows suggestion only for the first word. When i have an entire sentence where i want suggestion for example for each word, searchview only works for first word in the sentence
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
In my test, 'Stat' for 'states' is the second word in the two countries shown below.
Screenshot_20171230-221850.jpg


Also 'Vir' for 'Virgin' is the second and third words in the two countries shown below.
Screenshot_20171230-222218.jpg


it will also filter 'states virgin', bit it will not filter out 'states islands'

Enjoy...
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
try to type two words in a row. One word works. In my case i want suggestion for every word i type.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
try to type two words in a row. One word works. In my case i want suggestion for every word i type.

Read what I previously said at the bottom of my previous post, the sentence above Enjoy... . bit should in fact say but, I will not edit it now as you might say that I added that text after the fact.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I create that what he asks is different.
Peter you are making an example of more words but of the same expression contained in the dictionary.
(Such as United States of America is an expression)

While he is looking for something that already exists in Google Search Bar and also in the modern T9 dictionaries of the devices.

He would like him to suggest the completion of the sentence even if it is not an expression "
Eg.

Write:
Good,
suggestion
day
evening
night

Write:
Good morning,
suggestion
How ..?
What ..?
Where ..?
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
I know that @Star-Dust, he is saying something that is obviously incorrect so I'm correcting him, a picture (photo) says 1000 words. If he says it only selects words from the start I'll show him otherwise.

Look at it this way @Star-Dust, Other members could read what he says and think that it will not work for them, when in fact it's something they are looking for like in the screen shots above.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I know that @Star-Dust, he is saying something that is obviously incorrect so I'm correcting him, a picture (photo) says 1000 words. If he says it only selects words from the start I'll show him otherwise.

Look at it this way @Star-Dust, Other members could read what he says and think that it will not work for them, when in fact it's something they are looking for like in the screen shots above.
Sorry, but my English is poor. I did not understand what you mean, I'm using Google Translate but it does not help me
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
But you want a wrapping of this? Or even a new one.

There is a difference, because by using a wrapping of what already exists the associations of words make it the system as you write.
In a sense, you draw a statistic on your sentences, and try to predict what you would like to write after a certain word. The statistic does it on everything you write in all the Apps.

If you make a new one this "prediction" work must be done by your class and probably you will count only what you write in that App.

I think it's better to ask for a wrapping at this point
 
Upvote 0
Top