David Guo David Guo - 1 year ago 102
Android Question

how to get Activity's windowToken without view?

Now, I try to hide the softkeyboard when user touch outside the keyboard:

((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE))

I want put the logic in my base activity class, so if it is possible to getWindowToken without View?

Answer Source

Surely you can use:


or you can refer to SO Quest

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download