android-components / mozilla.components.browser.icons.loader / IconLoader


interface IconLoader (source)

A loader that can load an icon from an IconRequest.Resource.


Name Summary
Result sealed class Result


Name Summary
load abstract fun load(context: <ERROR CLASS>, request: IconRequest, resource: Resource): Result
Tries to load the IconRequest.Resource for the given IconRequest.

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
DataUriIconLoader class DataUriIconLoader : IconLoader
An IconLoader implementation that will base64 decode the image bytes from a data:image uri.
DiskIconLoader class DiskIconLoader : IconLoader
IconLoader implementation that loads icons from a disk cache.
HttpIconLoader class HttpIconLoader : IconLoader
IconLoader implementation that will try to download the icon for resources that point to an http(s) URL.
MemoryIconLoader class MemoryIconLoader : IconLoader
An IconLoader implementation that loads icons from an in-memory cache.