@Override
    public void showDir(File directory) {
        if (directory != null) {
            //Grab the directory's data to feed to the list adapter.
            AdapterData adapterData = mFileBrowserView.getFileBrowserEngine().loadDir(directory);
            if (adapterData != null) {
                oldFile = directory;
                //Call the interface callback method.
                if (mNavigationInterface != null)
                    mNavigationInterface.onNewDirLoaded(directory);
                //Check if the user wants to use a custom adapter.
                if (mFileBrowserView.getFileBrowserAdapter() != null) {
                    //The user called setFileBrowserAdapter() and is using a custom adapter.
                    mFileBrowserView.getFileBrowserAdapter().setAdapterData(adapterData);
                } else {
                    //Nope, no custom adapter, so fall back to the default adapter.
                    ListLayoutAdapter adapter = new ListLayoutAdapter(mContext, mFileBrowserView, adapterData);
                    mFileBrowserView.setCustomAdapter(adapter);
                }
                //Apply the adapter to the ListView.
                mAbsListView.setAdapter(mFileBrowserView.getFileBrowserAdapter());
                //Apply the click listener to the ListView.
                mAbsListView.setOnItemClickListener(onItemClickListener);
            } else {
                //Call the interface callback method.
                if (mNavigationInterface != null)
                    mNavigationInterface.onNewDirLoaded(oldFile);
                if (namePath.contains(".gif") || namePath.contains(".GIF")) {
                    mNavigationInterface.getImagePath(namePath);
                } else {
                    GlobalKt.showToast(GlobalUtil.INSTANCE.getString(R.string.only_support_gif_file));

                }
            }
        } else {
            GlobalKt.showToast(GlobalUtil.INSTANCE.getString(R.string.unable_to_load_dir));
        }
    }
Loads the directory structure of the specified dir and sets the ListView's adapter.

@param directory The File object that points to the directory to load.
core/src/main/java/com/filebrowser/ListLayout/ListLayoutView.java