how to get child value of expandable listview in android?
<p>I want to know how to get the child value of an expandable listview using setonItemclick listener method.
My code is given below but click event is not working properly.</p>

<pre><code>mExpandableListView.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View v, int groupPosition,
                long id) {
            // TODO Auto-generated method stub
            int itemType = ExpandableListView.getPackedPositionType(groupPosition);
            Log.i("item type",""+itemType);
            if ( itemType == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
                  childPosition = ExpandableListView.getPackedPositionChild(id);
                  groupPosition = ExpandableListView.getPackedPositionGroup(id);
                  Log.i("child",""+ childPosition);
                  Log.i("child Group",""+ groupPosition);
              } else if(itemType == ExpandableListView.PACKED_POSITION_TYPE_GROUP) {
                  groupPosition = ExpandableListView.getPackedPositionGroup(id);
                  Log.i("Group",""+ groupPosition);
              } 
        }
    });
</code></pre>
