title: android multichoice listview error Exception
body: <p>for choosing favorite contact ,i load all contact inside a list view and declare my adapter like below :</p>
  
  <pre><code>ArrayAdapter&lt;String&gt; cnct_List_Adapter =new ArrayAdapter&lt;String&gt;(getActivity(),android.R.layout.simple_list_item_multiple_choice,info);
  </code></pre>
  
  <p>and for show result i use this codes :</p>
  
  <pre><code>            try 
              {
                  SparseBooleanArray a = LvPopupContacts.getCheckedItemPositions();
                  String my_sel_items="";
                  for(int i = 0; i &lt; LvPopupContacts.getCount() ; i++)
                  {
                      if (a.valueAt(i))
                      {
                       /*
                          Long val = lView.getAdapter().getItemId(a.keyAt(i));
                          Log.v("MyData", "index=" + val.toString()
                               + "item value="+lView.getAdapter().getItem(i));
                          list.add(lView.getAdapter().getItemId((a.keyAt(i))));
                       */
  
                          my_sel_items = my_sel_items + "," 
                              + (String) LvPopupContacts.getAdapter().getItem(i);
                      }
                  }
                  Toast.makeText(getActivity(),String.valueOf(a.size()), 0).show();
                  Log.v("Contacts :" ,my_sel_items);
              } catch (Exception e) {
                     Log.v("e Error" ,e.toString());
              }
  </code></pre>
  
  <p>now , when i use this in <code>emulator</code> it work <code>rightly</code> , but when it test in <code>Device</code> return <code>e Exception</code></p>
  
  <pre><code>Exception: java.lang.ArrayindexOutOfBoundsException length=13;index=13
  </code></pre>
  
  <p><strong>remember , my Device have about 220 concacts.</strong></p>