Interface IconProvider.IconCallback

  • Enclosing class:
    IconProvider
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface IconProvider.IconCallback
    Interface which is used as callback to pass back an image or error code after calling the createRoadShieldIcon() method.
    • Method Detail

      • onCreateIconReply

        void onCreateIconReply​(@Nullable
                               android.graphics.Bitmap bitmap,
                               @Nullable
                               java.lang.String description,
                               @Nullable
                               IconProviderError error)
        Called when the image was created successfully or an error has occurred
        Parameters:
        bitmap - The created icon or null if an error occurred. Note that the resulting resolution of the image may differ from the width and height constraints because the aspect ratio is kept.
        description - An English description of the created icon. For example, "Federal Highway" for the road shield icon with the RouteType.LEVEL_1_ROAD in Brazil. Empty string if an error occurred.
        error - Error code if icon creation failed.