Join David Gassner for an in-depth discussion in this video Displaying lists of data, part of Building a Note-Taking App for Android (2013).
In a previous chapter, I described how to create a data source class, and the class…to model the data that you'll be using in your application.…Now its' time to display the data using something called a list activity.…I'm working in a version of the project called List Screen, which has all of the…previous code, and now I'm going to transform the main activity.…That is the first screen that's shown when the app starts into the list activity to…show a list of notes. I'll start in the main activity class.…When you create a new activity by default it extends a class called activity and to…show a list of data. One of the easiest ways is to instead…extend a class called List Activity. So, I'll delete the Activity class from…the Extends class, and instead I'll set it to List Activity.…
I'll type the beginning of the class name and press Ctrl + Space to auto complete…it. Now, I have to follow the rules of the…list activity class. One of the most important rules is that…the layout for a list activity must contain something called a list view.…
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