@Override
    public int getItemCount() {
        if (mList == null) {
            return 0;
        }

        // header + count
        return 1 + mList.size();
    }
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