Android Hide Soft Keyboard from EditText while not losing cursor

前端 未结 14 1915
日久生厌
日久生厌 2020-12-03 04:55

I\'ve come about as far as this which gets me halfway there, but not quite. I have a dialer Fragment that has all the usual Buttons to enter a numb

14条回答
  •  既然无缘
    2020-12-03 05:33

    If your min SDK is 21, you can this method from java code:

    editText.setShowSoftInputOnFocus(false);
    

    Credits to Chen Su article.

提交回复
热议问题