public class

FilePickerDialogFragment

extends DialogFragment
implements PopulateFolderTask.Callback PopulateSdFolderTask.Callback
java.lang.Object
   ↳ DialogFragment
     ↳ com.pdftron.demo.dialog.FilePickerDialogFragment

Class Overview

A multi-purpose file picker that allows picking folder and file from both internal storage and SD card (if permission is granted).

Summary

Nested Classes
interface FilePickerDialogFragment.ExternalFolderListener  
interface FilePickerDialogFragment.LocalFolderListener  
interface FilePickerDialogFragment.MultipleFilesListener  
interface FilePickerDialogFragment.SingleFileListener  
Constants
int VIEW_MODE_EXTERNAL
int VIEW_MODE_FAVORITE
int VIEW_MODE_LOCAL
int VIEW_MODE_RECENT
Public Constructors
FilePickerDialogFragment()
Public Methods
static Bundle buildBundle(int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject, boolean isForAppend)
String buildPath(String rootName)
void cancelAllThumbRequests()
static FilePickerDialogFragment newInstance(int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject, boolean isForAppend)
static FilePickerDialogFragment newInstance(int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject)
static FilePickerDialogFragment newInstance(int requestCode, int dialogTitleRes, File startupFolder)
static FilePickerDialogFragment newInstance(int requestCode, Uri startupFolderUri)
static FilePickerDialogFragment newInstance(int requestCode, File startupFolder)
static FilePickerDialogFragment newInstance(int requestCode, int dialogTitleRes, Uri startupFolderUri)
void onActivityResult(int requestCode, int resultCode, Intent data)
void onCreate(Bundle savedInstanceState)
Dialog onCreateDialog(Bundle savedInstanceState)
void onCurrentRootRemoved()
Called when the current root is no longer available
void onLowMemory()
boolean onMenuItemClick(MenuItem item)
void onPause()
void onPopulateFolderTaskFinished()
Called when the task has been terminated.
void onPopulateFolderTaskProgressUpdated(File currentFolder)
Called when the task has updated file info list, after this callback the recursive folders/files will be populated.
void onPopulateFolderTaskStarted()
Called when the task has started.
void onPopulateSdFilesTaskFinished()
Called when the task has been terminated.
void onPopulateSdFilesTaskProgressUpdated(List<ExternalFileInfo> rootList)
Called when the task has updated file info list.
void onPopulateSdFilesTaskProgressUpdated(ExternalFileInfo savedRoot, ExternalFileInfo savedFolder, ExternalFileInfo savedLeaf)
Called when the task has built special saved folder.
void onPopulateSdFilesTaskStarted()
Called when the task has started.
void onResume()
void onStart()
void setExternalFolderListener(FilePickerDialogFragment.ExternalFolderListener listener)
void setLocalFolderListener(FilePickerDialogFragment.LocalFolderListener listener)
void setMultipleFilesListener(FilePickerDialogFragment.MultipleFilesListener listener)
void setSingleFileListener(FilePickerDialogFragment.SingleFileListener listener)
void updateTitle()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pdftron.demo.asynctask.PopulateFolderTask.Callback
From interface com.pdftron.demo.asynctask.PopulateSdFolderTask.Callback

Constants

public static final int VIEW_MODE_EXTERNAL

Constant Value: 3 (0x00000003)

public static final int VIEW_MODE_FAVORITE

Constant Value: 1 (0x00000001)

public static final int VIEW_MODE_LOCAL

Constant Value: 2 (0x00000002)

public static final int VIEW_MODE_RECENT

Constant Value: 0 (0x00000000)

Public Constructors

public FilePickerDialogFragment ()

Public Methods

public static Bundle buildBundle (int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject, boolean isForAppend)

public String buildPath (String rootName)

public void cancelAllThumbRequests ()

public static FilePickerDialogFragment newInstance (int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject, boolean isForAppend)

public static FilePickerDialogFragment newInstance (int requestCode, int dialogTitleRes, File startupFolder, Uri startupFolderUri, Object customObject)

public static FilePickerDialogFragment newInstance (int requestCode, int dialogTitleRes, File startupFolder)

public static FilePickerDialogFragment newInstance (int requestCode, Uri startupFolderUri)

public static FilePickerDialogFragment newInstance (int requestCode, File startupFolder)

public static FilePickerDialogFragment newInstance (int requestCode, int dialogTitleRes, Uri startupFolderUri)

public void onActivityResult (int requestCode, int resultCode, Intent data)

public void onCreate (Bundle savedInstanceState)

public Dialog onCreateDialog (Bundle savedInstanceState)

public void onCurrentRootRemoved ()

Called when the current root is no longer available

public void onLowMemory ()

public boolean onMenuItemClick (MenuItem item)

public void onPause ()

public void onPopulateFolderTaskFinished ()

Called when the task has been terminated.

public void onPopulateFolderTaskProgressUpdated (File currentFolder)

Called when the task has updated file info list, after this callback the recursive folders/files will be populated.

Parameters
currentFolder The current folder

public void onPopulateFolderTaskStarted ()

Called when the task has started.

public void onPopulateSdFilesTaskFinished ()

Called when the task has been terminated.

public void onPopulateSdFilesTaskProgressUpdated (List<ExternalFileInfo> rootList)

Called when the task has updated file info list.

Parameters
rootList The populated root list

public void onPopulateSdFilesTaskProgressUpdated (ExternalFileInfo savedRoot, ExternalFileInfo savedFolder, ExternalFileInfo savedLeaf)

Called when the task has built special saved folder.

Parameters
savedRoot The saved root
savedFolder The saved folder
savedLeaf The saved leaf

public void onPopulateSdFilesTaskStarted ()

Called when the task has started.

public void onResume ()

public void onStart ()

public void setExternalFolderListener (FilePickerDialogFragment.ExternalFolderListener listener)

public void setLocalFolderListener (FilePickerDialogFragment.LocalFolderListener listener)

public void setMultipleFilesListener (FilePickerDialogFragment.MultipleFilesListener listener)

public void setSingleFileListener (FilePickerDialogFragment.SingleFileListener listener)

public void updateTitle ()