As per my understanding, the following things happen on a broad level when data is to be shown using the RecyclerView.
1) Recycler view calls the onCreateViewHolder() method which returns a ViewHolder object and then calls onBindViewHolder() which binds the data with individual views contained in the ViewHolder.
Doubt:
As RecyclerView object never gets the total inflated View of the XML file, It only gets the views wrapped inside the ViewHolder object. How is RecyclerView able to draw the ViewHolder views correctly? Do the individual Views present in the ViewHolder have sufficient information about their parent layout, padding, margin, where they should be placed in their parent layout?