android / tv-samples

Multiple samples showing best practices in app development on Android TV.
Apache License 2.0
1.05k stars 332 forks source link

Immersive list doesn't scroll to the top of the screen when expending #112

Closed DriesDingenen closed 11 months ago

DriesDingenen commented 1 year ago

[JetStreams]

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.

immersive_list_bug

DriesDingenen commented 1 year ago

It has something to do with the pivotOffsetForImmersiveList. If you change the: val pivotOffset = remember { PivotOffsets() } to: val pivotOffset = remember { PivotOffsets(0f, 0f) } it is correct, but the pivot doesn't update when focus changes

DriesDingenen commented 1 year ago

https://issuetracker.google.com/issues/256678892

vighnesh153 commented 1 year ago

Thanks for the report. This is a known issue and happens when it gains focus. If you go to previous or next item, it does move to the top of the screen.