MetadataRepo

class MetadataRepo
kotlin.Any
   ↳ androidx.emoji.text.MetadataRepo

Class to hold the emoji metadata required to process and draw emojis.

Summary

Public methods
static MetadataRepo!
create(typeface: Typeface, inputStream: InputStream)

Construct MetadataRepo from an input stream.

static MetadataRepo!
create(typeface: Typeface, byteBuffer: ByteBuffer)

Construct MetadataRepo from a byte buffer.

static MetadataRepo!
create(assetManager: AssetManager, assetPath: String!)

Construct MetadataRepo from an asset.

Public methods

create

static fun create(typeface: Typeface, inputStream: InputStream): MetadataRepo!

Construct MetadataRepo from an input stream. The library does not close the given InputStream, therefore it is caller's responsibility to properly close the stream.

Parameters
typeface Typeface: Typeface to be used to render emojis
inputStream Typeface: InputStream to read emoji metadata from

create

static fun create(typeface: Typeface, byteBuffer: ByteBuffer): MetadataRepo!

Construct MetadataRepo from a byte buffer. The position of the ByteBuffer will change, it is caller's responsibility to reposition the buffer if required.

Parameters
typeface Typeface: Typeface to be used to render emojis
byteBuffer Typeface: ByteBuffer to read emoji metadata from

create

static fun create(assetManager: AssetManager, assetPath: String!): MetadataRepo!

Construct MetadataRepo from an asset.

Parameters
assetManager AssetManager: AssetManager instance
assetPath AssetManager: asset manager path of the file that the Typeface and metadata will be created from