Class SignatureAppearance.SignatureGraphic
-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class SignatureAppearance.SignatureGraphic implements Parcelable
Contains the graphic that will be used as the signature.
-
-
Field Summary
Fields Modifier and Type Field Description public final boolean
isBitmap
public final Uri
uri
public final DataProvider
dataProvider
public final static Parcelable.Creator<SignatureAppearance.SignatureGraphic>
CREATOR
-
Method Summary
Modifier and Type Method Description boolean
isBitmap()
Whether or not this SignatureGraphic is a bitmap. Uri
getUri()
The Uri of this SignatureGraphic. DataProvider
getDataProvider()
The DataProvider of this SignatureGraphic. static SignatureAppearance.SignatureGraphic
fromBitmap(@NonNull() Uri uri)
Creates a new SignatureGraphic from the image located at the given URI. static SignatureAppearance.SignatureGraphic
fromBitmap(@NonNull() DataProvider dataProvider)
Creates a new SignatureGraphic from the image contained in the given data provider. static SignatureAppearance.SignatureGraphic
fromPdf(@NonNull() DocumentSource source)
Creates a new SignatureGraphic from the PDF found at the given document source. boolean
equals(Object o)
int
hashCode()
void
writeToParcel(Parcel dest, int flags)
int
describeContents()
String
toString()
-
-
Method Detail
-
isBitmap
boolean isBitmap()
Whether or not this SignatureGraphic is a bitmap.
- Returns:
true if this SignatureGraphic is a bitmap,
false
otherwise.
-
getUri
@Nullable() Uri getUri()
The Uri of this SignatureGraphic. If this is
null
getDataProvider is guaranteed to be non-null.- Returns:
The Uri where the bitmap or PDF is located, or
null
if a data provider is used.
-
getDataProvider
@Nullable() DataProvider getDataProvider()
The DataProvider of this SignatureGraphic. If this is
null
getUri is guaranteed to be non-null.- Returns:
The DataProvider containing the bitmap or PDF, or
null
is a URI is used.
-
fromBitmap
@NonNull() static SignatureAppearance.SignatureGraphic fromBitmap(@NonNull() Uri uri)
Creates a new SignatureGraphic from the image located at the given URI. This method supports
file:///
URIs for accessing image files on the local file system,content://
URIs for loading an image from a content provider, andfile:///android_asset/
URIs for accessing image files from the app's assets.- Parameters:
uri
- Location of the image to use.- Returns:
The SignatureGraphic pointing to the given image.
-
fromBitmap
@NonNull() static SignatureAppearance.SignatureGraphic fromBitmap(@NonNull() DataProvider dataProvider)
Creates a new SignatureGraphic from the image contained in the given data provider.
- Parameters:
dataProvider
- The DataProvider containing the image.- Returns:
The SignatureGraphic pointing to the given image.
-
fromPdf
@NonNull() static SignatureAppearance.SignatureGraphic fromPdf(@NonNull() DocumentSource source)
Creates a new SignatureGraphic from the PDF found at the given document source.
- Parameters:
source
- The DocumentSource containing the PDF.- Returns:
The SignatureGraphic pointing to the given PDF.
-
hashCode
int hashCode()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
describeContents
int describeContents()
-
-
-
-