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

IconRequest

data class IconRequest (source)

A request to load an Icon.

Types

Name Summary
Resource data class Resource
An icon resource that can be loaded.
Size enum class Size
Supported sizes.

Constructors

Name Summary
<init> IconRequest(url: String, size: Size = Size.DEFAULT, resources: List<Resource> = emptyList(), color: Int? = null, isPrivate: Boolean = false)
A request to load an Icon.

Properties

Name Summary
color val color: Int?
The suggested dominant color of the icon.
isPrivate val isPrivate: Boolean
resources val resources: List<Resource>
An optional list of icon resources to load the icon from.
size val size: Size
The preferred size of the icon that should be loaded.
url val url: String
The URL of the website an icon should be loaded for.

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.