Skip to content

Commit

Permalink
Merge pull request #294 from dhis2/ANDROAPP-6309-mobile-ui-Adapt-curr…
Browse files Browse the repository at this point in the history
…ent-list-card-for-relationships-and-maps

fix: [ANDROAPP-6390]: showcase app horizontal list card screen improvements
  • Loading branch information
xavimolloy authored Sep 4, 2024
2 parents 944950f + 6944cc5 commit 4ecde28
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 4ecde28

Please sign in to comment.