java - How to get token needed for hideSoftInputFromInputMethod(token, flags)? -
so trying make android ime. need ability hide ime ime itself. far have seen examples how show\hide ime activity, need ime. found out inputmethodmanager.hidesoftinputfrominputmethod(token,flags)
, need token, , cant figure out how it. getcurrentinputbinding().getconnectiontoken()
not work - crashes application. ideas?
supposedly, based on responses question in other places (i'm still trying figure out consistently working method myself), token need yourtextview.getwindowtoken().
however, isn't working me, , i've seen many people same complaint.
[edit]
using above-specified token, i'm having better luck hiding keyboard hidesoftinputfromwindow instead of hidesoftinputfrominputmethod. though since didn't grasp difference between these functions begin with, may not understand actual question. sorry!
[/edit]
Comments
Post a Comment