0

Android > Viewholder/Adapter/layout manager

Hi, I'm beginner with Android Studio and I keep reading stuff about recyclerview, viewholder, adapter, layout manager but I cannot get what are viewholder, adapter and layout manager. For now I only successed to understand how to add a text and edit it using Java xD Tehn I don't get the workflowCan anyone can explain what they are with simple words ? Maybe compare it with daily life things ?

17th Mar 2019, 9:04 AM
Geoffrey L
Geoffrey L - avatar
1 ответ
+ 19
In simple words ViewHolder => it conatins view like textView imageView ext.. if you have some data you can set that data in that view. Adapter => he is links your data to the view. In adapter class you can override 2 important method 1. onCreatViewHolder => this method creats a list item view for storing yours data. 2. onBindViewHolder => this method put your data (Ex => images, text ) to the View. That's what you made. LayoutManager => The layout manager's job is how your View and data will appear in the layout.
23rd Mar 2019, 7:17 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar