java.lang.Object | ||||
↳ | androidx.fragment.app.Fragment | |||
↳ | androidx.fragment.app.DialogFragment | |||
↳ | androidx.appcompat.app.AppCompatDialogFragment | |||
↳ | com.pspdfkit.document.editor.page.NewPageDialog |
Dialog for choosing properties for a newly created PDF page. A call to show(FragmentManager, Size, List, Callback)
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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | NewPageDialog.Callback | This listener interface needs to be implemented by any class that wishes to handle new page creation event. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ARG_DOCUMENT_PAGE_SIZE | Name of the fragment argument carrying the document page Size . |
|||||||||
String | FRAGMENT_TAG | Fragment transaction tag used by this dialog. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NewPageDialog()
Primary constructor of the
NewPageDialog . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Context | getContext() | ||||||||||
static void |
hide(FragmentManager fragmentManager)
Hides the dialog if visible.
| ||||||||||
void | onCreate(Bundle savedInstanceState) | ||||||||||
Dialog | onCreateDialog(Bundle savedInstanceState) | ||||||||||
void | onDismiss(DialogInterface dialog) | ||||||||||
void | onStart() | ||||||||||
static boolean |
restore(FragmentManager fragmentManager, List<PageTemplate> pageTemplates, boolean showPageTemplatesLast, NewPageDialog.Callback callback)
Restore existing dialog.
| ||||||||||
static boolean |
restore(FragmentManager fragmentManager, NewPageDialog.Callback callback)
Restore existing dialog.
| ||||||||||
static boolean |
restore(FragmentManager fragmentManager, List<PageTemplate> pageTemplates, NewPageDialog.Callback callback)
Restore existing dialog.
| ||||||||||
void | setupDialog(Dialog dialog, int style) | ||||||||||
static void |
show(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates, boolean showPageTemplatesLast, NewPageDialog.Callback callback)
Shows the dialog to the user.
| ||||||||||
static void |
show(FragmentManager fragmentManager, Size documentPageSize, NewPageDialog.Callback callback)
Shows the dialog to the user.
| ||||||||||
static void |
show(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates, NewPageDialog.Callback callback)
Shows the dialog to the user.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
onAddButtonClicked()
Called when the user presses the "Add" button of the dialog.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Name of the fragment argument carrying the document page Size
. The argument use is
optional.
Fragment transaction tag used by this dialog. When using show(FragmentManager, Size, List, Callback)
the dialog will automatically use this tag.
Hides the dialog if visible.
fragmentManager | Fragment manager for performing necessary fragment transactions. |
---|
Restore existing dialog.
fragmentManager | Fragment manager for querying dialog fragment state. |
---|---|
pageTemplates | A list of PageTemplate s that the user can select from in
addition to the original patterns. |
showPageTemplatesLast | Set to true to display your PageTemplate s after
page pattern options. Set to false by default. |
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog. |
Restore existing dialog.
fragmentManager | Fragment manager for querying dialog fragment state. |
---|---|
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog. |
Restore existing dialog.
fragmentManager | Fragment manager for querying dialog fragment state. |
---|---|
pageTemplates | A list of PageTemplate s that the user can select from in
addition to the original patterns. |
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog. |
Shows the dialog to the user.
fragmentManager | Fragment manager for performing necessary fragment transactions. |
---|---|
documentPageSize | A custom size representative for the current document. This size
option will be called "document size" inside the page size dropdown list, and will be
selected by default. The caller needs to define this size, or pass in null to
deactivate that option. |
pageTemplates | A list of PageTemplate s that the user can select from in
addition to the default patterns. |
showPageTemplatesLast | Set to true to display your PageTemplate s after
page pattern options. Set to false by default. |
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog.
|
Shows the dialog to the user.
fragmentManager | Fragment manager for performing necessary fragment transactions. |
---|---|
documentPageSize | A custom size representative for the current document. This size
option will be called "document size" inside the page size dropdown list, and will be
selected by default. The caller needs to define this size, or pass in null to
deactivate that option. |
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog.
|
Shows the dialog to the user.
fragmentManager | Fragment manager for performing necessary fragment transactions. |
---|---|
documentPageSize | A custom size representative for the current document. This size
option will be called "document size" inside the page size dropdown list, and will be
selected by default. The caller needs to define this size, or pass in null to
deactivate that option. |
pageTemplates | A list of PageTemplate s that the user can select from in
addition to the default patterns. |
callback | A NewPageDialog.Callback that will be notified of confirmation or dismissal of the
dialog.
|
Called when the user presses the "Add" button of the dialog. The default implementation will
dismiss the dialog and notify any NewPageDialog.Callback
.