Câu hỏi phỏng vấn Android
Câu hỏi

What is the difference between ListView and RecyclerView ?

Câu trả lời

Here is a comparison of ListView and RecyclerView in Android:

ListView

  • Older view for displaying scrollable lists of items
  • Requires implementing an Adapter to provide the data for each list item
  • Adapter needs to implement getView() to return a View for each position
  • Reuses views that scroll off screen to improve performance
  • Requires manually managing view recycling and reuse
  • Limited to vertical scrolling only

RecyclerView

  • Newer, more flexible and powerful list view
  • Requires implementing an Adapter to provide the data for each list item
  • Adapter needs to implem...
middle

middle

Gợi ý câu hỏi phỏng vấn

senior

How do you handle Bitmaps in Android as it takes too much memory?

middle

When to use Android's ArrayMap instead of a HashMap ?

entry

What is an Activity ?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào