The listview has been redrawn. The whole process has been redrawn three times. Clicking the edittext soft keyboard pops up, which causes the listview to be compressed. This is the first time. Too many edittext content and line breaks cause the edittext height to change, which further causes the item height to change. It needs to be redrawn. This is the first time. Second time; redrawing will cause the edittext to lose focus, the soft keyboard is hidden, the listview is expanded, and the third redrawing is performed. So, do you already know the solution? Since it is caused by losing focus, then get the focus again, record the edittext of the last operation, and check it in the adapter's getView method. If it is this edittext, requestFocus.
Scrolling of ListView prompts it to re-LayoutChildren, and finally causes EditText to lose input focus. Since EditText will not adapt to ListView, it is recommended to change to RecyclerView...
p.s. There are few apps in the app market that are designed like this: Put an EditText in ListView...
The listview has been redrawn. The whole process has been redrawn three times. Clicking the edittext soft keyboard pops up, which causes the listview to be compressed. This is the first time. Too many edittext content and line breaks cause the edittext height to change, which further causes the item height to change. It needs to be redrawn. This is the first time. Second time; redrawing will cause the edittext to lose focus, the soft keyboard is hidden, the listview is expanded, and the third redrawing is performed. So, do you already know the solution? Since it is caused by losing focus, then get the focus again, record the edittext of the last operation, and check it in the adapter's getView method. If it is this edittext, requestFocus.
Scrolling of ListView prompts it to re-LayoutChildren, and finally causes EditText to lose input focus.
Since EditText will not adapt to ListView, it is recommended to change to RecyclerView...
p.s. There are few apps in the app market that are designed like this: Put an EditText in ListView...