BundledEmojiCompatConfig


class BundledEmojiCompatConfig : EmojiCompat.Config


EmojiCompat.Config implementation that loads the metadata using AssetManager and bundled resources.

EmojiCompat.init(new BundledEmojiCompatConfig(context));
Including the emoji2-bundled artifact disables the androidx.emoji2.text.EmojiCompatInitializer. You must manually call EmojiCompat.init when using the bundled configuration.
See also
EmojiCompat

Summary

Public constructors

This function is deprecated.

please call BundledEmojiCompatConfig(context, executor) to control the font loading thread.

BundledEmojiCompatConfig(context: Context, fontLoadExecutor: Executor)

Controls the executor font is loaded on.

Inherited functions

From androidx.emoji2.text.EmojiCompat.Config
EmojiCompat.MetadataRepoLoader

Returns the MetadataRepoLoader.

EmojiCompat.Config

Registers an initialization callback.

EmojiCompat.Config
registerInitCallback(
    executor: Executor,
    initCallback: EmojiCompat.InitCallback
)

Registers an initialization callback.

EmojiCompat.Config

Sets the color used as emoji span indicator.

EmojiCompat.Config
setEmojiSpanIndicatorEnabled(emojiSpanIndicatorEnabled: Boolean)

Determines whether a background will be drawn for the emojis that are found and replaced by EmojiCompat.

EmojiCompat.Config

The interface that is used by EmojiCompat in order to check if a given emoji can be rendered by the system.

EmojiCompat.Config

Determines the strategy to start loading the metadata.

EmojiCompat.Config
setReplaceAll(replaceAll: Boolean)

Determines whether EmojiCompat should replace all the emojis it finds with the EmojiSpans.

EmojiCompat.Config

Set the span factory used to actually draw emoji replacements.

EmojiCompat.Config
setUseEmojiAsDefaultStyle(useEmojiAsDefaultStyle: Boolean)

Determines whether EmojiCompat should use the emoji presentation style for emojis that have text style as default.

EmojiCompat.Config
setUseEmojiAsDefaultStyle(
    useEmojiAsDefaultStyle: Boolean,
    emojiAsDefaultStyleExceptions: (Mutable)List<Int!>?
)
EmojiCompat.Config

Unregisters a callback that was added before.

Public constructors

BundledEmojiCompatConfig

Added in 1.0.0
Deprecated in 1.5.0
BundledEmojiCompatConfig(context: Context)

Font will be loaded on a new temporary Thread.

Parameters
context: Context

Context instance

BundledEmojiCompatConfig

Added in 1.5.0
BundledEmojiCompatConfig(context: Context, fontLoadExecutor: Executor)

Controls the executor font is loaded on.

Parameters
context: Context

Context instance

fontLoadExecutor: Executor

Executor to load font on