title: Select All items of a ListView (custom row with checkbox in it)
body: <p><strong>What I have:</strong> I have a ListView with custom rows, having a CheckBox &amp; two TextViews in each row. I have a button for "Select All". </p>
  
  <p><strong>What i want:</strong> I want that when I click the button, all the CheckBox in ListView get checked/unchecked.</p>
  
  <p><strong>What is the problem:</strong> In OnClick of the "Select All" button. i am doing this:</p>
  
  <pre><code>public void OnClickSelectAllButton(View view)
  {
      ListView l = getListView();
      int count = l.getCount();
      for(int i=0; i&lt;count; ++i) 
      {
         ViewGroup row = (ViewGroup)l.getChildAt(i);
         CheckBox check = (CheckBox) row.findViewById(R.id.checkBoxID);
         check.setChecked(true); // true for select all and false for unselect all etc..
      }
  }
  </code></pre>
  
  <p>Here <strong>l.getChildAt(i)</strong> is giving me the visible items only. And when the index goes out of visible items, the problem occurs. I want to check all the CheckBox in List, not just the visible ones.</p>