From 6e177fd859b347e6af1d4cbaf035e437e0e97737 Mon Sep 17 00:00:00 2001 From: Aleem92 <129393448+Aleem92@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:49:33 +0500 Subject: [PATCH] Fixed the sticky bottom padding in the profile screen (#3590) Co-authored-by: Allan Onchuru <16164649+allan-on@users.noreply.github.com> --- .../quest/ui/profile/ProfileScreen.kt | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/profile/ProfileScreen.kt b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/profile/ProfileScreen.kt index 1bcc672edd..45f37213b8 100644 --- a/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/profile/ProfileScreen.kt +++ b/android/quest/src/main/java/org/smartregister/fhircore/quest/ui/profile/ProfileScreen.kt @@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -161,15 +162,6 @@ fun ProfileScreen( } LazyColumn( state = lazyListState, - modifier = - Modifier.padding( - bottom = - if (!fabActions.isNullOrEmpty() && fabActions.first().visible) { - PADDING_BOTTOM_WITH_FAB.dp - } else { - PADDING_BOTTOM_WITHOUT_FAB.dp - }, - ), ) { item(key = profileUiState.resourceData?.baseResourceId) { ViewRenderer( @@ -180,6 +172,18 @@ fun ProfileScreen( decodeImage = decodeImage, ) } + item { + Spacer( + modifier = + Modifier.height( + if (!fabActions.isNullOrEmpty() && fabActions.first().visible) { + PADDING_BOTTOM_WITH_FAB.dp + } else { + PADDING_BOTTOM_WITHOUT_FAB.dp + }, + ), + ) + } } } }