Join David Gassner for an in-depth discussion in this video Updating an existing note, part of Building a Note-Taking App for Android.
Next I'll add code to update an existing note.…When the user selects an item from the list,…I'm going to display the text of the selected note…in the editor activity.…The user will then be able to make changes…and go back to the main activity,…and the changes will be saved to the SQL-like database…and immediately displayed in the list.…I'm working in the project update note now,…and I'll start in the NotesProvider class.…In this class's query method, I'm currently returning…all rows from the database table.…
It's up to the user interface to pass in a selection value,…but right now that's always null,…and the result is returning everything.…But if the user selects a particular item from the list,…that's going to result eventfully in passing in a uri…that has the primary key value of the selected row.…I'll extract that numeric value from the uri…and build an SQL WHERE clause, a filter,…and then only return the one selected row.…To do that, I'll add code here.…I'll create a conditional block, an if statement,…and I'll use the uriMatcher object.…
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