Join David Gassner for an in-depth discussion in this video Deleting a note, part of Building a Note-Taking App for Android.
- I'm now going to add code to delete a single note.…I already have code in the "MainActivity" class…that lets me delete all notes using the content provider,…but I need to add code for a single note…in the "EditorActivity".…First, I need to add something to the menu,…so the user can trigger the delete operation.…Earlier in the course, I added this icon to the project.…It has an id of "ic_action_delete",…and it's a white trash can.…I want to display that trash can icon on the toolbar,…when the user goes into an existing note,…but I don't want to display it when they open a new note.…
So I'll start in this file, "menu_editor.xml".…If you don't already have it open, you can find it in the…"menu" subfolder under resources.…I'll reformat the code and make it…a little bit easier to read.…When I created this activity, this menu file…was created automatically,…and a settings menu item was added.…I don't need that menu item in this activity,…so I'll just reuse this menu item,…and I'll name the action, "action_delete".…
Building a Note-Taking App for iOS 8 and Building a Note-Taking App for Windows Phone 8 and Windows Store use the same assets to develop a similar app. Compare and contrast the steps and discover the similarities and differences between the three platforms.
- Understanding Android UI and data management patterns
- Creating an Android Studio project
- Customizing material design theme colors
- Defining an SQLite database structure
- Managing data with ContentProvider and Loader classes
- Retrieving and displaying data
- Customizing data display with a CursorAdapter
- Creating, updating, and deleting notes
- Preparing the app for deployment