title: Expandable list view only one child is showing
body: <p>I have a expandable list view also am passing parent items and child items via arraylist..I can see only the first parent child..by clicking other items nothing happens</p>
  
  <p>The activity and expandable list view adapter codes are given below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> expandableList = (ExpandableListView) findViewById(R.id.exlist);
    
    expandableList.setDividerHeight(2);
    expandableList.setGroupIndicator(null);
    expandableList.setClickable(true);
  
    setGroupParents();
    setChildData();
  
    MyExpandableAdapter exadapter = new MyExpandableAdapter(data);
    
    exadapter.setInflater((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE), this);
    expandableList.setAdapter(exadapter);
  //  expandableList.setOnChildClickListener(this);
    expandableList.setOnChildClickListener(new OnChildClickListener() {
     
     @Override
     public boolean onChildClick(ExpandableListView parent, View v,
       int groupPosition, int childPosition, long id) {
      // TODO Auto-generated method stub
      return false;
     }
    });</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.javacodegeeks.android.loginapp;
  
  import java.util.ArrayList;
  
  import android.app.Activity;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.ViewGroup;
  import android.widget.BaseExpandableListAdapter;
  import android.widget.CheckedTextView;
  import android.widget.TextView;
  import android.widget.Toast;
  
  
  public class MyExpandableAdapter extends BaseExpandableListAdapter {
  
   private Activity activity;
   private ArrayList&lt;Object&gt; childtems;
   private String parent;
   private LayoutInflater inflater;
   private ArrayList&lt;String&gt; parentItems;
   ArrayList&lt;ObjectModelClass&gt; data;
   ArrayList&lt;ArrayList&lt;String&gt;&gt; nodes = new ArrayList&lt;ArrayList&lt;String&gt;&gt;();
  
   ArrayList&lt;String&gt; childs=new ArrayList&lt;String&gt;();
   public MyExpandableAdapter(ArrayList&lt;String&gt; parents, ArrayList&lt;Object&gt; childern) {
    this.parentItems = parents;
    this.childtems = childern;
   }
  
   public MyExpandableAdapter(ArrayList&lt;ObjectModelClass&gt; data) {
    
    this.data=data;
    
    
   }
  
   public void setInflater(LayoutInflater inflater, Activity activity) {
    this.inflater = inflater;
    this.activity = activity;
   }
  
   
   
   @Override
   public View getChildView(int groupPosition, final int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
    
    String child = (String) getChild(groupPosition, childPosition);
    ChildViewHolder childHolder;
    
    if (convertView == null) {
     childHolder = new ChildViewHolder();
     convertView = inflater.inflate(R.layout.group, null);
     childHolder.textView = (TextView) convertView.findViewById(R.id.title);
     childHolder.textPrice = (TextView) convertView.findViewById(R.id.price);
     convertView.setTag(childHolder);
    }
    else
    {
     childHolder = (ChildViewHolder) convertView.getTag();
    }
    
    
    childHolder.textView.setText(child);
    
    
    
    return convertView;
   }
   
   private static class ChildViewHolder
   {
    TextView textView;
    TextView textPrice;
   }
   @Override
   public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
    
    if (convertView == null) {
     convertView = inflater.inflate(R.layout.row_ex, null);
    }
    
    ((CheckedTextView) convertView).setText(data.get(groupPosition).getTitle());
    ((CheckedTextView) convertView).setChecked(isExpanded);
    
    return convertView;
   }
  
   @Override
   public Object getChild(int groupPosition, int childPosition) {
    return data.get(groupPosition).getChildren().get(childPosition);
   }
  
   @Override
   public long getChildId(int groupPosition, int childPosition) {
    return 0;
   }
  
   
   @Override
   public int getChildrenCount(int groupPosition) {
    System.out.println(groupPosition);
    return data.get(groupPosition).getChildren().size();
   }
  
   @Override
   public Object getGroup(int groupPosition) {
    return data.get(groupPosition);
   }
  
   @Override
   public int getGroupCount() {
    return data.size();
   }
  
  
  
   
   
   
  
   @Override
   public boolean hasStableIds() {
    return false;
   }
  
   @Override
   public boolean isChildSelectable(int groupPosition, int childPosition) {
    return false;
   }
  
   @Override
   public long getGroupId(int groupPosition) {
    // TODO Auto-generated method stub
    return 0;
   }
  
  }</code></pre>
  </div>
  </div>
  </p>