FontRequestEmojiCompatConfig
class FontRequestEmojiCompatConfig : EmojiCompat.Config
| kotlin.Any | ||
| ↳ | androidx.emoji.text.EmojiCompat.Config | |
| ↳ | androidx.emoji.text.FontRequestEmojiCompatConfig |
EmojiCompat.Config implementation that asynchronously fetches the required font and the metadata using a FontRequest. FontRequest should be constructed to fetch an EmojiCompat compatible emoji font.
Summary
Nested types |
|---|
class FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy : FontRequestEmojiCompatConfig.RetryPolicyA retry policy implementation that doubles the amount of time in between retries. |
abstract class FontRequestEmojiCompatConfig.RetryPolicyRetry policy used when the font provider is not ready to give the font file. |
Public constructors |
|---|
FontRequestEmojiCompatConfig(context: Context, request: FontRequest) |
Public functions |
|
|---|---|
FontRequestEmojiCompatConfig! |
setHandler(handler: Handler!)Sets the custom handler to be used for initialization. |
FontRequestEmojiCompatConfig! |
Sets the retry policy. |
Inherited functions |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
FontRequestEmojiCompatConfig
FontRequestEmojiCompatConfig(context: Context, request: FontRequest)
| Parameters | |
|---|---|
context: Context |
Context instance, cannot be |
request: FontRequest |
|
Public functions
setHandler
fun setHandler(handler: Handler!): FontRequestEmojiCompatConfig!
Sets the custom handler to be used for initialization. Since font fetch take longer time, the metadata loader will fetch the fonts on the background thread. You can pass your own handler for this background fetching. This handler is also used for retrying.
| Parameters | |
|---|---|
handler: Handler! |
A |
setRetryPolicy
fun setRetryPolicy(policy: FontRequestEmojiCompatConfig.RetryPolicy!): FontRequestEmojiCompatConfig!
Sets the retry policy. {@see RetryPolicy}
| Parameters | |
|---|---|
policy: FontRequestEmojiCompatConfig.RetryPolicy! |
The policy to be used when the font provider is not ready to give the font file. Can be |