Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

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

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

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

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