DefaultColorLoader

Default implementation of a KalugaColorLoader.

Parameters

context

the Context from which to load the color resources

Default implementation of a KalugaColorLoader.

actual class DefaultColorLoader

Default implementation of a KalugaColorLoader.

Parameters

bundle

the NSBundle from which to load the color resource

traitCollection

The UITraitCollection that specifies the gamut to use when selecting the color.

Default implementation of a KalugaColorLoader.

Parameters

transformer

method for getting a KalugaColor from a String identifier

Default implementation of a KalugaColorLoader.

Parameters

transformer

method for getting a KalugaColor from a String identifier

Constructors

Link copied to clipboard
constructor(context: Context?)
actual constructor()
expect constructor()
constructor(bundle: <Error class: unknown class>, traitCollection: <Error class: unknown class>?)
actual constructor()
constructor(transformer: (String) -> KalugaColor?)
actual constructor()
constructor(transformer: (String) -> KalugaColor?)
actual constructor()

Functions

Link copied to clipboard
open override fun loadColor(identifier: String, defaultValue: KalugaColor?): KalugaColor?

Attempts to load the KalugaColor resource associated with a given identifier. If no match is found, the defaultValue will be returned.

abstract fun loadColor(identifier: String, defaultValue: KalugaColor?): KalugaColor?

Attempts to load the KalugaColor resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open fun loadColor(identifier: String, defaultValue: KalugaColor?): KalugaColor?
open override fun loadColor(identifier: String, defaultValue: KalugaColor?): KalugaColor?

Attempts to load the KalugaColor resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open override fun loadColor(identifier: String, defaultValue: KalugaColor?): KalugaColor?

Attempts to load the KalugaColor resource associated with a given identifier. If no match is found, the defaultValue will be returned.