IconSource

constructor(@DrawableRes drawableRes: Int, contentDescription: String? = null, tint: Color? = null)

Create an icon from a drawable res.

Parameters

drawableRes

Res of drawable to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon


constructor(imageVector: ImageVector, contentDescription: String? = null, tint: Color? = null)

Create an icon from a drawable res.

Parameters

imageVector

The vector graphic object to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon


constructor(bitmap: ImageBitmap, contentDescription: String? = null, tint: Color? = null)
constructor(bitmap: ImageBitmap, contentDescription: String? = null, tint: Color? = null, selectedTint: Color? = null)

Create an icon from a drawable res.

Parameters

bitmap

Drawable bitmap to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon


constructor(painter: Painter, contentDescription: String? = null, tint: Color? = null)
constructor(painter: Painter, contentDescription: String? = null, tint: Color? = null, selectedTint: Color? = null)

Create an icon from a drawable res.

Parameters

painter

Painter drawable to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon


constructor(@DrawableRes drawableRes: Int, contentDescription: String? = null, tint: Color? = null, selectedTint: Color? = null)

Create an icon from a drawable res.

Parameters

drawableRes

Res of drawable to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon

selectedTint

Color that is used to tint the icon when selected


constructor(imageVector: ImageVector, contentDescription: String? = null, tint: Color? = null, selectedTint: Color? = null)

Create an icon from a drawable res.

Parameters

imageVector

The vector graphic object to use as icon

contentDescription

Text that is used as content description for the icon

tint

Color that is used to tint the icon

selectedTint

Color that is used to tint the icon when selected