RecyclerView vs List <E>


Maybe this will sound like a dumb question, and probably it is, sorry for that but i’m a bit confused.

I just finished the chapter and was wondering about the way it was treated, 'cause in the beginning there’s the stuff about the abstract class and list , then, like something disconnected, the whole RecyclerView thing.

To me, it seems that there are two (and more?) ways to display lists:

  • For fixed (and few) elements, a classic list class
  • For an unpredictable number of elements, RecyclerView

Is that correct? Did i miss something important?

Sorry again for the stupid question and… For my bad english :smiley:

Thanks in advance

Implementations of List<E> just represent collections of objects, and do not display them on the screen. To display anything in Android, you need a View. RecyclerView is a type of View designed specifically for displaying a collection of objects.

In most cases, your RecyclerView.Adapter will use a List internally to store the objects you want to display.