Join David Gassner for an in-depth discussion in this video Creating a new note, part of Building a Note-Taking App for Android (2013).
In our application, I've created two screens and added an action bar item that…allows the user to say they want to create a new note.…Right now though, the Action Bar icon doesn't do anything.…Now I'm going to add functionality so that when the user touches the Action Bar add…icon, a new note object is created in memory.…And then the screen changes to the editor screen.…The user will then be able to touch the Back button on the device or a Back button…that's a part of the application to return to the list screen.…
I'm working in a version of the application called create note that…continues from the last exercise and I'll start in the main activity class.…When the user selects an item in the Action Bar or in the Options menu, which…we're not using right now, it triggers a method called on options item selected.…I need to create an override of that method in my class so I'll move the cursor…to after the existing code and I'll start typing the name of the method,…onoptionsitem. Then I'll press Ctrl + Space and select…
Like its companions, this course will take you through building a complete mobile app from scratch; but this installment uses the Android SDK and Java to get the job done. Author David Gassner shows you how to install the SDK and the Android Developer Toolkit, create a project, save data on a device, build and control screen layouts, and create action bars and icons that control navigation.
These three related courses will use the same assets to develop the same app. (See Building a Note-Taking App for iOS and Building a Note-Taking App for Windows Phone 8 and Windows Store for more information.) Compare and contrast the different steps and discover the similarities and differences!
- Previewing the note-taking app
- Creating virtual devices for testing
- Unique concepts in Android
- Creating the Eclipse project
- Using local data storage
- Adding and retrieving data with the Shared Preferences API
- Creating screen designs
- Creating and editing notes
- Supporting older versions of Android with ActionBarSherlock