Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

The University of Lahore, CS&IT Department

Mobile Application Development

Assignment-2
Start-Date 23-04-2021 Section-A Total Marks 10

Due-Date 27-04-2021 Program: BSCS

Answer the following statements

1. How do you write the difference between Customer Adapter and RecyclerView?
Answer
Coustomer adapter is a good old widget that has been included in the Android
SDK since API 1. Until Android Lollipop’s release, we mostly used this one and it
wasn’t that bad – the API is mostly intuitive. Unfortunately, it allows us to create
just the vertical-scrolling list of elements and, to make that list scrolling go
smoothly, we have to remember to do it properly. While Nowadays we use the
Recycler View. As I’ve mentioned, it was introduced with the Android Lollipop and
it proved to be a game-changer. A lot of things that we hate in the List View were
fixed or changed in the Recycler View. It’s more efficient by default, the layout is
separated and we have more possibilities over the data set inside the adapter.

2. How Customer Adapter function getView() implemented in RecyclerView()?


3. How inflater class inflate List items in Recycler View?
4. What is the purpose of recyclerAdapter.recyclerHolder onCreateViewHolder,
onBindViewHolder?
5. What is the purpose of RecylerView.ViewHolder class?
6. Write the data flow in RecyclerView?. Explain your answer in steps.

You might also like