@Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (resultCode == RESULT_OK && requestCode == 1) {
     allContactsList = data.getParcelableArrayListExtra("SELECTED_CONTACTS_LIST");
     selectedList.clear();
     for (Contact contact : allContactsList) {
       if (contact.isSelected()) {
         selectedList.add(contact);
       }
     }
     for (Contact contact : allContactsList) {
       Log.d(TAG, "inside gotoAllContactList " + contact.isSelected());
     }
     contactListViewAdapter.updateList(selectedList);
     contactListViewAdapter.notifyDataSetChanged();
   }
 }
 public void goToAllContactList(View v) {
   for (Contact contact : allContactsList) {
     Log.d(TAG, "inside gotoAllContactList " + contact.isSelected());
   }
   Intent intent = new Intent(this, AllFriendsList.class);
   intent.putParcelableArrayListExtra("FRIENDS_LIST", (ArrayList<Contact>) allContactsList);
   startActivityForResult(intent, 1);
 }