android-components / mozilla.components.browser.icons.generator / IconGenerator


interface IconGenerator (source)

A IconGenerator implementation can generate a Bitmap for an IconRequest. It’s a fallback if no icon could be loaded for a specific URL.


Name Summary
generate abstract fun generate(context: <ERROR CLASS>, request: IconRequest): Icon

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.


Name Summary
DefaultIconGenerator class DefaultIconGenerator : IconGenerator
IconGenerator implementation that will generate an icon with a background color, rounded corners and a letter representing the URL.