Card Cell¶
Card Cell is a list item view that can represent a Card Cell object.
Anatomy¶
A card cell consists of a title/headline, subtitle/subheadline, caption/footnote, and status/KPI/icon buttons/label button.
Example¶
![]() |
|---|
| Card Cell on a Phone |
Development¶
Card Cells are implemented entirely using Jetpack Compose, including a composable FioriHorizonTheme. To understand the fundamentals of Jetpack Compose, refer to the Android Developer's documentation.
Card Cells provide two UI components for application developers to use:
FioriCardCell– a UI component to display a single Fiori Object Cell.FioriCardCellList– a UI component to display a series of Object Cells in a horizontally scrollable list.
Usage in an Application¶
This section describes how to use Card Cell components in an application.
![]() |
|---|
| Card Cell on a Phone |
How to Create a Card Cell¶
FioriCardCell is a composable function with the following parameters:
modifier– aModifierthat is used to define the height and width of the cell.cellData– aFioriCardCellDatathat specifies the data to be displayed in the cell.onClick– alambdathat specifies thelambdafunction that can be called when the cell is clicked.colors– aFioriObjectCellColorsthat defines color use for the cell.textStyles– aFioriObjectCellTextStylesthat define thetextStylesin the cell.styles– aFioriObjectCellStylesthat define styles, such as the padding, in a cell.
@Composable
fun FioriCardCell(
modifier: Modifier = Modifier,
cellData: FioriCardCellData,
onClick: (() -> Unit)? = null,
colors: FioriObjectCellColors = FioriObjectCellDefaults.colors(),
textStyles: FioriObjectCellTextStyles = FioriObjectCellDefaults.textStyles(),
styles: FioriObjectCellStyles = FioriObjectCellDefaults.styles(),
)
FioriCardCellData is defined as follows:
data class FioriCardCellData(
override val headline: String = "",
override val avatar: FioriAvatarConstruct? = null,
override val subheadline: String? = null,
override val footnote: String? = null,
override val cellClickable: Boolean = true,
override val enabled: Boolean = true,
override var isSelected: MutableState<Boolean> = mutableStateOf(false),
override var contentDescription: String = "",
override var displaySelectBox: MutableState<Boolean> = mutableStateOf(false),
val iconActions: List<Action>? = null,
val labelButton: LabelButton? = null,
var statusInfo: List<FioriStatusInfoLabelData>? = null,
var kpi: FioriNumericKpiData? = null,
)
Fields¶
Headline¶
The headline is the main area for text content. The headline is the only mandatory content for an Object Cell. The title can be specified as follows in FioriCardCellData:
headline = ""
in FioriCardCellData
Avatar¶
The avatar provides a visual representation of the object and is specified as follows:
avatar = FioriAvatarConstruct(
hasBadge = hasBadge,
hasBorder = hasBorder,
avatarList = listOf(
FioriAvatarData(
image = FioriImage(url = ""),
), FioriAvatarData(
image = FioriImage(url = ""),
)
),
size = 18.dp,
avatarBadge = FioriIcon(
resId = R.drawable.ic_circle_unread
),
type = FioriAvatarType.DOUBLE
)
FioriAvatarConstruct is used to construct the Avatar area:
@Parcelize
data class FioriAvatarConstruct(
val type: FioriAvatarType = FioriAvatarType.SINGLE,
var avatarList: List<FioriAvatarData>,
val hasBadge: Boolean = false,
val avatarBadge: FioriIcon? = null,
val groupDisplayNumber: Int = 0,
val size: Dp = 40.dp,
val hasBorder: Boolean = false,
val borderColor: Color? = null,
val backgroundColor: Color? = null,
val shape: FioriAvatarShape = FioriAvatarShape.ROUNDEDCORNER
) : Parcelable
type– aFioriAvatarhas three types:SINGLE,DOUBLE, andGROUP.SINGLEandDOUBLEare used to display in the Avatar area.GROUPis used to display in the Avatar stack area.avatarList– aListthat containsFioriAvatarDataobjects.hasBadge– aBooleanused to display the badge or not.avatarBadge– aFioriIconused to define the badge.groupDisplayNumber– anIntused to display the number when using the group type.size– aDpused to define the Avatar area size whenAvatarTypeisSINGLEorDOUBLE.hasBorder– aBooleanused to display the Avatar border.borderColor– aColorused to define the color of the border.backgroundColor– aColoris used to display the background of the Avatar.Shape– aFioriAvatarShapeused to support two types:ROUNDEDCORNERandCIRCLE.
![]()
Subheadline¶
The subheadline is under the headline and provides additional information. The subheadline can be specified as follows:
subheadline = ""
Footnote¶
The footnote is under the subheadline and provides further information. The footnote can be specified as follows:
footnote = ""
Right Accessories¶
Users can define statuses, icon buttons, text buttons, KPIs, or nothing on the right side of the card cell. Only one right accessory can be displayed in the cell due to the limited space on the card.
![]() |
|---|
| Card Cell on a Phone |
Fiori Card Cell List¶
FioriCardCellList allows you to display Card Cells in a list. It accepts a list of FioriCardCellData as a parameter.
@Composable
fun FioriCardCellList(
modifier: Modifier = Modifier,
cellList: List<FioriCardCellData>,
onClick: ((Int, FioriCardCellData) -> Unit)? = { _, cellCommonData ->
cellCommonData.setDisplayReadIndicator(false)
},
colors: FioriObjectCellColors = FioriObjectCellDefaults.colors(),
textStyles: FioriObjectCellTextStyles = FioriObjectCellDefaults.textStyles(),
styles: FioriObjectCellStyles = FioriObjectCellDefaults.styles(),
)

