Question

I use a ExpandableListView in my Android application an want to perfrom an action if the user clicks long on the group element, so I defined a OnLongClickListener in my BaseExpandableListAdapter extention. The listener works as aspected but the child elements does not expand anymore. Any ideas?

 public class ConnectionAdapter extends BaseExpandableListAdapter {
    ...
    public View getGroupView(int groupPosition, boolean isExpanded, View convertView,  
                             ViewGroup parent) {
        // convertView is a LinearLayout
        convertView.setOnLongClickListener(new OnLongClickListener() {
            public boolean onLongClick(View v) {
                // my action here
                return true;
            }
        });
     }
     ...   
 }

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top