android-components / mozilla.components.browser.icons / Icon

Icon

data class Icon (source)

An Icon returned by BrowserIcons after processing an IconRequest

Types

Name Summary
Source enum class Source
The source of an Icon.

Constructors

Name Summary
<init> Icon(bitmap: <ERROR CLASS>, color: Int? = null, source: Source, maskable: Boolean = false)
An Icon returned by BrowserIcons after processing an IconRequest

Properties

Name Summary
bitmap val bitmap: <ERROR CLASS>
The loaded icon as a Bitmap.
color val color: Int?
The dominant color of the icon. Will be null if no color could be extracted.
maskable val maskable: Boolean
True if the icon represents as full-bleed icon that can be cropped to other shapes.
source val source: Source
The source of the 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.