title: ListView.getCheckedItemPositions not able to return checked Items in SparseBooleanArray
body: <p>I m trying to read the contacts in a list with multiple <code>checkboxes</code>, but when i call the <code>sparsebooleanarray</code>..it just return false for all the list entries,..even for the one s checked ...I looked into this thread <a href="https://stackoverflow.com/questions/3996938/why-is-listview-getcheckeditempositions-not-returning-correct-values">Why is ListView.getCheckedItemPositions() not returning correct values?</a> ...But when i implement the addClickHandlerToCheckBox it force stops..this has been bugging me for 4 days..please any help..</p>
  
  <pre><code> public void populateContactList() {
      // Build adapter with contact entries
      final Cursor cursor = getContacts();
      String[] fields = new String[] {
              ContactsContract.Data.DISPLAY_NAME
      };
  
      SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.contact_entry, cursor,
              fields, new int[] {R.id.contactEntryText});
      mContactList.setAdapter(adapter);
      mContactList.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
  
  
  
      proceedButton.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
  
  
              SparseBooleanArray checked=mContactList.getCheckedItemPositions();
  
              int len = mContactList.getCount();
  
  
              for(int i=0;i&lt;len;i++)
             {
  
                  if(checked.get(i)==true)
                  {
  
                      String item =  mContactList.getAdapter().getItem(checked.keyAt(i)).toString();
                      edt.append(","+item);
  
                  }
  
  
              }
          }
  
  
  
      });                 
  }
  </code></pre>