Class DialogNewPageFactory
-
- All Implemented Interfaces:
-
com.pspdfkit.document.editor.page.NewPageFactory
public final class DialogNewPageFactory implements NewPageFactory
A factory for creating new pages using the NewPageDialog. This factory requires a to show the dialog.
-
-
Constructor Summary
Constructors Constructor Description DialogNewPageFactory(FragmentManager fragmentManager)
Constructor taking the required FragmentManager. DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize)
Constructor taking the required FragmentManager and an optional Size that should be used as default in the NewPageDialog. DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates)
Constructor taking the required FragmentManager, an optional Size that should be used as default in the NewPageDialog, and optional PageTemplates for the user to choose from. DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates, boolean showPageTemplatesLast)
Constructor taking the required FragmentManager, an optional Size that should be used as default in the NewPageDialog, and optional PageTemplates for the user to choose from.
-
Method Summary
Modifier and Type Method Description void
onCreateNewPage(@NonNull() NewPageFactory.OnNewPageReadyListener callback)
This method is called every time the factory should create a NewPage instance. -
-
Constructor Detail
-
DialogNewPageFactory
DialogNewPageFactory(FragmentManager fragmentManager)
Constructor taking the required FragmentManager.- Parameters:
fragmentManager
- FragmentManager used to show the NewPageDialog dialog.
-
DialogNewPageFactory
DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize)
Constructor taking the required FragmentManager and an optional Size that should be used as default in the NewPageDialog.- Parameters:
fragmentManager
- FragmentManager used to show the NewPageDialog dialog.documentPageSize
- Optional Size that will be shown as default page size option inside the dialog.
-
DialogNewPageFactory
DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates)
Constructor taking the required FragmentManager, an optional Size that should be used as default in the NewPageDialog, and optional PageTemplates for the user to choose from.- Parameters:
fragmentManager
- FragmentManager used to show the NewPageDialog dialog.documentPageSize
- Optional Size that will be shown as default page size option inside the dialog.pageTemplates
- A list of PageTemplates that the user can select from in addition to the default patterns.
-
DialogNewPageFactory
DialogNewPageFactory(FragmentManager fragmentManager, Size documentPageSize, List<PageTemplate> pageTemplates, boolean showPageTemplatesLast)
Constructor taking the required FragmentManager, an optional Size that should be used as default in the NewPageDialog, and optional PageTemplates for the user to choose from.- Parameters:
fragmentManager
- FragmentManager used to show the NewPageDialog dialog.documentPageSize
- Optional Size that will be shown as default page size option inside the dialog.pageTemplates
- A list of PageTemplates that the user can select from in addition to the default patterns.showPageTemplatesLast
- Set totrue
to display your PageTemplates after page pattern options.
-
-
Method Detail
-
onCreateNewPage
void onCreateNewPage(@NonNull() NewPageFactory.OnNewPageReadyListener callback)
This method is called every time the factory should create a NewPage instance. Since creation of the new page can be a longer running asynchronous operation (for example via a page configuration dialog shown to the user) this method receives a
callback
that the factory can call once the new page is ready.- Parameters:
callback
- OnNewPageReadyListener for notifying the editor once the new page is ready.
-
-
-
-