OpenFileActivityOptions.Builder | Doclava
public static class

OpenFileActivityOptions.Builder

extends Object
java.lang.Object
   ↳ com.google.android.gms.drive.OpenFileActivityOptions.Builder

Class Overview

Builder used to create a new instance of OpenFileActivityOptions.

Summary

Public Constructors
OpenFileActivityOptions.Builder()
Public Methods
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 setActivityTitle(String title)
Sets the title of the dialog activity to title.
OpenFileActivityOptions.Builder setMimeType(List<String> mimeTypes)
Sets the mime-type filter to mimeTypes.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public OpenFileActivityOptions.Builder ()

Public Methods

public OpenFileActivityOptions build ()

Build the CreateShortcutFileActivityOptions with the current options.

Returns
OpenFileActivityOptions
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.

Parameters
folder DriveId
Returns
OpenFileActivityOptions.Builder

public OpenFileActivityOptions.Builder setActivityTitle (String title)

Sets the title of the dialog activity to title.

Parameters
title String
Returns
OpenFileActivityOptions.Builder

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.

Parameters
mimeTypes List
Returns
OpenFileActivityOptions.Builder

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.

Parameters
filter Filter
Returns
OpenFileActivityOptions.Builder