How to Filter and Sort Data in Android SDK


show more Filtering and sorting data provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage show less
please wait ...

Filtering and sorting data

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 ...

Filtering and sorting data
Video duration: 9m 27s 3h 41m Intermediate

Viewers:

Filtering and sorting data provides you with in-depth training on Developer. Taught by David Gassner as part of the Android SDK: Local Data Storage

Subject:
Developer
Software:
Android Java
Author:
please wait ...