RecyclerView
RecyclerView
was introduced with Android 5.0 or Lollipop and was included directly in the support library, so it could be used in older versions of Android (we all know that firmware rollout is not always as fast as it should be because it might depend on operators and vendors). In this section, we will use the previous example to replace ListView
with RecyclerView
. We will see that it will take a bit more of code to set this up, but we will also be able to identify, quite clearly, its advantages: its flexibility and the uncoupling feature along with the ability to perform item layouts or item animation, helping us to keep a cleaner code architecture. In addition, RecyclerView
was built with all the performance features we had to implement before in mind. This does not mean we do not have to do anything to implement them, but as we will see, the code is structured in a way that it will force us do to so naturally.
The official Android documentation defines...