MetadataRepo
@AnyThread @RequiresApi(19) 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(@NonNull typeface: Typeface, @NonNull inputStream: InputStream) Construct MetadataRepo from an input stream. |
static MetadataRepo! |
create(@NonNull typeface: Typeface, @NonNull byteBuffer: ByteBuffer) Construct MetadataRepo from a byte buffer. |
static MetadataRepo! |
create(@NonNull assetManager: AssetManager, assetPath: String!) Construct MetadataRepo from an asset. |
Public methods
create
static fun create(
@NonNull typeface: Typeface,
@NonNull 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 |
InputStream: InputStream to read emoji metadata from |
create
static fun create(
@NonNull typeface: Typeface,
@NonNull 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 |
ByteBuffer: ByteBuffer to read emoji metadata from |
create
static fun create(
@NonNull assetManager: AssetManager,
assetPath: String!
): MetadataRepo!
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 |