Edittext soft keyboard in Android listview automatically switches to Chinese keyboard

When I was making an Edittext custom input box placed in the listview before, because my input box was set with setRawInputType(EditorInfo.TYPE_CLASS_NUMBER), then when switching the focus of the input box, there would be a problem that the Chinese keyboard first, and then the numeric keyboard .

The main reason is that the notifyDataSetChanged() method of the adapter is called in the method. During the UI refresh process of the listview, the page will lose focus, and the soft keyboard will return to the Chinese keyboard, and then enter the setRawInputType method, so the above situation will occur. My solution here is to write a method to loop through all the sub-items of the listview and update the data one by one.

Guess you like

Origin blog.csdn.net/QhappyfishQ/article/details/126837496