public final class

SignaturePickerFragment

extends Fragment
implements SignaturePickerDialog.Listener
java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ com.pspdfkit.ui.signatures.SignaturePickerFragment

Class Overview

A dialog for picking a signature. The dialog provides a list of stored signatures, and a user interface for adding new signatures. Additionally, each signature can be associated with an existing Signer which allows digital signing of the document. To show the dialog, use show(FragmentManager, OnSignaturePickedListener, SignatureOptions, SignatureStorage) providing the fragment manager of the current activity, and a callback for receiving the user's selection.

Summary

Nested Classes
interface SignaturePickerFragment.OnSignaturePickedListener Listener for notifying whether a user picked a signature or not. 
Public Constructors
SignaturePickerFragment()
Public Methods
static void dismiss(FragmentManager fragmentManager)
Dismisses any previously shown signature picker fragment.
void finish()
Dismiss fragment removing it from its owning activity.
void onCreate(Bundle savedInstanceState)
void onDismiss()
void onSaveInstanceState(Bundle outState)
void onSignatureCreated(Signature signature, boolean storeSignatureSelected)
void onSignaturePicked(Signature signature)
void onSignaturesDeleted(List<Signature> signatures)
static void restore(FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener, SignatureStorage signatureStorage)
Restores any previously shown SignaturePickerFragment by re-attaching a SignaturePickerFragment.OnSignaturePickedListener.
static void restore(FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener)
Restores any previously shown SignaturePickerFragment by re-attaching a SignaturePickerFragment.OnSignaturePickedListener.
void setOnSignaturePickedListener(SignaturePickerFragment.OnSignaturePickedListener listener)
Sets listener for picked signatures.
void setSignaturePickerOrientation(SignaturePickerOrientation orientation)
Sets the orientation to use for the signature picker.
static void show(FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener)
static void show(FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener, SignatureOptions signatureOptions, SignatureStorage signatureStorage)
void showSignaturePicker(FragmentManager fragmentManager, String fragmentTag)
Show signature picker dialog.
[Expand]
Inherited Methods
From class androidx.fragment.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener
From interface androidx.lifecycle.LifecycleOwner
From interface androidx.lifecycle.ViewModelStoreOwner
From interface com.pspdfkit.framework.ui.dialog.signatures.SignaturePickerDialog.Listener

Public Constructors

public SignaturePickerFragment ()

Public Methods

public static void dismiss (FragmentManager fragmentManager)

Dismisses any previously shown signature picker fragment.

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

public void finish ()

Dismiss fragment removing it from its owning activity.

public void onCreate (Bundle savedInstanceState)

public void onDismiss ()

public void onSaveInstanceState (Bundle outState)

public void onSignatureCreated (Signature signature, boolean storeSignatureSelected)

public void onSignaturePicked (Signature signature)

public void onSignaturesDeleted (List<Signature> signatures)

public static void restore (FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener, SignatureStorage signatureStorage)

Restores any previously shown SignaturePickerFragment by re-attaching a SignaturePickerFragment.OnSignaturePickedListener. Use this inside your activity's onCreate(Bundle) 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.

public static void restore (FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener)

Restores any previously shown SignaturePickerFragment by re-attaching a SignaturePickerFragment.OnSignaturePickedListener. Use this inside your activity's onCreate(Bundle) method to reattach any listener 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.

public void setOnSignaturePickedListener (SignaturePickerFragment.OnSignaturePickedListener listener)

Sets listener for picked signatures. Calling this method will replace any previously set listener. You may provide null to clear the listener.

Parameters
listener SignaturePickerFragment.OnSignaturePickedListener that should be notified, or null to clear the listener.

public void setSignaturePickerOrientation (SignaturePickerOrientation orientation)

Sets the orientation to use for the signature picker. This method is deprecated, please pass SignaturePickerOrientation through the SignatureOptions object passed in the show(FragmentManager, OnSignaturePickedListener) method. This defaults to AUTOMATIC.

Parameters
orientation The orientation to use for the signature picker.

public static void show (FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener)

Shows the SignaturePickerFragment. The fragment will be presented to the user as a dialog. The dialog will use AUTOMATIC.

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

public static void show (FragmentManager fragmentManager, SignaturePickerFragment.OnSignaturePickedListener listener, SignatureOptions signatureOptions, SignatureStorage signatureStorage)

Shows the SignaturePickerFragment. The fragment will be presented to the user as a dialog.

Parameters
fragmentManager The current activity's fragment manager.
listener A listener for receiving the user's selection.
signatureOptions UI options to use when displaying signatures.
signatureStorage Signature storage to be used for saving selected signatures, or null to use the default one.

public void showSignaturePicker (FragmentManager fragmentManager, String fragmentTag)

Show signature picker dialog. This method is deprecated, please use show(FragmentManager, OnSignaturePickedListener) to display the SignaturePickerFragment.

Parameters
fragmentManager Fragment manager used to add fragment to activity.
fragmentTag Tag used when adding fragment to activity.