I'm not implementing an input method, but trying to get the input state in my app. When we use 9-key mode, type 1~9 and there will be some hint. When using default input method in iOS hint will be in the EditText
before you choose any suggest. I wonder whether android can get same effect.
For example, I intend to type "good", so i need to type 4663. First I type 4, the suggest gives me "h" and choices are "hi", "in", "I", "IT" and so on. Then I type 6, the suggest gives me "in" and choices are "in, gmail, iOS" and so on. Then type 6, suggest is "goo", choices are "good, home, honey". At last type 3, suggest is "good" and choices are "good, home, honey".
What I want is to have the hint in the EditText
. If I type "466", I have "goo" in the EditText
.
I browsed InputMethodManager
API and related source code and found nothing. I can only use getInputMethodList()
method to get InputMethodInfo
. But I don't know how to get InputMethodService
use InputMethodInfo
. And also I don't know with which API I can get the suggest from InputMethodService
(I guess I could get it from InputMethodService). Is it possible to do such thing in Android? If not, why?