On Sun, Aug 8, 2010 at 8:00 PM, gnugu <[email protected]> wrote: > as I stated in my original post I already have created custom layout > with and ImageView and two TextViews. > > The question at hand is: > How do I populate a ListView, that has a custom list item as defined > above, from XML resource? > > I.e.: Having a custom layout with ImageView and two TextViews, how can > I define the content in XML resource?
If you are using ArrayAdapter, you will need to create a subclass and override getView(): http://stackoverflow.com/questions/3436322/multiple-icons-in-android-listview If you are using SimpleCursorAdapter, you can use a ViewBinder, or subclass the adapter and override setViewImage(), or subclass the adapter and override newView() and bindView(). And so on. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

