Package com.pspdfkit.ui.dialog
Class DocumentSharingDialogConfiguration.Builder
-
- All Implemented Interfaces:
public 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, int currentPage)
Creates a builder for the document sharing dialog configuration. DocumentSharingDialogConfiguration.Builder(Context context, ShareAction shareAction, PdfDocument document, int currentPage)
Creates a builder for the document sharing dialog configuration.
-
Method Summary
Modifier and Type Method Description DocumentSharingDialogConfiguration.Builder
dialogTitle(@NonNull() String dialogTitle)
Sets the dialog title. DocumentSharingDialogConfiguration.Builder
positiveButtonText(@NonNull() String positiveButtonText)
Sets the positive button text. DocumentSharingDialogConfiguration.Builder
currentPage(@IntRange(from = 0) int currentPage)
Sets currently displayed page. DocumentSharingDialogConfiguration.Builder
documentPages(@IntRange(from = 0) int documentPages)
Sets loaded document pages count. DocumentSharingDialogConfiguration.Builder
initialDocumentName(@NonNull() String initialDocumentName)
Sets the initial document name shown in dialog. DocumentSharingDialogConfiguration.Builder
setSavingFlow(boolean savingFlow, @NonNull() Context context)
Sets proper layout changes for saving flow. DocumentSharingDialogConfiguration
build()
Creates a DocumentSharingDialogConfiguration with the arguments supplied to this builder. DocumentSharingDialogConfiguration.Builder
setInitialPagesSpinnerAllPages(boolean allPages)
Sets the initial position for the pages spinner to 'All pages'. -
-
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, int 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, int 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
DocumentSharingDialogConfiguration.Builder dialogTitle(@NonNull() String dialogTitle)
Sets the dialog title.
- Parameters:
dialogTitle
- A title for the dialog.
-
positiveButtonText
DocumentSharingDialogConfiguration.Builder positiveButtonText(@NonNull() String positiveButtonText)
Sets the positive button text.
- Parameters:
positiveButtonText
- A text to be displayed on the positive dialog button.
-
currentPage
DocumentSharingDialogConfiguration.Builder currentPage(@IntRange(from = 0) int currentPage)
Sets currently displayed page.
- Parameters:
currentPage
- Page number of the page to be displayed.
-
documentPages
DocumentSharingDialogConfiguration.Builder documentPages(@IntRange(from = 0) int documentPages)
Sets loaded document pages count.
- Parameters:
documentPages
- Number of pages in the loaded document.
-
initialDocumentName
DocumentSharingDialogConfiguration.Builder initialDocumentName(@NonNull() String initialDocumentName)
Sets the initial document name shown in dialog.
- Parameters:
initialDocumentName
- A name set to the document initially.
-
setSavingFlow
DocumentSharingDialogConfiguration.Builder setSavingFlow(boolean savingFlow, @NonNull() 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
@NonNull() DocumentSharingDialogConfiguration build()
Creates a DocumentSharingDialogConfiguration with the arguments supplied to this builder.
- Returns:
The document sharing dialog configuration.
-
setInitialPagesSpinnerAllPages
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'.
-
-
-
-