Class SignaturePickerFragment

  • All Implemented Interfaces:
    android.content.ComponentCallbacks , android.view.View.OnCreateContextMenuListener , androidx.activity.result.ActivityResultCaller , androidx.lifecycle.HasDefaultViewModelProviderFactory , androidx.lifecycle.LifecycleOwner , androidx.lifecycle.ViewModelStoreOwner , androidx.savedstate.SavedStateRegistryOwner

    @Deprecated(message = "v2024.4: Will be removed in 2025.", replaceWith = @ReplaceWith(imports = {}, expression = "ElectronicSignatureFragment")) 
    public final class SignaturePickerFragment
    extends Fragment
                        

    The SignaturePickerFragment can be used to create ink signatures to add to a document. The dialog provides a list of stored signatures, and a user interface for adding new signatures. To show the dialog, use .show providing the fragment manager of the current activity, and a callback for receiving the user's selection.

    This class constitutes PSPDFKit’s older signatures functionality from before the introduction of Electronic Signatures. As such, using this class requires that your license includes the Annotations feature and was originally purchased in October 2021 or earlier. If you purchased your license after this time, then you should use ElectronicSignatureFragment from Electronic Signatures instead.

    This older signatures functionality will continue to be maintained and supported. However, we recommend using Electronic Signatures for new PSPDFKit integrations. If you’re interested in upgrading, please see our migration guide: https://pspdfkit.com/guides/android/migration-guides/migrating-to-electronic-signatures/

    • Constructor Detail

      • SignaturePickerFragment

        SignaturePickerFragment()
    • Method Detail

      • finish

         final Unit finish()

        Dismiss fragment removing it from its owning activity.

      • restore

        @JvmOverloads() final static Unit restore(FragmentManager fragmentManager, OnSignaturePickedListener listener, SignatureStorage signatureStorage)

        Restores any previously shown SignaturePickerFragment by re-attaching a [ ]. Use this inside your activity's method to reattach any listener and signature storage if necessary (for example after a configuration change). If no fragment was shown, calling this method will be a no-op.

        Parameters:
        fragmentManager - The current activity's fragment manager.
        listener - A listener for receiving the user's selection.
        signatureStorage - Signature storage to be used for saving selected signatures, or null to use the default one.
      • restore

        @JvmOverloads() final static Unit restore(FragmentManager fragmentManager, OnSignaturePickedListener listener)

        Restores any previously shown SignaturePickerFragment by re-attaching a [ ]. Use this inside your activity's method to reattach any listener and signature storage if necessary (for example after a configuration change). If no fragment was shown, calling this method will be a no-op.

        Parameters:
        fragmentManager - The current activity's fragment manager.
        listener - A listener for receiving the user's selection.
      • dismiss

         final static Unit dismiss(FragmentManager fragmentManager)

        Dismisses any previously shown signature picker fragment.

        Parameters:
        fragmentManager - Fragment manager used to display this fragment in the first place.