java.lang.Object | |
↳ | com.pspdfkit.document.editor.page.DialogNewPageFactory |
A factory for creating new pages using the NewPageDialog
. This factory requires a FragmentManager
to show the dialog.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 PageTemplate s 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 PageTemplate s for the
user to choose from. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
onCreateNewPage(NewPageFactory.OnNewPageReadyListener callback)
This method is called every time the factory should create a
NewPage instance. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Constructor taking the required FragmentManager
. The fragment manager is stored as
weak reference, so the factory needs to be recreated whenever the activity is destroyed.
Using this constructor behaves the same as if using the DialogNewPageFactory(FragmentManager, Size)
constructor with a null
document size.
fragmentManager | FragmentManager used to show the NewPageDialog dialog.
|
---|
Constructor taking the required FragmentManager
and an optional Size
that
should be used as default in the NewPageDialog
. The fragment manager is stored as
weak reference, so the factory needs to be recreated whenever the activity is destroyed.
fragmentManager | FragmentManager used to show the NewPageDialog dialog. |
---|---|
documentPageSize | Optional Size that will be shown as default page size option
inside the dialog.
|
Constructor taking the required FragmentManager
, an optional Size
that should
be used as default in the NewPageDialog
, and optional PageTemplate
s for the
user to choose from. The fragment manager is stored as weak reference, so the factory needs
to be recreated whenever the activity is destroyed.
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 PageTemplate s that the user can select from in
addition to the default patterns.
|
Constructor taking the required FragmentManager
, an optional Size
that should
be used as default in the NewPageDialog
, and optional PageTemplate
s for the
user to choose from. The fragment manager is stored as weak reference, so the factory needs
to be recreated whenever the activity is destroyed.
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 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.
|
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.
callback | OnNewPageReadyListener for notifying the editor once the new page is ready. |
---|