Ok so i am trying to make a music app and i watched a tutorial saying that i should use a ListView but that video came out in 2015. A collegue told me that a recyclerView would be better
-
1Why not both? You can code both views – Rabbit Guy Jul 20 '17 at 14:46
-
which one of the views would make the coding easier? – Christopher Ghosal Jul 20 '17 at 15:01
-
1Instead of trying to make the coding easier, perhaps you should look at it from a User Experience perspective("which makes my app better to use") – AWinkle Jul 20 '17 at 15:04
2 Answers
If you are looking for simplicity, then I suggest ListView. It has detailed documentation (which can be found at https://developer.android.com/guide/topics/ui/layout/listview.html). It also has easy-to-use setAdapter functions to help you enter your data.
On the other hand, RecyclerView is more complex. It is more powerful and allows you to perform more tasks (such as various layout patterns, described at https://developer.android.com/training/material/lists-cards.html), but its API is more technical than that of ListView's.
If you are just going for displaying a list of songs and possibly subtitles, then I suggest going with the more simple route - ListView.

- 364
- 1
- 10
It is better. RecyclerView
is a ListView
improvement! If you want to know more you can take a look here. Basically it reuses views, delegates common animations. You can also put items in a grid/staggered/linear/whatever layout through LayoutManager
.

- 569
- 5
- 17
-
-
1Not necessarily, but I strongly encourage you to use it. Trust me, it's the correct thing to do. – Samuele Pontremoli Jul 20 '17 at 15:02
-
ok right i did use the recyclerview does this mean i have to use different code compared to the listview – Christopher Ghosal Jul 20 '17 at 15:04
-
Yes, the setup is a bit different. Follow the [official documentation](https://developer.android.com/training/material/lists-cards.html) – Samuele Pontremoli Jul 20 '17 at 15:07
-
This should be the accepted answer: the rule of thumb is to use always RecyclerView instead of ListView. – Diego dos Santos Jul 26 '17 at 16:26