Switch and adapt copied code (last commit) to go into the ContactsFragment class. Does not work.