I'm not sure how to fix the focus problem, but I know why you need to collapse and expand the group to see the text in editText. The list is not updated unless you scroll or do something like expanding and collapsing the list. Therefore, the best way to solve this problem is to create a list of strings that will be the editTexts values ββin the listview. Then create an onKeyClick () listener for each of the editTexts and do the following:
editText1.setOnKeyListener(new EditText.OnKeyListener() { public boolean onKey(View editText, int keyCode, KeyEvent keyEvent) {
What happens here is that you get the editText value after pressing the key and change the value of the line in the list to a new value. Then you tell the adapter that the value of one of the elements has changed, and it should be updated. Although this is not an effective way to fix the problem, it is a backup solution if you cannot come up with a better way.
source share