tv-samples
tv-samples copied to clipboard
Immersive list doesn't scroll to the top of the screen when expending
When utilizing the immersive list component on Android TV, the row expands upon selection. However, it fails to scroll to the top of the screen, resulting in the ImmersiveListScope occupying only half of the screen.
use library: implementation "androidx.tv:tv-material:1.0.0-beta01"
ImmersiveList(
selectedMovie = selectedMovie,
isListFocused = isListFocused,
movieList = movieList,
sectionTitle = title,
onMovieClick = onMovieClick,
parentItem = parentItem,
onViewMoreClick = onViewMoreClick,
onMovieFocused = {
selectedMovie = it
},
onFocusChanged = {
isListFocused = it.hasFocus
},
modifier = modifier.bringIntoViewIfChildrenAreFocused(
PaddingValues(bottom = 80.dp)
)
)