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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -