Difference between InputMethodManager SHOW_FORCED and SHOW_IMPLICIT in Android

I would like to know the behavioral difference of the constants SHOW_FORCED and SHOW_IMPLICIT . I tried both, and did not see any difference at first glance.

+6
source share
1 answer

SHOW_FORCED and SHOW_IMPLICIT work in tandem with the hidden methods HIDE_IMPLICIT_ONLY and HIDE_NOT_ALWAYS .

Using SHOW_FORCED means that the user explicitly asked to display the keyboard (for example, by pressing the "open keyboard" button), and thus, the system should make it open. In this case, any existing request to hide the keyboard using the above flags will be ignored (while the keyboard is "forced" open).

Using SHOW_IMPLICIT means that your application believes that the user wants to open the keyboard, but did not explicitly request it. In this case, requests to hide the keyboard using HIDE_IMPLICIT_ONLY or HIDE_NOT_ALWAYS will continue to be honored.

+11
source

All Articles