title: How to get checked items data and count from ExpandableListView
body: <p>I want to show the count and all the data when clicked. But so far in testing using click on the Parent item</p>
  
  <p>I tried increment <code>checkedCount</code> when check. But it show only checked count in in one group child elemements.</p>
  
  <p><strong>My Adapter:</strong></p>
  
  <pre><code>public class RubExpandAdapter extends BaseExpandableListAdapter {
  
  private Context context;
  private List&lt;RubricsModel&gt; rubrics;
  private List&lt;VacancyModel&gt; listForRubricListView;
  private List&lt;VacancyModel&gt; listForSubRubricListView;
  private HashMap&lt;Integer, boolean[]&gt; mChildCheckStates;
  public static int rubricPage = 1;
  public static int rubricId;
  public static int subRubricPage = 1;
  public static int subRubricId;
  int checkedCount;
  FragmentManager fm;
  
  public RubExpandAdapter(Context context, ArrayList&lt;RubricsModel&gt; rubrics, FragmentManager fragmentManager) {
      this.context = context;
      this.rubrics = rubrics;
      fm = fragmentManager;
      listForRubricListView = new ArrayList&lt;&gt;();
      mChildCheckStates = new HashMap&lt;&gt;();
  }
  
  @Override
  public Object getChild(int groupPosition, int childPosition) {
      ArrayList&lt;SubRubricsModel&gt; chList = rubrics.get(groupPosition)
              .getItems();
      return chList.get(childPosition);
  }
  
  @Override
  public long getChildId(int groupPosition, int childPosition) {
      return childPosition;
  }
  
  @Override
  public View getChildView(int groupPosition, int childPosition,
                           boolean isLastChild, View convertView, ViewGroup parent) {
      final int mGroupPosition = groupPosition;
      final int mChildPosition = childPosition;
      SubRubricsModel subRubricsModel = (SubRubricsModel) getChild(groupPosition,
              childPosition);
      if (convertView == null) {
          LayoutInflater infalInflater = (LayoutInflater) context
                  .getSystemService(context.LAYOUT_INFLATER_SERVICE);
          convertView = infalInflater.inflate(R.layout.rubrics_child_row_layout, null);
      }
      final CheckBox checkBox = (CheckBox) convertView.findViewById(R.id.checkBox);
      TextView tv = (TextView) convertView.findViewById(R.id.tvsubrubricsfr);
      tv.setText(subRubricsModel.getSubRubricName());
  
      convertView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              checkBox.setChecked(!checkBox.isChecked());
          }
      });
  
      checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
          @Override
          public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
  
              if (isChecked) {
                  boolean getChecked[] = mChildCheckStates.get(mGroupPosition);
                  getChecked[mChildPosition] = isChecked;
                  mChildCheckStates.put(mGroupPosition, getChecked);
              } else {
                  boolean getChecked[] = mChildCheckStates.get(mGroupPosition);
                  getChecked[mChildPosition] = isChecked;
                  mChildCheckStates.put(mGroupPosition, getChecked);
  
              }
  
              for (int i = 0; i &lt; mChildCheckStates.size(); i++){
                  if (mChildCheckStates.containsValue(true)){
                      checkedCount ++;
                  }
              }
  
          }
      });
  
      if (mChildCheckStates.containsKey(mGroupPosition)) {
          boolean getChecked[] = mChildCheckStates.get(mGroupPosition);
          checkBox.setChecked(getChecked[mChildPosition]);
  
      } else {
          boolean getChecked[] = new boolean[getChildrenCount(mGroupPosition)];
  
          mChildCheckStates.put(mGroupPosition, getChecked);
  
          checkBox.setChecked(false);
      }
  
      return convertView;
  }
  
  @Override
  public int getChildrenCount(int groupPosition) {
      ArrayList&lt;SubRubricsModel&gt; chList = rubrics.get(groupPosition)
              .getItems();
  
      return chList.size();
  }
  
  @Override
  public Object getGroup(int groupPosition) {
      return rubrics.get(groupPosition);
  }
  
  @Override
  public int getGroupCount() {
      return rubrics.size();
  }
  
  @Override
  public long getGroupId(int groupPosition) {
      return groupPosition;
  }
  
  @Override
  public View getGroupView(int groupPosition, boolean isExpanded,
                           View convertView, ViewGroup parent) {
      final RubricsModel rubricsModel = (RubricsModel) getGroup(groupPosition);
      if (convertView == null) {
          LayoutInflater inf = (LayoutInflater) context
                  .getSystemService(context.LAYOUT_INFLATER_SERVICE);
          convertView = inf.inflate(R.layout.rubrics_group_row_layout, null);
      }
      TextView tv = (TextView) convertView.findViewById(R.id.tvrubricsfr);
      tv.setText(rubricsModel.getRubricName());
      ImageView indicator = (ImageView) convertView.findViewById(R.id.ivGroupIndicator);
  
      if (isExpanded) {
          indicator.setImageResource(R.drawable.arrow_down);
  
      } else {
          indicator.setImageResource(R.drawable.arrow_right);
      }
  
      tv.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  //                RubFragment.searchByRubrics = true;
  //                rubricId = rubricsModel.getRubricID();
  //                searchByRubric(String.valueOf(rubricId));
              Toast.makeText(context, String.valueOf(mChildCheckStates.size()), Toast.LENGTH_SHORT).show();
  
          }
      });
      return convertView;
  }
  }
  </code></pre>
  
  <p>how to do, tell me, pls?</p>