Hey Mark, Thanks for the explanation. Most helpful. I now understand that one can have any view to render a row by overriding the getView() method.
My original question though still stays. If given a "resource id" for a view, how can one create multiple instances of that view? Can I simply call findViewById() multiple times to get different instances or do they return the same copy of the View object? Thanks, DS. PS: Looking forward to your tutorial - DS On Jul 1, 2008, at 1:30 PM, Mark Murphy wrote: > >> My understanding of the documentation is that to give a custom look >> to >> ListActivity, one needs to provide a template View (through >> setContentView) that contains a ListView object with the ID "list". >> ListActivity then proceeds to use this template for all the rows it >> displays. > > Close. There are actually two layouts you provide: one for the > activity, > and one for the rows. > > The one for the activity needs to have a ListView with the > android:id of > "list". You connect this layout to the activity via > setContentView(), like > you would for any other activity. > > The constructor of the Adapter you use with your ListView will take > the > R.layout name of a second layout, this one for the rows. > > You are also welcome to override getView() on the Adapter, which will > ignore the second layout and allow you to construct the rows by > whatever > means you see fit (manual constructors, ViewInflate, etc.). > > Later this month, I'll be writing up a tutorial on AndroidGuys about > all > this. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > _The Busy Coder's Guide to Android Development_ -- Available Now! > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---