From the course: Building an Android App with Jetpack Libraries

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Challenge: Support deleting all notes

Challenge: Support deleting all notes - Android Tutorial

From the course: Building an Android App with Jetpack Libraries

Start my 1-month free trial

Challenge: Support deleting all notes

(upbeat music) - [Instructor] So far my application gives the user the ability to select individual notes, and then to delete them. But I also want them to be able to clear out the entire database with one gesture. For this challenge, I'll ask you to add functionality that lets the user do that from the options menu. I've already done it and I'll show you what this looks like. When the user touches the options menu icon, I've added a new item there labeled 'delete all notes.' And when I selected, all the data goes away. Now to prove that that's actually happening, I'll add some more sample data, and then I'll go back to my database inspector window, I'll show the data that's there, and I'll check this option to show live updates. Now, I'll set this up so I can see everything, then I'll go back to the application I'll delete all the notes, and everything disappearing from the database. I will add items and I'll delete them.…

Contents