RecyclerView vs. ListView

前端 未结 16 2050
名媛妹妹
名媛妹妹 2020-11-22 06:07

From android developer (Creating Lists and Cards):

The RecyclerView widget is a more advanced and flexible version of ListView.

<
16条回答
  •  佛祖请我去吃肉
    2020-11-22 06:10

    For list views to have good performance you'll need to implement the 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.

提交回复
热议问题