-
Notifications
You must be signed in to change notification settings - Fork 141
FilePicker Dialog
public class FilePickerDialog
extends Dialog implements AdapterView.OnItemClickListener
FilePickerDialog shows list of files and directories in the device storage, based on properties they can be selected.
Constants | |
---|---|
static final int |
EXTERNAL_READ_PERMISSION_GRANT Use this constant as requestCode for granting external read permission. |
Public constructors |
---|
FilePickerDialog(Context context) Creates dialog window with default DialogProperties. |
FilePickerDialog(Context context, DialogPropertiesproperties) Creates a dialog window with custom DialogProperties. |
Inherited Methods | |
---|---|
void |
show() Start the dialog and display it on screen. |
void |
dismiss() Dismiss this dialog, removing it from the screen.. |
Public Methods | |
---|---|
DialogProperties |
getProperties() Retrieve the Properties this Dialog is using. |
void |
setProperties(DialogProperties properties) Set properties dialog would be using. |
void |
setDialogSelectionListener(DialogSelectionListener callbacks) Set a listener to be invoked when SELECT button is pressed. |
###EXTERNAL_READ_PERMISSION_GRANT Use this constant as requestCode for granting external read permission. Constant Value: 112
###FilePickerDialog FilePickerDialog(Context context)
Creates dialog window with default DialogProperties.
The supplied context
is used to obtain the window manager, populate dialog list and checking permissions.
Parameters | |
---|---|
context | Context: the context in which the dialog should run |
###FilePickerDialog FilePickerDialog(Context context, DialogProperties properties)
Creates a dialog window with custom DialogProperties.
The supplied context
is used to obtain the window manager, populate dialog list and checking permissions.
The supplied properties
is used to define selection modes, types and directories.
Parameters | |
---|---|
context |
Context : the context in which the dialog should run |
properties |
DialogProperties : the properties dialog would be using |
###show
void show ()
Start the dialog and display it on screen. The window is placed in the application layer and opaque. Note that you should not override this method to do initialization when the dialog is shown, instead implement that in onStart().
###dismiss
void dismiss ()
Dismiss this dialog, removing it from the screen. This method can be invoked safely from any thread. Note that you should not override this method to do cleanup when the dialog is dismissed, instead implement that in onStop().
###getProperties DialogProperties getProperties()
Retrieve the Properties this Dialog is using.
Returns | |
---|---|
DialogProperties | properties dialog is using. |
###setProperties
void setProperties(DialogProperties properties)
Set properties dialog would be using.
Parameters | |
---|---|
properties |
DialogProperties: properties dialog will be using. |
###setDialogSelectionListener
void setDialogSelectionListener(DialogSelectionListener callbacks)
Set a listener to be invoked when SELECT button is pressed.
Parameters | |
---|---|
callbacks |
DialogSelectionListener: listener to be invoked when SELECT button is pressed. |