Class AssetsManager


  • public final class AssetsManager
    extends NativeBase

    Assets manager interface. Can be used to make assets available to the SDK.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

    • Constructor Summary

      Constructors 
      Constructor Description
      AssetsManager​(MapContext context)
      Creates an instance of AssetsManager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void registerFont​(java.lang.String fontName, java.lang.String fontPath)
      Registers a font under a font name.
      void registerFontWithFallback​(java.lang.String fontName, java.lang.String fontPath, java.util.List<java.lang.String> fallbackFontFilePaths)
      Registers a font set under a font name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssetsManager

        public AssetsManager​(@NonNull
                             MapContext context)

        Creates an instance of AssetsManager.

        Parameters:
        context -

        MapContext to which the assets belong.

    • Method Detail

      • registerFont

        public void registerFont​(@NonNull
                                 java.lang.String fontName,
                                 @NonNull
                                 java.lang.String fontPath)

        Registers a font under a font name. After registration, the font name can be used in

        Repeated registration with the same font name is ignored.

        Parameters:
        fontName -

        A font name.

        fontPath -

        A font file path. TTF, OTF and WOFF formats are supported.

        Can be an asset file path or an absolute file path.

      • registerFontWithFallback

        public void registerFontWithFallback​(@NonNull
                                             java.lang.String fontName,
                                             @NonNull
                                             java.lang.String fontPath,
                                             @NonNull
                                             java.util.List<java.lang.String> fallbackFontFilePaths)

        Registers a font set under a font name. After registration, the font name can be used in

        Repeated registration with the same font name is ignored.

        Parameters:
        fontName -

        A font name.

        fontPath -

        A font file path. TTF, OTF and WOFF formats are supported.

        Can be an asset file path or an absolute file path.

        fallbackFontFilePaths -

        Additional font files are intended to be used if main font does not contain required character symbol and shall be sorted starting from most useful.