private void selectAll() {
   for (int i = 0; i < adapter.getCount(); ++i) {
     adapter.select(i);
   }
 }
 private void selectAll() {
   for (int i = 0; i < adapter.getCount(); ++i) {
     adapter.setItemChecked(i, true);
   }
 }