added in version 26.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

FontsContractCompat.FontRequestCallback

public static class FontsContractCompat.FontRequestCallback
extends Object

java.lang.Object
   ↳ android.support.v4.provider.FontsContractCompat.FontRequestCallback


Interface used to receive asynchronously fetched typefaces.

Summary

Constants

int FAIL_REASON_FONT_LOAD_ERROR

Constant returned by onTypefaceRequestFailed(int) signaling that the font returned by the provider was not loaded properly.

int FAIL_REASON_FONT_NOT_FOUND

Constant returned by onTypefaceRequestFailed(int) signaling that the font provider did not return any results for the given query.

int FAIL_REASON_FONT_UNAVAILABLE

Constant returned by onTypefaceRequestFailed(int) signaling that the font provider found the queried font, but it is currently unavailable.

int FAIL_REASON_MALFORMED_QUERY

Constant returned by onTypefaceRequestFailed(int) signaling that the given query was not supported by the provider.

int FAIL_REASON_PROVIDER_NOT_FOUND

Constant returned by onTypefaceRequestFailed(int) signaling that the given provider was not found on the device.

int FAIL_REASON_SECURITY_VIOLATION

Constant that signals that the font was not loaded due to security issues.

int FAIL_REASON_WRONG_CERTIFICATES

Constant returned by onTypefaceRequestFailed(int) signaling that the given provider must be authenticated and the given certificates do not match its signature.

Public constructors

FontsContractCompat.FontRequestCallback()

Public methods

void onTypefaceRequestFailed(int reason)

Called when a Typeface request done via requestFont(Context, FontRequest, FontRequestCallback, Handler) fails.

void onTypefaceRetrieved(Typeface typeface)

Called then a Typeface request done via requestFont(Context, FontRequest, FontRequestCallback, Handler) is complete.

Inherited methods

From class java.lang.Object