DrawableId

Drawable represented by Android resource ID.

Should be explicitly subclassed to ensure stable persistence, and serialVersionUID must be present. Example:

object InstallIcon : DrawableId {
private const val serialVersionUID = 3692803605642002954L
override fun drawableId() = R.drawable.ic_install
}

Functions

Link copied to clipboard
abstract fun drawableId(): Int

Returns an Android drawable resource ID.