Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. private void deletePerson(final oPerson person) {
  2. oPersonList.remove(person);
  3. personsAdapter.notifyDataSetChanged();
  4.  
  5. Toast toast = Toast.makeText(getApplicationContext(), "Press the
  6. trashcan for confirm.", Toast.LENGTH_LONG);
  7. toast.show();
  8.  
  9. //DELETE A PERSON FOREVER DATABSE
  10. deletePersonIcon.setOnClickListener(new View.OnClickListener() {
  11. @Override
  12. public void onClick(View v) {
  13. plannerRepository.deletePerson(person);
  14. Toast toast = Toast.makeText(getApplicationContext(),
  15. "Deleted.", Toast.LENGTH_LONG);
  16. toast.show();
  17. }
  18. });
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement