From ee47642fe3899cc6fbbd37710cd15dd9c9db6bc8 Mon Sep 17 00:00:00 2001 From: YvesKalume Date: Wed, 17 Aug 2022 06:37:35 +0200 Subject: [PATCH] fix : put spacers in one item and fill up the entire span --- .../apps/nowinandroid/feature/foryou/ForYouScreen.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt index 42f6bfc29..4e0668027 100644 --- a/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt +++ b/feature-foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt @@ -48,7 +48,6 @@ import androidx.compose.foundation.lazy.grid.LazyHorizontalGrid import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items import androidx.compose.foundation.lazy.grid.rememberLazyGridState -import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.CornerSize import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.ExperimentalMaterial3Api @@ -205,11 +204,9 @@ fun ForYouScreen( loadingContentDescription = R.string.for_you_loading ) - item { + item(span = { GridItemSpan(maxLineSpan) }) { + Column { Spacer(modifier = Modifier.height(8.dp)) - } - - item { Spacer(Modifier.windowInsetsBottomHeight(WindowInsets.safeDrawing)) } }