how to get Activity's windowToken without view?

后端 未结 7 1093
南方客
南方客 2021-02-01 14:38

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

((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(         


        
相关标签:
7条回答
  • 2021-02-01 15:21

    You can try this on your manifest file activity tag to hide keyboard.

     android:windowSoftInputMode="stateHidden"
    
    0 讨论(0)
提交回复
热议问题