Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 27.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

ResourcesCompat.FontCallback

public static abstract class ResourcesCompat.FontCallback
extends Object

java.lang.Object
   ↳ android.support.v4.content.res.ResourcesCompat.FontCallback


Interface used to receive asynchronous font fetching events.

Summary

Public constructors

ResourcesCompat.FontCallback()

Public methods

abstract void onFontRetrievalFailed(int reason)

Called when an asynchronous font failed to load.

abstract void onFontRetrieved(Typeface typeface)

Called when an asynchronous font was finished loading.

Inherited methods

From class java.lang.Object

Public constructors

ResourcesCompat.FontCallback

added in version 27.1.0
ResourcesCompat.FontCallback ()

Public methods

onFontRetrievalFailed

added in version 27.1.0
void onFontRetrievalFailed (int reason)

Called when an asynchronous font failed to load.

Parameters
reason int: The reason the font failed to load. One of FAIL_REASON_PROVIDER_NOT_FOUND, FAIL_REASON_WRONG_CERTIFICATES, FAIL_REASON_FONT_LOAD_ERROR, FAIL_REASON_SECURITY_VIOLATION, FAIL_REASON_FONT_NOT_FOUND, FAIL_REASON_FONT_UNAVAILABLE or FAIL_REASON_MALFORMED_QUERY.

onFontRetrieved

added in version 27.1.0
void onFontRetrieved (Typeface typeface)

Called when an asynchronous font was finished loading.

Parameters
typeface Typeface: The font that was loaded.