Is ListView completely inferior to RecyclerView?

So Vogella seems to suggest that ListView is completely outdated compared to RecyclerView. And not really not recommended, but rather that there is no situation where a ListView would be a better choice. It's true? The commonsware book suggests that it can be faster when upgraded. Is there another reason to completely avoid ListView from now on? Just by reading some examples, it seems that RecyclerView adds many levels of complexity / convolution to the code, so my desire is to avoid using these unless there is a very good reason (animation is not a good reason)

+7
android android-listview android-recyclerview
source share
2 answers

The RecyclerView engine contains:

  • RecyclerView: ViewGroup or Container
  • LayoutManager: Responsible for layout and layout of elements, there are 3 built-in LayoutManagers, LinearLayoutManager , GridLayoutManager and StaggeredGridLayoutManager.
  • ItemDecoration: custom elements, for example: DividerItemDecoration
  • ItemAnimator: Animating Custom Items

ListView = RecyclerView + LinearLayoutManager (Vertical).

The RecyclerView engine can easily implement ListView, GridView, WaterFall ..., and it can also implement other custom custmom LayoutManager views.

This is why we should use RecyclerView in the future.

+2
source share

I believe that the list will be gradually canceled, but you can always use it. For example, I use listviews in box mockups. since boxes usually don’t have many elements in them, the viewer template doesn’t really apply. Therefore, it is much easier to use.

0
source share

All Articles