Java – Extensible ListView setOnChildClickListener problem

Extensible ListView setOnChildClickListener problem… here is a solution to the problem.

Extensible ListView setOnChildClickListener problem

I’m developing an application with an extensible ListView and getting display data well in this ListView, but the problem is setOnChildClickListener doesn’t work. There are no interactive widgets (checkboxes or edittex) that cause focus issues, we need to fake focus, no, I only adopted Texview in parent and child lists. I’ve also tried doing all texview focusable as false without success. Can you fix this


mlvInstructionlist = (ExpandableListView)amviInstruction. findViewById(;
        AssetsWiseInstructionListAdapter adapter = new AssetsWiseInstructionListAdapter(getActivity(),mlvInstructionlist, mlstGroupCollection);

    public boolean onChildClick(ExpandableListView parent, View v,
            int groupPosition, int childPosition, long id) {
         TODO Auto-generated method stub

Toast.makeText(getSherlockActivity(), "Child click Header",Toast.LENGTH_LONG).show();
         AppLog.showLogI(TAG, "Child click Header");
        return true;


You can try replacing listView with scrollView. This should fix it or try quoting this article: Focusable EditText inside ListView .

This discusses setting up onClick and focusable for future generations.

Related Problems and Solutions