0

Currently in the app I'm working on as an ongoing project we have a limit of 100 comments per item.

Items can be stuff like forums, journals, and many more stuff. Some of these items are pretty custom and are added to a ScrollView instead of a generic Listview.

Now one client wants to be able to see even more comments since he needs to keep reading for his research.

What would be a good or even a better option could someone advise? What I"m thinking off now are the following.

  1. At the end of our limit, add an "Show all comments" button which loads a simplified listView containing all the comments. This way avatars will be easely hidden when not visible etc.

  2. Pagination, load the next hundred by using pagination.

Mathijs Segers
  • 6,168
  • 9
  • 51
  • 75

1 Answers1

2

You should use a ListView in the first place because the views will get recycled and will not consume all the memory like the scrollView is doing

Alvaro Ardila
  • 382
  • 3
  • 10
  • I know, but we have some items which just can't be displayed as a listview. Where possible I use listviews. – Mathijs Segers Dec 05 '13 at 18:20
  • Are you sure about that? almost everything can be inserted in a listview – Alvaro Ardila Dec 10 '13 at 20:01
  • I'll check then. I must say it is the first time I'm working on it, I'll come back to you when I try. Will it then also be okay to load hundreds of items? We have things in our views which contain large images sometimes. – Mathijs Segers Dec 11 '13 at 08:24
  • Try extending from the BaseAdapter and use different layouts for things [example](http://stackoverflow.com/questions/4777272/android-listview-with-different-layout-for-each-row). – Alvaro Ardila Dec 11 '13 at 16:14