What is the difference between ListView and RecyclerView?

Technology CommunityCategory: AndroidWhat is the difference between ListView and RecyclerView?
VietMX Staff asked 3 years ago

For list views to have good performance you’ll need to implement the View Holder pattern, and that’s easy to mess up especially when you want to populate the list with several different kinds of views.

The RecyclerView bakes this pattern in, making it more difficult to mess up. It’s also more flexible, making it easier to handle different layouts, that aren’t straight linear, like a grid.