CreateFileActivityOptions.Builder

public static classCreateFileActivityOptions.BuilderextendsObject

Builder used to create a new instance ofCreateFileActivityOptions.

Field Summary

protected finalCreateFileActivityBuilder builder

Public Constructor Summary

Public Method Summary

CreateFileActivityOptions
build()
Builds theCreateShortcutFileActivityOptionswith the current options.
CreateFileActivityOptions.Builder
setActivityStartFolder(DriveId folder)
Sets the folder that the create file dialog activity will initially display to folder.
CreateFileActivityOptions.Builder
setActivityTitle(Stringtitle)
Sets the title of the dialog activity totitle.
CreateFileActivityOptions.Builder
setInitialDriveContents(DriveContents driveContents)
Sets the initial contents for the new file todriveContents.
CreateFileActivityOptions.Builder
setInitialMetadata(MetadataChangeSet metadataChangeSet)
Sets the initial metadata for the new file tometadataChangeSet.

Inherited Method Summary

Fields

protected finalCreateFileActivityBuilder builder

Public Constructors

publicCreateFileActivityOptions.Builder()

Public Methods

publicCreateFileActivityOptions build()

Builds theCreateShortcutFileActivityOptionswith the current options.

publicCreateFileActivityOptions.Builder setActivityStartFolder(DriveId folder)

Sets the folder that the create 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.

publicCreateFileActivityOptions.Builder setActivityTitle(String title)

Sets the title of the dialog activity totitle.

publicCreateFileActivityOptions.Builder setInitialDriveContents(DriveContents driveContents)

Sets the initial contents for the new file todriveContents.In order to create the file with empty contents, pass innull.It is recommended that files with a mime-type that does not support having a zero-byte file (e.g. an image or PDF) is created as a non-empty file.

driveContentsmust be obtained through createContents().Once this method returns,driveContentswill be persisted and closed. In order to continue editing the file's contents, they must be opened again with openFile(DriveFile, int)or openFile(DriveFile, int, OpenFileCallback).

publicCreateFileActivityOptions.Builder setInitialMetadata(MetadataChangeSet metadataChangeSet)

Sets the initial metadata for the new file tometadataChangeSet.

This method must be called or build()will fail. A newMetadataChangeSet can be created usingMetadataChangeSet.Builder.