Builder used to create a new instance of OpenFileActivityOptions
.
Public Constructor Summary
Public Method Summary
OpenFileActivityOptions |
build()
Build the
CreateShortcutFileActivityOptions with the current
options.
|
OpenFileActivityOptions.Builder |
setActivityStartFolder(DriveId
folder)
Sets the folder that the open file dialog activity will initially display to
folder .
|
OpenFileActivityOptions.Builder | |
OpenFileActivityOptions.Builder | |
OpenFileActivityOptions.Builder |
setSelectionFilter(Filter
filter)
Sets the
Filter
that is used to control which files will be selectable in the open file dialog
activity to filter .
|
Inherited Method Summary
Public Constructors
public OpenFileActivityOptions.Builder ()
Public Methods
public OpenFileActivityOptions build ()
Build the CreateShortcutFileActivityOptions
with the current
options.
Throws
IllegalStateException | if both
setMimeType(List) and
setSelectionFilter(Filter) were called |
---|
public OpenFileActivityOptions.Builder setActivityStartFolder (DriveId folder)
Sets the folder that the open file dialog activity will initially display to
folder
. If not specified, it will default to the root "My Drive" folder.
The activity supports navigation from this folder to other folders.
public OpenFileActivityOptions.Builder setActivityTitle (String title)
Sets the title of the dialog activity to title
.
public OpenFileActivityOptions.Builder setMimeType (List<String> mimeTypes)
Sets the mime-type filter to mimeTypes
. This defines what types of
files will be selectable in the open file dialog activity. Using a zero-length array is
equivalent to not calling this method at all.
If neither this method nor
setSelectionFilter(Filter)
are called, all non-folder files will be
selectable.
Note: This method cannot be used with
setSelectionFilter(Filter)
. Doing so will throw an
IllegalStateException
when
build()
is called.
public OpenFileActivityOptions.Builder setSelectionFilter (Filter filter)
Sets the Filter
that is used to control which files will be selectable in the open file dialog activity
to filter
.
The default filter restricts the selection to files only, i.e.
Filters.not(Filters.eq(SearchableField.MIME_TYPE, DriveFolder.MIME_TYPE))
Note: This method cannot be used with
setMimeType(List)
. Doing so will throw an IllegalStateException
when
build()
is called.