• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Create a scrollable list layout

Kumidan

Newbie
One of my activities receives some data.
I want to obtain a layout like the one for the "contacts" app, which has 1 contact on each row and clicking a row you pass to another activity which shows the details.

What do I need to create the "list" layout?
Are those rows simply TextViews or what else?
How do I generate the rows at runtime into the layout?

If it is too long to write down some code, just tell me what I need and I'll check by myself.
 
You will need two activities. a list activity and a detail activity

The simplest way should be to use a ListActivity. The link gives example code and layout.

Once the user clicks a row in the list, the ListActivity's onListItemClick() method is called. This is where you send an Intent to a second activity that then displays the details of the selected row.
 
Back
Top Bottom