added in version 1.0.0
belongs to Maven artifact androidx.emoji:emoji:1.0.0-beta01

MetadataRepo

public final class MetadataRepo
extends Object

java.lang.Object
   ↳ 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, String assetPath)

Construct MetadataRepo from an asset.

Inherited methods

Public methods

create

added in version 1.0.0
public static MetadataRepo create (Typeface typeface, 
                InputStream inputStream)

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 InputStream: InputStream to read emoji metadata from

Returns
MetadataRepo

Throws
IOException

create

added in version 1.0.0
public static MetadataRepo create (Typeface typeface, 
                ByteBuffer byteBuffer)

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 ByteBuffer: ByteBuffer to read emoji metadata from

Returns
MetadataRepo

Throws
IOException

create

added in version 1.0.0
public static MetadataRepo create (AssetManager assetManager, 
                String assetPath)

Construct MetadataRepo from an asset.

Parameters
assetManager AssetManager: AssetManager instance

assetPath String: asset manager path of the file that the Typeface and metadata will be created from

Returns
MetadataRepo

Throws
IOException