Package com.pspdfkit.ui.dialog
Class DocumentPrintDialog
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks
,android.content.DialogInterface.OnCancelListener
,android.content.DialogInterface.OnDismissListener
,android.view.View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
public final class DocumentPrintDialog extends BaseDocumentPrintDialog
Dialog with document print options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
DocumentPrintDialog.PrintDialogListener
Listener for the printing dialog.
-
Constructor Summary
Constructors Constructor Description DocumentPrintDialog()
-
Method Summary
Modifier and Type Method Description static void
show(@NonNull() Context context, @NonNull() FragmentManager manager, @IntRange(from = 0) int currentPage, @IntRange(from = 0) int maxPages, @NonNull() String documentName, @NonNull() DocumentPrintDialog.PrintDialogListener listener)
Shows the DocumentPrintDialog
.static void
show(@Nullable() BaseDocumentPrintDialog dialog, @NonNull() Context context, @NonNull() FragmentManager manager, @IntRange(from = 0) int currentPage, @IntRange(from = 0) int maxPages, @NonNull() String documentName, @NonNull() DocumentPrintDialog.PrintDialogListener listener)
Shows the DocumentPrintDialog
.static void
restore(@NonNull() FragmentManager manager, @Nullable() DocumentPrintDialog.PrintDialogListener listener)
Restores PrintDialogListener in existing instance of the dialog. static void
hide(@NonNull() FragmentManager manager)
Hides existing print dialog. static boolean
isVisible(@NonNull() FragmentManager manager)
Test if document print dialog is visible. Dialog
onCreateDialog(Bundle savedInstanceState)
void
onStart()
-
-
Method Detail
-
show
static void show(@NonNull() Context context, @NonNull() FragmentManager manager, @IntRange(from = 0) int currentPage, @IntRange(from = 0) int maxPages, @NonNull() String documentName, @NonNull() DocumentPrintDialog.PrintDialogListener listener)
Shows the
DocumentPrintDialog
. Will always attempt to obtain an existing instance of the dialog.- Parameters:
context
- The context.manager
- The FragmentManager to use.currentPage
- Currently displayed page in the document.maxPages
- Document pages count.documentName
- Document name shown in dialog.listener
- Dialog listener.
-
show
static void show(@Nullable() BaseDocumentPrintDialog dialog, @NonNull() Context context, @NonNull() FragmentManager manager, @IntRange(from = 0) int currentPage, @IntRange(from = 0) int maxPages, @NonNull() String documentName, @NonNull() DocumentPrintDialog.PrintDialogListener listener)
Shows the
DocumentPrintDialog
. Will always attempt to obtain an existing instance of the dialog.- Parameters:
dialog
- The BaseDocumentPrintDialog to show.context
- The context.manager
- The FragmentManager to use.currentPage
- Currently displayed page in the document.maxPages
- Document pages count.documentName
- Document name shown in dialog.listener
- Dialog listener.
-
restore
static void restore(@NonNull() FragmentManager manager, @Nullable() DocumentPrintDialog.PrintDialogListener listener)
Restores PrintDialogListener in existing instance of the dialog.
- Parameters:
manager
- The FragmentManager to use.listener
- Dialog listener.
-
hide
static void hide(@NonNull() FragmentManager manager)
Hides existing print dialog.
- Parameters:
manager
- The FragmentManager to use.
-
isVisible
static boolean isVisible(@NonNull() FragmentManager manager)
Test if document print dialog is visible.
- Parameters:
manager
- The FragmentManager to use.- Returns:
true
if dialog is currently visible.
-
onCreateDialog
@NonNull() Dialog onCreateDialog(Bundle savedInstanceState)
-
onStart
void onStart()
-
-
-
-