Pass User-Selected Data to a Detail Activity in Android SDK


show more Passing user-selected data to a detail activity 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 ...

Passing user-selected data to a detail activity

My sample application so far is using data that's imported from XML and then stored persistently in an SQLite database, and it's now capable of being displayed in either a rich display as we see here or in a pure text display. I'm going to add some new functionality now, and in fact, in the new version of the project--which is named DetailView-- the application now has a detail view. When the user touches or clicks on an item, that results in opening another activity, and right now that activity is populated with dummy data.

I'll show you how I created that detail activity but then go on to the most important part, how to take a data object such as my tour object and prepare it so that it can be passed from one activity to another. First, let's take a look at the elements of this new functionality. In this version of the application, I've added a new layout file called tour_detail.xml. You can find it in the layout folder underneath the resources. This file uses nested Linea...

Passing user-selected data to a detail activity
Video duration: 11m 36s 3h 41m Intermediate

Viewers:

Passing user-selected data to a detail activity 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 ...