Package de.c1710.filemojicompat
Class FileMetadataRepoLoader
- java.lang.Object
-
- de.c1710.filemojicompat.FileMetadataRepoLoader
-
- All Implemented Interfaces:
androidx.emoji2.text.EmojiCompat.MetadataRepoLoader
public class FileMetadataRepoLoader extends Object implements androidx.emoji2.text.EmojiCompat.MetadataRepoLoader
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_FALLBACKstatic StringDEFAULT_FILE
-
Constructor Summary
Constructors Constructor Description FileMetadataRepoLoader(Context context, File fontFile, String fallbackFontName, MutableBoolean fallbackEnabled, boolean dontWarnOnEmptyFileName)This loader can load emoji metadata from a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidload(androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback)voidloadSync(androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback)
-
-
-
Field Detail
-
DEFAULT_FALLBACK
public static final String DEFAULT_FALLBACK
- See Also:
- Constant Field Values
-
DEFAULT_FILE
public static final String DEFAULT_FILE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileMetadataRepoLoader
public FileMetadataRepoLoader(@NonNull Context context, @Nullable File fontFile, @Nullable String fallbackFontName, @Nullable MutableBoolean fallbackEnabled, boolean dontWarnOnEmptyFileName)This loader can load emoji metadata from a file. It will do so on a new Thread- Parameters:
context- The current Context (used to access the Asset Manager)fontFile- The file from where to load the main font (will proceed to fallback if null)fallbackFontName- The name of the fallback font (defaults toDEFAULT_FALLBACK)fallbackEnabled- A reference to a boolean that will be set to true if the fallback font is enabled
-
-
Method Detail
-
load
public void load(@NonNull androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback)- Specified by:
loadin interfaceandroidx.emoji2.text.EmojiCompat.MetadataRepoLoader
-
loadSync
public void loadSync(@NonNull androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback)
-
-