code: @Override
      @UiThread
      public int getItemViewType(int flatPosition) {
          ExpandableWrapper<P, C> listItem = mFlatItemList.get(flatPosition);
          if (listItem.isParent()) {
              return getParentViewType(getNearestParentPosition(flatPosition));
          } else {
              return getChildViewType(getNearestParentPosition(flatPosition), getChildPosition(flatPosition));
          }
      }
docs: For multiple view type support look at overriding {@link #getParentViewType(int)} and
  {@link #getChildViewType(int, int)}. Almost all cases should override those instead
  of this method.
  
  @param flatPosition The index in the merged list of children and parents to get the view type of
  @return Gets the view type of the item at the given flatPosition.