@Override
    @SuppressWarnings("unchecked")
    public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int headerPosition) {
        if (headerPosition == 0) {
            mLogic.onBindHeaderViewHolder((AbstractFilePickerFragment<T>.HeaderViewHolder) viewHolder);
        } else {
            int pos = headerPosition - 1;
            mLogic.onBindViewHolder((AbstractFilePickerFragment<T>.DirViewHolder) viewHolder, pos, mList.get(pos));
        }
    }
A simple adapter which also inserts a header item ".." to handle going up to the parent folder.

@param <T> the type which is used, for example a normal java File object.
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/FileItemAdapter.java