app / sg.edu.ntu.scse.cz2006.gymbuddies.adapter / ChatAdapter / onCreateViewHolder

onCreateViewHolder

@NonNull open fun onCreateViewHolder(@NonNull parent: ViewGroup, viewType: Int): ChatViewHolder

the method based on view type to render a view and associate the view with respective view holder

Parameters

parent - ViewGroup: view group to hold current item view

viewType - Int: type of layout to be rendered for current view

Return
ChatViewHolder: ViewHolder that associated with created view

See Also
#getItemViewType(int)