|
|
|
@ -31,6 +31,7 @@ import androidx.compose.foundation.layout.wrapContentSize
|
|
|
|
|
import androidx.compose.foundation.lazy.grid.GridCells.Adaptive
|
|
|
|
|
import androidx.compose.foundation.lazy.grid.GridItemSpan
|
|
|
|
|
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
|
|
|
|
|
import androidx.compose.foundation.lazy.grid.rememberLazyGridState
|
|
|
|
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
|
|
|
|
import androidx.compose.material3.Scaffold
|
|
|
|
|
import androidx.compose.material3.TopAppBarDefaults
|
|
|
|
@ -48,6 +49,7 @@ import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaLoadi
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.component.NiaTopAppBar
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.designsystem.icon.NiaIcons
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.ui.NewsFeedUiState
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.ui.TrackScrollJank
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.ui.newsFeed
|
|
|
|
|
|
|
|
|
|
@OptIn(ExperimentalLifecycleComposeApi::class)
|
|
|
|
@ -87,11 +89,14 @@ fun BookmarksScreen(
|
|
|
|
|
containerColor = Color.Transparent,
|
|
|
|
|
contentWindowInsets = WindowInsets(0, 0, 0, 0)
|
|
|
|
|
) { innerPadding ->
|
|
|
|
|
val scrollableState = rememberLazyGridState()
|
|
|
|
|
TrackScrollJank(scrollableState = scrollableState, stateName = "bookmarks:grid")
|
|
|
|
|
LazyVerticalGrid(
|
|
|
|
|
columns = Adaptive(300.dp),
|
|
|
|
|
contentPadding = PaddingValues(16.dp),
|
|
|
|
|
horizontalArrangement = Arrangement.spacedBy(32.dp),
|
|
|
|
|
verticalArrangement = Arrangement.spacedBy(24.dp),
|
|
|
|
|
state = scrollableState,
|
|
|
|
|
modifier = modifier
|
|
|
|
|
.fillMaxSize()
|
|
|
|
|
.testTag("bookmarks:feed")
|
|
|
|
|