FioriIcon

constructor(iconType: IconType, resId: Int? = null, bitmap: Bitmap? = null, imageVector: ImageVector? = null, tint: Color? = null, contentDescription: String? = "", painterBuilder: @Composable () -> Painter? = null, backgroundColor: Color = Color.Transparent, url: String? = null, drawable: Drawable? = null, placeholderResId: Int? = null, errorResId: Int? = null, contentScale: ContentScale = ContentScale.Fit)

Parameters

iconType

the type of the icon.

resId

the resource id of the icon.

bitmap

the bitmap of the icon.

imageVector

the image vector of the icon.

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

painterBuilder

a composable function that returns a Painter to draw the icon.

backgroundColor

the background color of the icon. Default is Color.Transparent.

url

the URL of the icon.

drawable

the Drawable of the icon.

placeholderResId

the resource id of the placeholder icon when loading from URL.

errorResId

the resource id of the error icon when loading from URL fails.

contentScale

the scale rule of the icon when loading from URL. Default is ContentScale.Fit.


constructor(resId: Int, tint: Color? = null, contentDescription: String? = "", backgroundColor: Color = Color.Transparent)

Constructor for creating an icon from a resource id.

Parameters

resId

the resource id of the icon.

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

backgroundColor

the background color of the icon. Default is Color.Transparent.


constructor(bitmap: Bitmap, tint: Color? = null, contentDescription: String? = "", backgroundColor: Color = Color.Transparent)

Constructor for creating an icon from a bitmap.

Parameters

bitmap

the bitmap of the icon.

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

backgroundColor

the background color of the icon. Default is Color.Transparent.


constructor(imageVector: ImageVector, tint: Color? = null, contentDescription: String? = "", backgroundColor: Color = Color.Transparent)

Constructor for creating an icon from an image vector.

Parameters

imageVector

the image vector of the icon.

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

backgroundColor

the background color of the icon. Default is Color.Transparent.


constructor(tint: Color? = null, contentDescription: String? = "", backgroundColor: Color = Color.Transparent, painterBuilder: @Composable () -> Painter)

Constructor for creating an icon from a painter.

Parameters

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

backgroundColor

the background color of the icon. Default is Color.Transparent.

painterBuilder

a composable function that returns a Painter to draw the icon.


constructor(url: String, contentDescription: String? = "", tint: Color? = null, backgroundColor: Color = Color.Transparent, placeholderResId: Int? = null, errorResId: Int? = null, contentScale: ContentScale = ContentScale.Fit)

Constructor for creating an icon from a URL.

Parameters

url

the URL of the icon.

tint

the tint color of the icon.

contentDescription

the content description that will be played by Accessibility service.

backgroundColor

the background color of the icon. Default is Color.Transparent.

placeholderResId

the resource id of the placeholder icon when loading from URL.

errorResId

the resource id of the error icon when loading from URL fails.


constructor(drawable: Drawable, contentDescription: String? = "", tint: Color? = null, backgroundColor: Color = Color.Transparent)