Android Question Multi AutoCompleteEditText or Searchview

Discussion in 'Android Questions' started by apty, Dec 30, 2017.

  1. apty

    apty Active Member Licensed 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.
     
  2. Star-Dust

    Star-Dust Expert Licensed 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
     
  3. Peter Simpson

    Peter Simpson Expert Licensed 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.
     
  4. apty

    apty Active Member Licensed 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
     
  5. Peter Simpson

    Peter Simpson Expert Licensed 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...
     
    NJDude likes this.
  6. apty

    apty Active Member Licensed User

    try to type two words in a row. One word works. In my case i want suggestion for every word i type.
     
  7. Peter Simpson

    Peter Simpson Expert Licensed User

    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.
     
    NJDude likes this.
  8. Star-Dust

    Star-Dust Expert Licensed 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 ..?
     
  9. Peter Simpson

    Peter Simpson Expert Licensed 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.
     
  10. apty

    apty Active Member Licensed User

  11. Star-Dust

    Star-Dust Expert Licensed User

    Sorry, but my English is poor. I did not understand what you mean, I'm using Google Translate but it does not help me
     
  12. Star-Dust

    Star-Dust Expert Licensed 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
     
    Peter Simpson likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice