Class FileMetadataRepoLoader

  • All Implemented Interfaces:
    androidx.emoji2.text.EmojiCompat.MetadataRepoLoader

    public class FileMetadataRepoLoader
    extends Object
    implements androidx.emoji2.text.EmojiCompat.MetadataRepoLoader
    • 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 to DEFAULT_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:
        load in interface androidx.emoji2.text.EmojiCompat.MetadataRepoLoader
      • loadSync

        public void loadSync​(@NonNull
                             androidx.emoji2.text.EmojiCompat.MetadataRepoLoaderCallback loaderCallback)