Closed badoyg closed 4 years ago
In this case the contacts
list has to be modified in memory and then written to the book with the same key. Like so:
contacts.remove(1);
Paper.book().write("contacts", contacts);
People who came with common DB mindset may find this not efficient or weird, but in fact that's way faster and outperforms DBs for common mobile use cases.
How do I delete an item from a book?
For example, I have this code:
List contacts = new ArrayList<>();
contacts.add("one");
contacts.add("two");
contacts.add("three");
How do I delete only "two" from the book afterwards?