@Override
    public void onBindViewHolder(ViewHolder holder, int adapterPosition) {
        int section = getSectionForAdapterPosition(adapterPosition);

        // bind the sections to this view holder
        holder.setSection(section);
        holder.setNumberOfItemsInSection(getNumberOfItemsInSection(section));

        // tag the viewHolder's item so as to make it possible to track in layout manager
        tagViewHolderItemView(holder, section, adapterPosition);

        int baseType = unmaskBaseViewType(holder.getItemViewType());
        int userType = unmaskUserViewType(holder.getItemViewType());
        switch (baseType) {
            case TYPE_HEADER:
                onBindHeaderViewHolder((HeaderViewHolder) holder, section, userType);
                break;

            case TYPE_ITEM:
                ItemViewHolder ivh = (ItemViewHolder) holder;
                int positionInSection = getPositionOfItemInSection(section, adapterPosition);
                ivh.setPositionInSection(positionInSection);
                onBindItemViewHolder(ivh, section, positionInSection, userType);
                break;

            case TYPE_FOOTER:
                onBindFooterViewHolder((FooterViewHolder) holder, section, userType);
                break;

            case TYPE_GHOST_HEADER:
                onBindGhostHeaderViewHolder((GhostHeaderViewHolder) holder, section);
                break;

            default:
                throw new IllegalArgumentException("unrecognized viewType: " + baseType + " does not correspond to TYPE_ITEM, TYPE_HEADER, TYPE_GHOST_HEADER or TYPE_FOOTER");
        }
    }
@param adapterPosition the adapterPosition of the item in question
@return the custom user type of the item at the adapterPosition
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/section/SectioningAdapter.java