NewPageDialog

Dialog for choosing properties for a newly created PDF page. A call to show will prepare and show the dialog, creating it if necessary. When calling this method after a configuration change, it will restore and use the previously added dialog.

Constructors

Link copied to clipboard
constructor()
Primary constructor of the NewPageDialog.

Types

Link copied to clipboard
interface Callback
This listener interface needs to be implemented by any class that wishes to handle new page creation event.

Properties

Link copied to clipboard
val ARG_DOCUMENT_PAGE_SIZE: String = "com.pspdfkit.ui.dialog.page.NewPageDialog.ARG_DOCUMENT_PAGE_SIZE"
Name of the fragment argument carrying the document page Size.
Link copied to clipboard
val FRAGMENT_TAG: String = "com.pspdfkit.ui.dialog.page.NewPageDialog.FRAGMENT_TAG"
Fragment transaction tag used by this dialog.

Functions

Link copied to clipboard
open fun getContext(): Context
Returns a themed context for this dialog fragment.
Link copied to clipboard
open fun hide(@NonNull fragmentManager: FragmentManager)
Hides the dialog if visible.
Link copied to clipboard
open fun onCreate(savedInstanceState: Bundle)
Called when the fragment is first created.
Link copied to clipboard
open fun onCreateDialog(savedInstanceState: Bundle): Dialog
Called to create the dialog window.
Link copied to clipboard
open fun onDismiss(dialog: DialogInterface)
Called when the dialog is dismissed.
Link copied to clipboard
open fun onStart()
Called when the dialog is starting.
Link copied to clipboard
open fun restore(@NonNull fragmentManager: FragmentManager, @NonNull callback: NewPageDialog.Callback): Boolean
open fun restore(@NonNull fragmentManager: FragmentManager, @NonNull pageTemplates: List<PageTemplate>, @NonNull callback: NewPageDialog.Callback): Boolean
open fun restore(@NonNull fragmentManager: FragmentManager, @NonNull pageTemplates: List<PageTemplate>, showPageTemplatesLast: Boolean, @NonNull callback: NewPageDialog.Callback): Boolean
Restore existing dialog.
Link copied to clipboard
open fun setupDialog(dialog: Dialog, style: Int)
Called to configure the dialog.
Link copied to clipboard
open fun show(@NonNull fragmentManager: FragmentManager, @Nullable documentPageSize: Size, @NonNull callback: NewPageDialog.Callback)
open fun show(@NonNull fragmentManager: FragmentManager, @Nullable documentPageSize: Size, @NonNull pageTemplates: List<PageTemplate>, @NonNull callback: NewPageDialog.Callback)
open fun show(@NonNull fragmentManager: FragmentManager, @Nullable documentPageSize: Size, @NonNull pageTemplates: List<PageTemplate>, showPageTemplatesLast: Boolean, @NonNull callback: NewPageDialog.Callback)
Shows the dialog to the user.