Komal wrote: > hi all, > i mnew to android. > i want to display list view with image and text in it. > how can i do this. > can anyone help me out of this
If the image is the same for all list entries, you can create your own layout for the row and pass the name of that layout in to your adapter constructor (ArrayAdapter, SimpleCursorAdapter, etc.). If the image varies, with different list entries having different images, then you probably will need to subclass your adapter and override the appropriate method(s) (e.g., getView() for ArrayAdapter) to inflate and return your own rows. I have a series of blog posts on this latter technique: http://androidguys.com/?s=fancy+listviews Most of the posts are for the older M5 SDK and therefore may need slight adjustment to work on the current Android SDK. Also, please forgive the ugly formatting, as the site those posts are hosted on changed CSS stylesheets since the posts were written. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

