0

I wanted to create a fragment for my activity that displays a newsfeed in a similar way that facebooks app does. Except, the news will only be messages surrounded by custom graphics.

I thought about using ListFragment and try that every item of the list looks like the message I am intending to display, but I don't know if it is the best approach.

What would be the best design choice (i.e., which classes to use) to achieve this goal?

Thanks in advance.

mendus
  • 65
  • 6

1 Answers1

1

You can create a list of Cards. You can receive a big help from the Android developer training material:

This section is about creating Cards Lists. https://developer.android.com/training/material/lists-cards.html

JoaoBiriba
  • 2,381
  • 19
  • 26
  • Thanks, it looks like a good choice. A related question: Does a ViewHolder necessarily have to be the adapters parameter or is it posible to make the strings, and give a way to construct views using the strings? – mendus Apr 06 '15 at 16:42
  • If you need complex data items ( more then one view per item ) it's better to use a ViewHolder. http://stackoverflow.com/questions/19289812/findviewbyid-vs-view-holder-pattern-in-listview-adapter – JoaoBiriba Apr 06 '15 at 17:40