code: @Override
      public final int getItemViewType(int position) {
          Log.v(TAG, "getItemCount() position=" + position
                  + " headerItemCount=" + headerItemCount
                  + " contentItemCount=" + contentItemCount
                  + " footerItemCount=" + footerItemCount);
          // Delegate to proper methods based on the position, but validate first.
          if (headerItemCount > 0 && position < headerItemCount) {
              return validateViewType(getHeaderItemViewType(position)) + HEADER_VIEW_TYPE_OFFSET;
          } else if (contentItemCount > 0 && position - headerItemCount < contentItemCount) {
              return validateViewType(getContentItemViewType(position - headerItemCount)) + CONTENT_VIEW_TYPE_OFFSET;
          } else {
              return validateViewType(getFooterItemViewType(position - headerItemCount - contentItemCount)) + FOOTER_VIEW_TYPE_OFFSET;
          }
      }
docs: {@inheritDoc}