Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the RecylerView Adapter responsible for? Select each of the following true statements:

  1. Creating a ViewHolder object for each RecylerView item.
  2. Caching the views associated with each item.
  3. Returning the number of item in the data source.
  4. Binding data from the data source to each item.
  5. Recycling item so they can be used again.
  6. Inflating each item view that will be display.

This is question from udacity and I am unable to answer it. According to my learning it's 1,4,5,6 but it's wrong. Actual question is here you can try it. Question

like image 806
Umer Avatar asked Feb 20 '17 07:02

Umer


People also ask

What does RecyclerView adapter do?

RecyclerView. Adapter base class for presenting paged data from PagingData s in a RecyclerView . Adapters provide a binding from an app-specific data set to views that are displayed within a RecyclerView . A class that extends ViewHolder that will be used by the adapter.

What is the adapter responsible for?

The Adapter provides access to the data items. The Adapter is also responsible for making a View for each item in the data set. See also: ArrayAdapter.

Which of the following statements about a RecyclerView is false?

QUESTION 1 - The answer is You don't need a layout manager with a RecyclerView to handle the hierarchy and layout of View elements. This is false.

What is the main function of the RecyclerView Mcq?

It displays items in a list or a grid. It scrolls vertically or horizontally. It scrolls diagonally on larger devices, such as tablets. It allows custom layouts when a list or a grid is not enough for the use case.


1 Answers

The adapter of recylerview is reposible for

  1. Creating a ViewHolder object for each RecylerView item.
  2. Returning the number of item in the data source.
  3. Binding data from the data source to each item.
  4. Inflating each item view that will be display.

You can check from the link here

like image 61
Muhammad Younas Avatar answered Oct 28 '22 01:10

Muhammad Younas