0

I have a page in my app where the user can see a news feed (mostly images). How do I display these images (Using a LinearLayout maybe?)? And if so, how do I dynamically increase the size of this scrollable layout as I am scrolling down? (To load more images)

Rameez Hussain
  • 6,414
  • 10
  • 56
  • 85

2 Answers2

0

You have to use ListView. From the doc:

A view that shows items in a vertically scrolling list.

you have to provide a ListAdapter to your ListView. Basically the apdater is what fills up the ListView. It is higly customizable. You can simply pass to the adapter your data set or extend the adapter and customize the getView method in order to get the data rapresentation you want.

a tutorial can be found here

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
  • Thanks! Will try it out. I was also just looking at ScrollView too. Is that more suitable for images? – Rameez Hussain Aug 27 '12 at 17:47
  • yes it is the correct way to achive what you want. In order to add images/thumbnail you have to extend the BaseAdapter and override the getView method. Search for some good tutorial over the net – Blackbelt Aug 27 '12 at 17:50
-1

Yes you have to use listview, just add the content and notify the adapter.

Programmer
  • 5,360
  • 10
  • 37
  • 61