Class NewPageDialog

  • 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 class NewPageDialog
    extends AppCompatDialogFragment
                        

    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.

    • Constructor Detail

      • NewPageDialog

        NewPageDialog()
        Primary constructor of the NewPageDialog.
    • Method Detail

      • show

         static void show(@NonNull() FragmentManager fragmentManager, @Nullable() Size documentPageSize, @NonNull() NewPageDialog.Callback callback)

        Shows the dialog to the user.

        Parameters:
        fragmentManager - Fragment manager for performing necessary fragment transactions.
        documentPageSize - A custom size representative for the current document.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
      • show

         static void show(@NonNull() FragmentManager fragmentManager, @Nullable() Size documentPageSize, @NonNull() List<PageTemplate> pageTemplates, @NonNull() NewPageDialog.Callback callback)

        Shows the dialog to the user.

        Parameters:
        fragmentManager - Fragment manager for performing necessary fragment transactions.
        documentPageSize - A custom size representative for the current document.
        pageTemplates - A list of PageTemplates that the user can select from in addition to the default patterns.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
      • show

         static void show(@NonNull() FragmentManager fragmentManager, @Nullable() Size documentPageSize, @NonNull() List<PageTemplate> pageTemplates, boolean showPageTemplatesLast, @NonNull() NewPageDialog.Callback callback)

        Shows the dialog to the user.

        Parameters:
        fragmentManager - Fragment manager for performing necessary fragment transactions.
        documentPageSize - A custom size representative for the current document.
        pageTemplates - A list of PageTemplates that the user can select from in addition to the default patterns.
        showPageTemplatesLast - Set to true to display your PageTemplates after page pattern options.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
      • hide

         static void hide(@NonNull() FragmentManager fragmentManager)

        Hides the dialog if visible.

        Parameters:
        fragmentManager - Fragment manager for performing necessary fragment transactions.
      • restore

         static boolean restore(@NonNull() FragmentManager fragmentManager, @NonNull() NewPageDialog.Callback callback)

        Restore existing dialog.

        Parameters:
        fragmentManager - Fragment manager for querying dialog fragment state.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
        Returns:

        True when dialog has been restored, false otherwise.

      • restore

         static boolean restore(@NonNull() FragmentManager fragmentManager, @NonNull() List<PageTemplate> pageTemplates, @NonNull() NewPageDialog.Callback callback)

        Restore existing dialog.

        Parameters:
        fragmentManager - Fragment manager for querying dialog fragment state.
        pageTemplates - A list of PageTemplates that the user can select from in addition to the original patterns.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
        Returns:

        True when dialog has been restored, false otherwise.

      • restore

         static boolean restore(@NonNull() FragmentManager fragmentManager, @NonNull() List<PageTemplate> pageTemplates, boolean showPageTemplatesLast, @NonNull() NewPageDialog.Callback callback)

        Restore existing dialog.

        Parameters:
        fragmentManager - Fragment manager for querying dialog fragment state.
        pageTemplates - A list of PageTemplates that the user can select from in addition to the original patterns.
        showPageTemplatesLast - Set to true to display your PageTemplates after page pattern options.
        callback - A Callback that will be notified of confirmation or dismissal of the dialog.
        Returns:

        True when dialog has been restored, false otherwise.