Skip to content

Commit

Permalink
fix: [ANDROAPP-6390]: showcase app horizontal list card screen improv…
Browse files Browse the repository at this point in the history
…ements
  • Loading branch information
xavimolloy committed Sep 2, 2024
1 parent 944950f commit 6944cc5
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,37 @@ import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor

@Composable
fun ListCardScreen(horizontal: Boolean) {
if (horizontal) {
LazyRow(
modifier = Modifier.heightIn(0.dp, 500.dp),
horizontalArrangement = spacedBy(4.dp),
verticalAlignment = Alignment.Top,
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 16.dp),
) {
items(count = 4) { index ->
ListCard(
listCardState = rememberListCardState(
title = ListCardTitleModel(text = "Palak Khanna, F, 61"),
lastUpdated = "5 hours",
additionalInfoColumnState = rememberAdditionalInfoColumnState(
additionalInfoList = largeItemList,
syncProgressItem = syncProgressItem(),
scrollableContent = true,
ColumnScreenContainer(title = if (horizontal) Cards.LIST_CARD_HORIZONTAL.label else Cards.LIST_CARD.label) {
if (horizontal) {
LazyRow(
modifier = Modifier.heightIn(0.dp, 500.dp),
horizontalArrangement = spacedBy(4.dp),
verticalAlignment = Alignment.Top,
contentPadding = PaddingValues(vertical = 4.dp, horizontal = 16.dp),
) {
items(count = 4) { index ->
ListCard(
listCardState = rememberListCardState(
title = ListCardTitleModel(text = "Palak Khanna, F, 61"),
lastUpdated = "5 hours",
additionalInfoColumnState = rememberAdditionalInfoColumnState(
additionalInfoList = largeItemList,
syncProgressItem = syncProgressItem(),
scrollableContent = true,
),
loading = false,
),
loading = false,
),
modifier = Modifier.fillParentMaxWidth(),
listAvatar = {
Avatar(
style = AvatarStyleData.Text("$index"),
)
},
onCardClick = {},
)
modifier = Modifier.fillParentMaxWidth(),
listAvatar = {
Avatar(
style = AvatarStyleData.Text("$index"),
)
},
onCardClick = {},
)
}
}
}
} else {
ColumnScreenContainer(title = Cards.LIST_CARD.label) {
} else {
var showLoading1 by remember {
mutableStateOf(false)
}
Expand Down

0 comments on commit 6944cc5

Please sign in to comment.