← Back to Tv Material
WideCardLayout
Overview
Examples
Community Notes
Video
WideCardLayout is an opinionated TV Material Card layout with an image and text content to show information about a subject.
It provides a horizontal layout with an image card slot at the start, followed by the title, subtitle and description at the end.
@param imageCard defines the Composable to be used for the image card. See CardLayoutDefaults.ImageCard to create an image card. The interactionSource
param provided in the lambda function should to be forwarded and used with the image card composable. @param title defines the Composable title placed below the image card in the CardLayout. @param modifier the Modifier to be applied to this CardLayout. @param subtitle defines the Composable supporting text placed below the title in CardLayout. @param description defines the Composable description placed below the subtitle in CardLayout. @param contentColor CardLayoutColors defines the content color used in the CardLayout for different interaction states. See CardLayoutDefaults.contentColor. @param interactionSource the MutableInteractionSource representing the stream of Interactions for this CardLayout. You can create and pass in your own remember
ed instance to observe Interactions and customize the appearance / behavior of this card layout in different states. This interaction source param would also be forwarded to be used with the imageCard
composable.
Overloads
WideCardLayout
@ExperimentalTvMaterial3Api
@Composable
fun WideCardLayout(
imageCard: @Composable (interactionSource: MutableInteractionSource) -> Unit,
title: @Composable () -> Unit,
modifier: Modifier = Modifier,
subtitle: @Composable () -> Unit = {},
description: @Composable () -> Unit = {},
contentColor: CardLayoutColors = CardLayoutDefaults.contentColor(),
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }
)
Parameters
Name | Description |
---|---|
imageCard | defines the Composable to be used for the image card. See CardLayoutDefaults.ImageCard to create an image card. The interactionSource param provided in the lambda function should to be forwarded and used with the image card composable. |
title | defines the Composable title placed below the image card in the CardLayout. |
modifier | the Modifier to be applied to this CardLayout. |
subtitle | defines the Composable supporting text placed below the title in CardLayout. |
description | defines the Composable description placed below the subtitle in CardLayout. |
contentColor | CardLayoutColors defines the content color used in the CardLayout for different interaction states. See CardLayoutDefaults.contentColor. |
interactionSource | the MutableInteractionSource representing the stream of Interactions for this CardLayout. You can create and pass in your own remember ed instance to observe Interactions and customize the appearance / behavior of this card layout in different states. This interaction source param would also be forwarded to be used with the imageCard composable |