FontCallback

abstract class FontCallback(source)

Interface used to receive asynchronous font fetching events.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun callbackFailAsync(reason: Int, @Nullable handler: @Nullable Handler)
Call onFontRetrievalFailed on the handler given, or the Ui Thread if it is null.
Link copied to clipboard
fun callbackSuccessAsync(@NonNull typeface: @NonNull Typeface, @Nullable handler: @Nullable Handler)
Call onFontRetrieved on the handler given, or the Ui Thread if it is null.
Link copied to clipboard
@NonNull
open fun getHandler(@Nullable handler: @Nullable Handler): @NonNull Handler
Link copied to clipboard
abstract fun onFontRetrievalFailed(reason: Int)
Called when an asynchronous font failed to load.
Link copied to clipboard
abstract fun onFontRetrieved(@NonNull typeface: @NonNull Typeface)
Called when an asynchronous font was finished loading.