Which method of the adapter returns the number of rows?
- countRows()
- size()
- onBindViewHolder()
- getItemCount()
Answer
D) getItemCount()
getItemCount tells RecyclerView how many items exist.
Computer Science MCQ · More Lab: Displaying Data from an API MCQs · Practise