I would like to know the behavioral difference of the constants SHOW_FORCED
andSHOW_IMPLICIT
. I tried both and couldn't see any difference in the first look.
Difference between InputMethodManager SHOW_FORCED and SHOW_IMPLICIT in Android
Asked Answered
SHOW_FORCED
and SHOW_IMPLICIT
work in tandem with the hiding methods HIDE_IMPLICIT_ONLY
and HIDE_NOT_ALWAYS
.
Using SHOW_FORCED
indicates that the user has explicitly requested that the keyboard be shown (such as by pressing an "open keyboard" button), and thus the system should force it to open. In this case, any existing request to hide the keyboard using the above flags will be ignored (thus the keyboard is "forced" open).
Using SHOW_IMPLICIT
means that your app thinks the user wants the keyboard open, but hasn't explicitly requested it. In this case, requests to hide the keyboard with HIDE_IMPLICIT_ONLY
or HIDE_NOT_ALWAYS
will still be respected.
© 2022 - 2024 — McMap. All rights reserved.