I have a custom adpater for an expandable listview. Each child of the expandable listview has multiple items, and I want to set a click listener for each item. 

When I set the clicklistener, it always take two clicks to get the item to perform the task. The first click selects the entire row, then the second click does what it need to do. How do I prevent this? Here is the code:

> 
> myList.setOnChildClickListener(new OnChildClickListener() {
> 
> 
> 

```
                @Override
                public boolean onChildClick(ExpandableListView parent,
                        View v, int groupPosition, int childPosition,
                        long id) {

                    final int grp = groupPosition;
                    final int chdp = childPosition;

                    TextView txt = (TextView) v.findViewWithTag("title");
                    txt.setOnClickListener(new OnClickListener() {

                        @Override
                        public void onClick(View v) {

                            child = myFolderlist.getArray().get(grp)
                                    .get(chdp);
                            goToItem(child, none, all, false);

                        }
                    });

```

I have tried setting the clicklistener in the adapter, but the code I want to run is not accessible from the adapter. I also set the onclick in the layout, but this prevents me from getting the groupPosition and childPosition as is ignores the clicklistener altogether.

Thanks for the help.