Working with List Activities

Currently in the routes view, a list of routes, all with the same name, is displayed. You can change this so that touching a route will display a list of trips inside that route. First, you need to create the new trips ListActivity. This activity is similar to the routes ListActivity you created earlier.

1. Create a new Activity in the com.androiddevbook.onyourbike.chapter7.activities package named TripsActivity by using the new Android Activity wizard. Give the new activity the title Trips, and click Finish. Make sure that the activity has been added the Android manifest file:

<activity android:name= "com.androiddevbook.onyourbike.chapter7.activities.TripsActivity"     android:label ...

Get Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.