RoadShieldIconProvider
@RestrictToExtendedFlavor(value = [ExternalScope.LIBRARY_GROUP] )
Provides road shield and exit sign images.
It automatically scales images based on the device's display density. To generate images at a specific DPI, create a custom configuration context:
private const val TARGET_DPI = 240
val customConfig = applicationContext.resources.configuration.apply {
densityDpi = TARGET_DPI
}
val provider = RoadShieldIconProvider(
context = applicationContext.createConfigurationContext(customConfig)
)Content copied to clipboard
Parameters
context
The application context.
Properties
Functions
Link copied to clipboard
fun provideExitSignIcon(reference: IconReference, content: String): Result<Bitmap, RoadShieldIconProviderFailure>
Generates an exit sign image.
Link copied to clipboard
fun provideRoadShieldIcon(reference: IconReference, content: String): Result<Bitmap, RoadShieldIconProviderFailure>
Generates a road shield image.