Resource

data class Resource(@DrawableRes val id: Int, val tint: Color? = null) : ToolbarIcon

An icon backed by a drawable resource.

Constructors

Link copied to clipboard
constructor(@DrawableRes id: Int, tint: Color? = null)
constructor(@DrawableRes id: Int)

Java-friendly constructor for an untinted resource icon. The primary constructor's Color parameter is a Kotlin value class, so it can't be called from Java; use this from Java hosts (the renderer falls back to the toolbar's default icon tint).

Properties

Link copied to clipboard
val id: Int

Drawable resource id of the icon.

Link copied to clipboard
val tint: Color?

Optional tint applied to the drawable, or null to leave it untinted.