@Override
    public View getView(int position, View convertView, ViewGroup parent) {

        FoldersViewHolder holder = null;
        if (convertView == null) {

            convertView = LayoutInflater.from(mContext).inflate(R.layout.list_view_item, parent, false);
            ListView.LayoutParams params = (ListView.LayoutParams) convertView.getLayoutParams();
            params.height = (int) Utils.convertDpToPixels(72.0f, mContext);
            convertView.setLayoutParams(params);

            holder = new FoldersViewHolder();
            holder.fileFolderIcon = convertView.findViewById(R.id.listViewLeftIcon);
            holder.fileFolderSizeText = convertView.findViewById(R.id.listViewSubText);
            holder.fileFolderNameText = convertView.findViewById(R.id.listViewTitleText);
            if (!mFileBrowserView.shouldShowItemSizes()) {
                //Hide the item size TextViews.
                ((View) holder.fileFolderSizeText.getParent()).setVisibility(View.GONE);
                RelativeLayout.LayoutParams titleParams = (RelativeLayout.LayoutParams)
                        holder.fileFolderNameText.getLayoutParams();
                titleParams.addRule(RelativeLayout.CENTER_VERTICAL);
                holder.fileFolderNameText.setLayoutParams(titleParams);
            }

          /*  if (!mFileBrowserView.shouldShowOverflowMenus()) {
                //Hide the overflow menus.
                holder.overflowButton.setVisibility(View.GONE);
            } else {
                holder.overflowButton.setImageResource(R.mipmap.ic_action_overflow_universal);
                holder.overflowButton.setFocusable(false);
                holder.overflowButton.setFocusableInTouchMode(false);
                holder.overflowButton.setOnClickListener(overflowClickListener);

            }*/

            //Hide the icon if we have to.
            if (!mFileBrowserView.shouldShowItemIcons())
                holder.fileFolderIcon.setVisibility(View.GONE);
            else
                holder.fileFolderIcon.setVisibility(View.VISIBLE);

            convertView.setTag(holder);
        } else {
            holder = (FoldersViewHolder) convertView.getTag();
        }

        holder.fileFolderNameText.setText(getNamesList().get(position));
        holder.fileFolderSizeText.setText(getSizesList().get(position));

        /*
         * Set the icon based on whether the item is a folder or a file.
         * Also make sure to set the type of the item as a tag for this
         * row.
         */
        if (mFileBrowserView.shouldShowItemIcons()) {
            if (getTypesList().get(position) == FileBrowserEngine.FOLDER) {
                holder.fileFolderIcon.setImageResource(R.mipmap.icon_folderblue);
                convertView.setTag(R.string.type, FileBrowserEngine.FOLDER);

            } else if (getTypesList().get(position) == FileBrowserEngine.FILE_AUDIO) {
                holder.fileFolderIcon.setImageResource(R.mipmap.icon_mp3);
                convertView.setTag(R.string.type, FileBrowserEngine.FILE_AUDIO);

            } else if (getTypesList().get(position) == FileBrowserEngine.FILE_PICTURE) {
                Glide.with(mContext)
                        .load(getPathsList().get(position))
                        .asBitmap()
                        .placeholder(R.mipmap.icon_png)
                        .into(holder.fileFolderIcon);
                convertView.setTag(R.string.type, FileBrowserEngine.FILE_PICTURE);

            } else if (getTypesList().get(position) == FileBrowserEngine.FILE_VIDEO) {
                holder.fileFolderIcon.setImageResource(R.mipmap.icon_avi);
                convertView.setTag(R.string.type, FileBrowserEngine.FILE_VIDEO);

            } else {
                holder.fileFolderIcon.setImageResource(R.mipmap.icon_default);
                convertView.setTag(R.string.type, FileBrowserEngine.FILE_GENERIC);

            }

        }

        /*
         * We're gonna need a way to keep track of the file/folder path of each row.
         * We'll set the path as the row view's tag.
         */
        convertView.setTag(R.string.path, getPathsList().get(position));

        return convertView;
    }
Adapter for the ListView layout.

@author Saravan Pantham
core/src/main/java/com/filebrowser/ListLayout/ListLayoutAdapter.java