CancelableFontCallback

FontCallback allowing cancelling of pending async font fetch, in case a different font is set / requested in the meantime. On failed fetch, specified fallback font will be applied.

Constructors

Link copied to clipboard
constructor(applyFont: CancelableFontCallback.ApplyFont, fallbackFont: Typeface)

Types

Link copied to clipboard
interface ApplyFont
Functional interface for method to call when font is retrieved (or fails with fallback).

Functions

Link copied to clipboard
open fun cancel()
Cancels this callback.
Link copied to clipboard
open fun onFontRetrievalFailed(reason: Int)
Called when an asynchronous font failed to load.
Link copied to clipboard
open fun onFontRetrieved(font: Typeface, fontResolvedSynchronously: Boolean)
Called when an asynchronous font was finished loading.