title: Collapsing/expanding expandable list view changes the toggle of random child in checkedtextview
body: <p>I am able to implement checkedtextview in expandablelistview. But when I check certain child item , some child item of other parent gets selected as well . I am unable to figure out why am I facing such problem? Any one faced similar situation ? Thanks for help in advance.</p>
  
  <p>EDIT : </p>
  
  <p>As suggested I created boolean multidimensional array in customadapter:       `</p>
  
  <pre><code>Boolean[][] categoryx = new Boolean` [5][5];
  </code></pre>
  
  <p>There is getchildView method in custom adapter :</p>
  
  <pre><code> @Override
        public View getChildView(int groupPosition, final int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {
            System.out.print(groupPosition);
            System.out.println(childPosition);
          final String children = (String) getChild(groupPosition, childPosition);
          CheckedTextView text = null;
          if (convertView == null) {
            convertView = inflater.inflate(R.layout.listrow_details, null);
          }
          text = (CheckedTextView) convertView.findViewById(R.id.detail_textView1);
          text.setText(children);
  
          convertView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
  
                ((CheckedTextView )v).toggle();
            }
          });
          return convertView;
        }
  </code></pre>
  
  <p>But I am confused in which method should I toggle my values using accessed childposition.</p>
  
  <p>EDIT 2 : My custom adapter where I am trying to save state :</p>
  
  <pre><code>import android.app.Activity;
  import android.util.SparseArray;
  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 MyCategoryAdapter extends BaseExpandableListAdapter {
  
        private SparseArray&lt;Groupx&gt; groups;
        public LayoutInflater inflater;
        public Activity activity;
        Boolean[][] categoryx = new Boolean [5][5];
  
        public MyCategoryAdapter(Activity act, SparseArray&lt;Groupx&gt; groups) {
          activity = act;
          this.groups = groups;
          inflater = act.getLayoutInflater();
        }
  
        @Override
        public Object getChild(int groupPosition, int childPosition) {
          return groups.get(groupPosition).children.get(childPosition);
        }
  
        @Override
        public long getChildId(int groupPosition, int childPosition) {
          return 0;
        }
  
        @Override
        public View getChildView(int groupPosition, final int childPosition,
            boolean isLastChild, View convertView, ViewGroup parent) {
            System.out.print(groupPosition);
            System.out.println(childPosition);
          final String children = (String) getChild(groupPosition, childPosition);
          CheckedTextView text = null;
          if (convertView == null) {
            convertView = inflater.inflate(R.layout.listrow_details, null);
          }
          text = (CheckedTextView) convertView.findViewById(R.id.detail_textView1);
          text.setText(children);
  
          convertView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                //Integer lol = (Integer) v.getTag();
                ((CheckedTextView )v).toggle();
            }
          });
          return convertView;
        }
  
        @Override
        public int getChildrenCount(int groupPosition) {
          return groups.get(groupPosition).children.size();
        }
  
        @Override
        public Object getGroup(int groupPosition) {
          return groups.get(groupPosition);
        }
  
        @Override
        public int getGroupCount() {
          return groups.size();
        }
  
        @Override
        public void onGroupCollapsed(int groupPosition) {
          super.onGroupCollapsed(groupPosition);
        }
  
        @Override
        public void onGroupExpanded(int groupPosition) {
          super.onGroupExpanded(groupPosition);
        }
  
        @Override
        public long getGroupId(int groupPosition) {
          return 0;
        }
  
        @Override
        public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
          if (convertView == null) {
            convertView = inflater.inflate(R.layout.listrow_group, null);
          }
          Groupx group = (Groupx) getGroup(groupPosition);
          ((CheckedTextView) convertView).setText(group.stringx.toString());
          ((CheckedTextView) convertView).setChecked(isExpanded);
          return convertView;
        }
  
        @Override
        public boolean hasStableIds() {
          return false;
        }
  
        @Override
        public boolean isChildSelectable(int groupPosition, int childPosition) {
          return false;
        }
      } 
  </code></pre>