| java.lang.Object | |
| ↳ | com.pspdfkit.ui.PdfActivityIntentBuilder |
Builder used for creating an intent for starting PdfActivity. Allows setting the document and all of the
necessary configuration such as document sources, passwords, etc.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PdfActivityIntentBuilder |
activityClass(Class<? extends PdfActivity> activityClass)
Sets a custom
activity class used for document display. | ||||||||||
| Intent |
build()
Builds
Intent with the values provided in the PdfActivityIntentBuilder. | ||||||||||
| PdfActivityIntentBuilder |
configuration(PdfActivityConfiguration configuration)
Sets
PdfActivityConfiguration to be set on the target PdfActivity in which the document(s) will be displayed. | ||||||||||
| PdfActivityIntentBuilder |
contentSignatures(String... contentSignatures)
Sets list of content signatures for when the opened document is merged from several documents or for a single document.
| ||||||||||
| static PdfActivityIntentBuilder |
emptyActivity(Context context)
Creates a new intent builder with no document, this is useful if you provide custom UI inside your
PdfActivity
subclass to open new documents. | ||||||||||
| static PdfActivityIntentBuilder |
fromDataProvider(Context context, DataProvider... dataProviders)
Creates a new intent builder with document being loaded from data provider.
| ||||||||||
| static PdfActivityIntentBuilder |
fromDocumentDescriptor(Context context, DocumentDescriptor... documentDescriptor)
Creates a new intent builder with document describe by
DocumentDescriptor. | ||||||||||
| static PdfActivityIntentBuilder |
fromImageProvider(Context context, DataProvider dataProvider)
Creates a new intent builder with an image document being loaded from data provider.
| ||||||||||
| static PdfActivityIntentBuilder |
fromImageUri(Context context, Uri uri)
Creates a new intent builder with image document being loaded from Uri.
| ||||||||||
| static PdfActivityIntentBuilder |
fromUri(Context context, Uri... uris)
Creates a new intent builder with document being loaded from URI.
| ||||||||||
| PdfActivityIntentBuilder |
passwords(String... passwords)
Sets list of passwords for when the opened document is merged from several documents or for a single document.
| ||||||||||
| PdfActivityIntentBuilder |
visibleDocument(int visibleDocumentIndex)
Sets index of the document that should be visible after opening the activity.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Sets a custom activity class used for document display. The activity
must extend PdfActivity and must be registered in the AndroidManifest.xml.
If null is passed, the default PdfActivity will be used for document display.
| activityClass | Custom PdfActivity subclass, or null for the default activity to be used. |
|---|
PdfActivityIntentBuilder with set activity subclass.
Builds Intent with the values provided in the PdfActivityIntentBuilder.
instance.
Sets PdfActivityConfiguration to be set on the target PdfActivity in which the document(s) will be displayed.
If null the default configuration will be set.
| configuration | Activity configuration to be set on the target activity. |
|---|
PdfActivityIntentBuilder with set activity configuration.
Sets list of content signatures for when the opened document is merged from several documents or for a single document. The positions of content signature strings in the list must correspond to positions of URIs or data providers passed in #fromUri(Context, Uri...)} or #fromDataProvider(Context, DataProvider...).
| contentSignatures | List of document content signatures, has to be the same size as the list of URIs or data providers. |
|---|
PdfActivityIntentBuilder with declared document content signature(s).| IllegalStateException | when used with image documents or when builder has been created via #fromDocumentDescriptor(Context, DocumentDescriptor...). |
|---|
Creates a new intent builder with no document, this is useful if you provide custom UI inside your PdfActivity
subclass to open new documents.
| context | Context of the calling component, used for intent creation. |
|---|
Creates a new intent builder with document being loaded from data provider. If there are multiple passed data providers, multiple documents will be loaded and merged into a single document.
| context | Context of the calling component, used for intent creation. |
|---|---|
| dataProviders | List of data providers of the documents to merge and open, or just a single data provider for a single document to be opened. |
Creates a new intent builder with document describe by DocumentDescriptor.
If there are multiple passed document descriptors, documents for these descriptors will be displayed as tabs.
| context | Context of the calling component, used for intent creation. |
|---|---|
| documentDescriptor | List of document descriptors for documents that should be displayed in the PdfActivity. |
Creates a new intent builder with an image document being loaded from data provider.
| context | Context of the calling component, used for intent creation. |
|---|---|
| dataProvider | Data provider of the image documents to open. |
Creates a new intent builder with image document being loaded from Uri.
| context | Context of the calling component, used for intent creation. |
|---|---|
| uri | Uri of the image document to open. |
Creates a new intent builder with document being loaded from URI. If there are multiple passed URIs, multiple documents will be loaded and merged into a single document.
| context | Context of the calling component, used for intent creation. |
|---|---|
| uris | List of URIs of the documents to merge and open, or just a single URI for a single document to be opened. |
Sets list of passwords for when the opened document is merged from several documents or for a single document. The positions of password strings in the list must correspond to positions of URIs or data providers passed in #fromUri(Context, Uri...)} or #fromDataProvider(Context, DataProvider...).
| passwords | List of document passwords, has to be the same size as the list of URIs or data providers. |
|---|
PdfActivityIntentBuilder with declared document password(s).| IllegalStateException | when used with image documents or when builder has been created via #fromDocumentDescriptor(Context, DocumentDescriptor...). |
|---|
Sets index of the document that should be visible after opening the activity. This is only valid when builder has been created with multiple documents via #fromDocumentDescriptor(Context, DocumentDescriptor...).
| visibleDocumentIndex | Index of the visible document. |
|---|
| IllegalArgumentException | When visible document index is out of bounds of loaded documents. |
|---|