Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ListView in Fragment

I am trying to create a list of items which contains an image and some description for the image in each individual. After which, the list will be place in a fragment inside the application. Can anyone guide me to create it? I am not too sure how can I do it without the ListActivity.

like image 979
simplified. Avatar asked Jun 28 '11 17:06

simplified.


1 Answers

It seems like your Fragment should subclass ListFragment (not ListActivity). onCreateView() from ListFragment will return a ListView you can then populate.

Here's more information on populating lists from the developer guide: Hello, ListView

like image 133
citizen conn Avatar answered Oct 15 '22 20:10

citizen conn