0

this is probably a repost but I have to do it, because Android versions change so does the code too and because I have already tried every tutorial on the internet. I am trying to make a listview and the child which is going to be multiplicated is a CardView. And I tried too much different code to post, because this taking me already days. So how do I make this with an Adapter? My problem was that it never displayed the content. If you need further information, and you probably do, please comment below. I am very thankful for your help guys!

Michael

  • Any reason you want to use a ListView rather than a RecyclerView? Have a look here: http://stackoverflow.com/questions/34579614/how-to-implement-recyclerview-in-a-fragment-with-tablayout – Daniel Nugent Jul 05 '16 at 20:23
  • Yes because there is going to be provided short and unique information, which would be annoying or strange to see twice or more times –  Jul 05 '16 at 20:28
  • How would using a RecyclerView show things multiple times when a ListView would not? – Daniel Nugent Jul 05 '16 at 20:32
  • Doesn't a RecyclerView show the same content more often? I thought it does and the ListView does only show unique content –  Jul 05 '16 at 20:44
  • Nope, they're both the same in terms of functionality (implementation is different of course). RecyclerView is the replacement for ListView, and it enforces the view holder pattern, so it does a better job of preventing mistakes in the adapter code. For more info, see here: http://stackoverflow.com/questions/28392554/should-we-use-recyclerview-to-replace-listview – Daniel Nugent Jul 05 '16 at 20:48
  • Wow this was very helpful thank you! –  Jul 05 '16 at 21:08

0 Answers0