Now, I try to hide the softkeyboard when user touch outside the keyboard:
((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(editView.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
I want put the logic in my base activity class, so if it is possible to getWindowToken without View?
Surely you can use:
getContentView().getWindowToken()
or you can refer to SO Quest
1.4m articles
1.4m replys
5 comments
57.0k users