When the soft keyboard appears, it makes my EditText field lose focus

后端 未结 11 1795
名媛妹妹
名媛妹妹 2020-12-07 10:19

I\'ve got a few EditText fields in a ListView. When I tap on one of the EditText fields, the keyboard slides into view (as it should), but the EditText field I tapped loses

11条回答
  •  暖寄归人
    2020-12-07 10:50

    You should test this code on a device with hardware keyboard always visible. The behavior may also happen here.

    To avoid this you can have the keyboard always visible.. but that is not very easy as you can see by this thread:

    https://groups.google.com/forum/#!topic/android-developers/FyENeEdmYC0

    Theoretically you may have to create your own Android keyboard (although using as base the stock Android keyboard) as described here: Android: How to make the keypad always visible?

提交回复
热议问题