FioriIcon

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

Data class for an icon.

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.

Constructors

Link copied to clipboard
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)
constructor(resId: Int, tint: Color? = null, contentDescription: String? = "", backgroundColor: Color = Color.Transparent)

Constructor for creating an icon from a resource id.

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

Constructor for creating an icon from a bitmap.

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

Constructor for creating an icon from an image vector.

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

Constructor for creating an icon from a painter.

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.

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

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resId: Int?
Link copied to clipboard
val tint: Color?
Link copied to clipboard
val url: String?

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open override fun toPainter(placeholderResId: Int? = null, errorResId: Int? = null): Painter

Convert the icon to a Painter.

Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)