Package com.pspdfkit.ui.dialog
Class DocumentSharingDialogConfiguration.Builder
-
- All Implemented Interfaces:
public final class DocumentSharingDialogConfiguration.Builder
Builder used to construct DocumentSharingDialogConfiguration instance.
-
-
Constructor Summary
Constructors Constructor Description DocumentSharingDialogConfiguration.Builder(Context context)
Creates a builder for the document sharing dialog configuration. DocumentSharingDialogConfiguration.Builder(Context context, PdfDocument document, Integer currentPage)
Creates a builder for the document sharing dialog configuration. DocumentSharingDialogConfiguration.Builder(Context context, ShareAction shareAction, PdfDocument document, Integer currentPage)
Creates a builder for the document sharing dialog configuration.
-
Method Summary
Modifier and Type Method Description final DocumentSharingDialogConfiguration.Builder
dialogTitle(String dialogTitle)
Sets the dialog title. final DocumentSharingDialogConfiguration.Builder
positiveButtonText(String positiveButtonText)
Sets the positive button text. final DocumentSharingDialogConfiguration.Builder
currentPage(@IntRange(from = 0) Integer currentPage)
Sets currently displayed page. final DocumentSharingDialogConfiguration.Builder
documentPages(@IntRange(from = 0) Integer documentPages)
Sets loaded document pages count. final DocumentSharingDialogConfiguration.Builder
initialDocumentName(String initialDocumentName)
Sets the initial document name shown in dialog. final DocumentSharingDialogConfiguration.Builder
setInitialPagesSpinnerAllPages(Boolean allPages)
Sets the initial position for the pages spinner to 'All pages'. final DocumentSharingDialogConfiguration.Builder
setSavingFlow(Boolean savingFlow, Context context)
Sets proper layout changes for saving flow. final DocumentSharingDialogConfiguration
build()
Creates a DocumentSharingDialogConfiguration with the arguments supplied to this builder. -
-
Constructor Detail
-
DocumentSharingDialogConfiguration.Builder
DocumentSharingDialogConfiguration.Builder(Context context)
Creates a builder for the document sharing dialog configuration.- Parameters:
context
- Context of the calling component.
-
DocumentSharingDialogConfiguration.Builder
DocumentSharingDialogConfiguration.Builder(Context context, PdfDocument document, Integer currentPage)
Creates a builder for the document sharing dialog configuration.- Parameters:
context
- Context of the calling component.document
- Document that is going to be shared.currentPage
- Currently displayed page.
-
DocumentSharingDialogConfiguration.Builder
DocumentSharingDialogConfiguration.Builder(Context context, ShareAction shareAction, PdfDocument document, Integer currentPage)
Creates a builder for the document sharing dialog configuration.- Parameters:
context
- Context of the calling component.shareAction
- Share action that governs dialog title and buttons.document
- Document that is going to be shared.currentPage
- Currently displayed page.
-
-
Method Detail
-
dialogTitle
final DocumentSharingDialogConfiguration.Builder dialogTitle(String dialogTitle)
Sets the dialog title.
- Parameters:
dialogTitle
- A title for the dialog.
-
positiveButtonText
final DocumentSharingDialogConfiguration.Builder positiveButtonText(String positiveButtonText)
Sets the positive button text.
- Parameters:
positiveButtonText
- A text to be displayed on the positive dialog button.
-
currentPage
final DocumentSharingDialogConfiguration.Builder currentPage(@IntRange(from = 0) Integer currentPage)
Sets currently displayed page.
- Parameters:
currentPage
- Page number of the page to be displayed.
-
documentPages
final DocumentSharingDialogConfiguration.Builder documentPages(@IntRange(from = 0) Integer documentPages)
Sets loaded document pages count.
- Parameters:
documentPages
- Number of pages in the loaded document.
-
initialDocumentName
final DocumentSharingDialogConfiguration.Builder initialDocumentName(String initialDocumentName)
Sets the initial document name shown in dialog.
- Parameters:
initialDocumentName
- A name set to the document initially.
-
setInitialPagesSpinnerAllPages
final DocumentSharingDialogConfiguration.Builder setInitialPagesSpinnerAllPages(Boolean allPages)
Sets the initial position for the pages spinner to 'All pages'.
- Parameters:
allPages
-true
to set the initial position to 'All pages'.
-
setSavingFlow
final DocumentSharingDialogConfiguration.Builder setSavingFlow(Boolean savingFlow, Context context)
Sets proper layout changes for saving flow.
- Parameters:
savingFlow
-true
to enable the saving flow,false
otherwise.context
- Context of the calling component.
-
build
final DocumentSharingDialogConfiguration build()
Creates a DocumentSharingDialogConfiguration with the arguments supplied to this builder.
- Returns:
The document sharing dialog configuration.
-
-
-
-