FontRequestCallback
open classFontRequestCallback
| kotlin.Any | |
| ↳ | android.provider.FontsContract.FontRequestCallback |
Interface used to receive asynchronously fetched typefaces.
Summary
| Constants | |
|---|---|
| static Int |
Constant returned by |
| static Int |
Constant returned by |
| static Int |
Constant returned by |
| static Int |
Constant returned by |
| static Int |
Constant returned by |
| static Int |
Constant returned by |
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| open Unit |
onTypefaceRequestFailed(reason: Int)Called when a Typeface request done via |
| open Unit |
onTypefaceRetrieved(typeface: Typeface!)Called then a Typeface request done via |
Constants
FAIL_REASON_FONT_LOAD_ERROR
static valFAIL_REASON_FONT_LOAD_ERROR: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the font returned by the provider was not loaded properly.
Value: -3FAIL_REASON_FONT_NOT_FOUND
static valFAIL_REASON_FONT_NOT_FOUND: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the font provider did not return any results for the given query.
Value: 1FAIL_REASON_FONT_UNAVAILABLE
static valFAIL_REASON_FONT_UNAVAILABLE: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the font provider found the queried font, but it is currently unavailable.
Value: 2FAIL_REASON_MALFORMED_QUERY
static valFAIL_REASON_MALFORMED_QUERY: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the given query was not supported by the provider.
Value: 3FAIL_REASON_PROVIDER_NOT_FOUND
static valFAIL_REASON_PROVIDER_NOT_FOUND: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the given provider was not found on the device.
Value: -1FAIL_REASON_WRONG_CERTIFICATES
static valFAIL_REASON_WRONG_CERTIFICATES: Int
Deprecated: Deprecated in Java.
Constant returned by onTypefaceRequestFailed(int) signaling that the given provider must be authenticated and the given certificates do not match its signature.
Value: -2Public constructors
Public methods
onTypefaceRequestFailed
open funonTypefaceRequestFailed(reason: Int): Unit
Deprecated: Deprecated in Java.
Called when a Typeface request done via requestFonts} fails.
| Parameters | |
|---|---|
reason |
Int: One of FAIL_REASON_PROVIDER_NOT_FOUND, FAIL_REASON_FONT_NOT_FOUND, FAIL_REASON_FONT_LOAD_ERROR, FAIL_REASON_FONT_UNAVAILABLE or FAIL_REASON_MALFORMED_QUERY if returned by the system. May also be a positive value greater than 0 defined by the font provider as an additional error code. Refer to the provider's documentation for more information on possible returned error codes. Value is android.provider.FontsContract.FontRequestCallback#FAIL_REASON_PROVIDER_NOT_FOUND, android.provider.FontsContract.FontRequestCallback#FAIL_REASON_FONT_LOAD_ERROR, android.provider.FontsContract.FontRequestCallback#FAIL_REASON_FONT_NOT_FOUND, android.provider.FontsContract.FontRequestCallback#FAIL_REASON_FONT_UNAVAILABLE, or android.provider.FontsContract.FontRequestCallback#FAIL_REASON_MALFORMED_QUERY |
onTypefaceRetrieved
open funonTypefaceRetrieved(typeface: Typeface!): Unit
Deprecated: Deprecated in Java.
Called then a Typeface request done via requestFonts is complete. Note that this method will not be called if onTypefaceRequestFailed(int) is called instead.
| Parameters | |
|---|---|
typeface |
Typeface!: The Typeface object retrieved. |