Join David Gassner for an in-depth discussion in this video Filtering and sorting data, part of Android SDK: Local Data Storage.
So far in my sample application, I'm always showing all tours in my data set,…but I'd like to be able to filter the data.…So I've added a few features to this version of the project named Filter and Sort.…I'll run the application in the emulator and show you the User Interface changes.…Just as before, I'm displaying all the data in the List activity, but now I've…added three items to the Action Bar.…They're labeled All, Cheap, and Fancy. I'll show you where I've set those up.…
I'll go the menu which is named activity_main.xml in the menu subfolder under resources.…This is where the menu items are defined.…There's one for All tours, one for Cheap tours, and one for Fancy tours.…And because their showAsAction attribute is set to always, they're showing up in the action bar.…I've kept the strings very short so that they'll fit even on a very small device.…But in your testing, you should take a look at your target devices and determine…whether you can use the action bar in this way.…
I've also added code to the MainActivity.java class to listen for the event that…
- Exploring local data storage options
- Creating an Android virtual device
- Starting a new project
- Defining preferences with Java and activities
- Creating and reading JSON and XML data files
- Creating a new SQLite database
- Inserting and retrieving data in the database
Skill Level Intermediate
1. Getting Started
2. Using Application Preferences
3. Using Internal and External File Storage
4. Working with SQLite Databases
5. Managing and Displaying SQLite Data
Improving the data display9m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.