How do i add words to the suggestions on top of the soft keyboard
-
Is there any way to add words to the suggestions in the soft keyboard? For a specific Edittext field i would like to add a list of names to the suggestions that pops up on top of the soft keyboard in android 2.0. Does anyone know if this is possible?
-
Answer:
http://android.git.kernel.org/?p=platform/packages/inputmethods/LatinIME.git;a=summary is the source code of the soft keyboard. If you go through the code, you will see that it uses a Suggest class which inside has different dictionaries. If you want to add words for a specific EditText you would need to add and remove or change freq of a certain word from those dictionaries. Some issues: I couldn't find a way to get the InputMethodService's instance. (If you can, please answer my question http://stackoverflow.com/questions/2297739) Android allows developers to program their own http://developer.android.com/intl/de/resources/articles/creating-input-method.html. I am working on one myself and my implementation doesn't use that dictionaries. So your feature will not work with my IME. I would suggest using http://developer.android.com/intl/de/resources/tutorials/views/hello-autocomplete.html.
Wilken at Stack Overflow Visit the source
Other answers
You can't add additional words to the ones the IME finds internally, however you can whole-sale supply your own completions via InputMethodManager.displayCompletions(): http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#displayCompletions(android.view.View, android.view.inputmethod.CompletionInfo[]) This is what the auto complete text view uses to show its completions in the IME, when the IME is full screen so it can't be seen. Note that your app is still responsible for showing the completions itself, so they will be available to the user if the IME is not full screen. (And sorry about the lack of documentation on that method.)
hackbod
Related Q & A:
- How do I add my keyboard suggestions?Best solution by Stack Overflow
- How can you add or remove people from your top 8 on Myspace?Best solution by Yahoo! Answers
- How do I make words bold on flickr?Best solution by Yahoo! Answers
- I want to add my personal photos. how can i add it.
- How can I get rid of "connection suggestions" on my yahoo homepage?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.