DocumentDescriptor

Describes a document and its UI state. The DocumentDescriptor is used by the 's DocumentCoordinator to handle multiple loaded documents and to manage their state.

Document is represented by the list of parcelable DocumentSources. Descriptor also holds loaded PdfDocument after it's loaded by the DocumentCoordinator. Note that this PdfDocument instance won't be restored after reading from the parcel - it must be loaded again in this case.

Properties

Link copied to clipboard
Link copied to clipboard
Custom title that will be displayed in the UI instead of document title.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun describeContents(): Int
Link copied to clipboard
open fun fromDataProvider(@NonNull dataProvider: DataProvider, @Nullable password: String, @Nullable contentSignature: String): DocumentDescriptor
Creates descriptor for document loaded from data provider.
Link copied to clipboard
open fun fromDataProviders(@NonNull dataProviders: List<DataProvider>, @Nullable passwords: List<String>, @Nullable contentSignatures: List<String>): DocumentDescriptor
Creates descriptor for compound document loaded from data providers.
Link copied to clipboard
Creates descriptor for loaded document.
Link copied to clipboard
Creates descriptor for document loaded from document source.
Link copied to clipboard
Creates descriptor for compound document loaded from document sources.
Link copied to clipboard
open fun fromUri(@NonNull documentUri: Uri): DocumentDescriptor
open fun fromUri(@NonNull documentUri: Uri, @Nullable password: String): DocumentDescriptor
Creates descriptor for document loaded from URI.
Link copied to clipboard
open fun fromUris(@NonNull documentUris: List<Uri>, @Nullable passwords: List<String>, @Nullable contentSignatures: List<String>): DocumentDescriptor
Creates descriptor for compound document loaded from multiple URIs.
Link copied to clipboard
Returns source from which the document should be loaded.
Link copied to clipboard
open fun getTitle(@NonNull context: Context): String
Returns displayable document title.
Link copied to clipboard
open fun getUid(): String
Returns unique document ID.
Link copied to clipboard
Creates descriptor for image document loaded from data provider.
Link copied to clipboard
Creates descriptor for image document loaded from a document source.
Link copied to clipboard
Creates descriptor for image document loaded from URI.
Link copied to clipboard
open fun setTitle(@Nullable title: String)
Sets a custom displayable document title.
Link copied to clipboard
open fun writeToParcel(@NonNull dest: Parcel, flags: Int)