December 2013
Beginner
416 pages
12h 45m
English
Now that you can display the trips that belong to a route, you want to display the appropriate trip inside Google Maps. First, you need to extend TripsActivity so that when users select a trip, the MapsActivity is displayed.
1. Open the TripsActivity class in the com.androiddevbook.onyourbike.chapter7.activities package. Override the method named onListItemClick. The easy way to do this is to right-click Source > Override > Implement Methods, check the onListItemClick method, and click OK:
@Override protected void onListItemClick(ListView listView, View view, int position, long id) {}
2. Inside the onListItemClick method, obtain the selected trip and call the parent ...
Read now
Unlock full access