Class ElectronicSignatureOptions
-
- All Implemented Interfaces:
-
android.os.Parcelable
public abstract class ElectronicSignatureOptions implements Parcelable
Options for configuring the ElectronicSignatureFragment. An instance of this can be passed to show. Use ElectronicSignatureOptions.Builder to create instances of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ElectronicSignatureOptions.Builder
A helper class used for building the ElectronicSignatureOptions.
-
Constructor Summary
Constructors Constructor Description ElectronicSignatureOptions()
-
Method Summary
Modifier and Type Method Description abstract SignatureSavingStrategy
getSignatureSavingStrategy()
The saving strategy used when adding signatures. abstract SignatureColorOptions
getSignatureColorOptions()
Defines the signature color options available when using the "Draw" or "Type" signing UI. abstract List<SignatureCreationMode>
getSignatureCreationModes()
The ways in which the user can choose to add their signature. abstract boolean
getEnableStylusOnDetection()
Indicates whether we should automatically detect stylus usage static Set<Font>
getAvailableFonts(@NonNull() Context context)
Gets a set of the available fonts to pick from when typing a signature. static void
setAvailableFonts(@Nullable() LinkedHashSet<Font> fonts)
Sets a custom LinkedHashSet
of fonts to pick from when typing a signature.-
-
Method Detail
-
getSignatureSavingStrategy
@NonNull() abstract SignatureSavingStrategy getSignatureSavingStrategy()
The saving strategy used when adding signatures. Defaults to SAVE_IF_SELECTED. This will only work if a SignatureStorage has been created and set via setSignatureStorage, otherwise NEVER_SAVE will be used.
- Returns:
The currently used signature saving strategy.
-
getSignatureColorOptions
@NonNull() abstract SignatureColorOptions getSignatureColorOptions()
Defines the signature color options available when using the "Draw" or "Type" signing UI. Defaults to black, purple, and blue.
- Returns:
Returns the SignatureColorOptions.
-
getSignatureCreationModes
@NonNull()@Size(min = 1, max = 3) abstract List<SignatureCreationMode> getSignatureCreationModes()
The ways in which the user can choose to add their signature. Shown as tabs across the top of the signing UI, or no tabs if there is only one mode.
- Returns:
A list of the available signature creation modes. There should be at least one and no duplicates.
-
getEnableStylusOnDetection
abstract boolean getEnableStylusOnDetection()
Indicates whether we should automatically detect stylus usage
-
getAvailableFonts
static Set<Font> getAvailableFonts(@NonNull() Context context)
Gets a set of the available fonts to pick from when typing a signature. By default, a predefined set of four fonts (Caveat, Pacifico, Marck Script, Meddon) is returned.
- Parameters:
context
- Context to use.- Returns:
a set of the available fonts to pick from when typing a signature.
-
setAvailableFonts
static void setAvailableFonts(@Nullable() LinkedHashSet<Font> fonts)
Sets a custom
LinkedHashSet
of fonts to pick from when typing a signature. If empty ornull
, getAvailableFonts will return a predefined set of four fonts.- Parameters:
fonts
- a customLinkedHashSet
of fonts to pick from when typing a signature.
-
-
-
-