This question has already been answered:
- How to use multiple view in RecyclerView 3 replies
I want to make a universal implementation of RecyclerView for different types of View.
To do this, you need to determine the type of the view that needs to be drawn at the moment. Where does the viewType parameter in this method come from and what values ββcan it take?
@Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)