Edit Text in ListActivity ListView loses focus when keyboard comes up

前端 未结 7 1032
挽巷
挽巷 2020-12-03 05:09

I have searched and searched for an answer to this question and everything that looked like an answer has not worked so I guess I will just ask.

I have a couple of <

相关标签:
7条回答
  • 2020-12-03 05:35

    Have you tried after you do adjustResize making sure to reset the focus to the EditText by doing something like EditText.requestFocus(); so that it has focus again and the user doesn't have to tap it again. you can use EditText.isFocused() to see if it is focused (true) or not (false) in a debugging log statement or something as well.

    you might need to set the field to focusable as well using SetFocusable() but be careful because this could potentially take away the focus from the ListView itself and prevent you from being able to scroll or select things later so you will have to play around with the setting focusable and is focused stuff.

    0 讨论(0)
提交回复
热议问题