javaandroidexpandablelistadapter

How to avoid getChildView in ExpandableListView getting called when clicking on done in keypad


I have Edittext in one of the child in ExpandableListView. In EditText when clicking on done button in keypad, getChildView is getting called automatically.How to avoid that. Also I want to know why getChildView is getting called unnecessarily.Anybody help me to find out.


Solution

  • My guess would be that the event: KeyEvent.KEYCODE_ENTER is sent to your ExpandableListView, in that case, calling getChildView is pretty normal.

    If you want to avoid that just overwrite the listener or make ExpandableListView lose focus.