Status Update
Comments
rv...@google.com <rv...@google.com> #2
In a mobile device, the scrolling is performed by the swipe gesture whereas, on Tv, scrolling is performed using the 'D-PAD' buttons. When we long-press the D-PAD buttons to do a fast scroll, the scrolling didn't appear to be smooth. This was flagged by our designer @gsid. We experimented with a bunch of animations and found that the one that we have currently, makes the fast scroll appear smooth.
The scrolling looks great on an emulator but when we do it on an actual TV device, it didn't look smooth. It could be because TV devices have very low RAM.
We will test this behaviour with the latest BIV changes and then we can see if we need any custom animation.
rv...@google.com <rv...@google.com> #3
We have tested the new BringIntoView Spec with LazyList and LazyGrid and the animation looks good with spring
animation today.
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit fb6b9812afe2e38f1b2486379542bc827c535fc9
Author: Levi Albuquerque <levima@google.com>
Date: Thu May 30 10:05:16 2024
Deprecate animation spec in BringIntoViewSpec.
According to
Bug: 332674072
Relnote: Deprecate animationSpec in BringIntoViewSpec
Test: Previous tests should pass.
Change-Id: Iffce5910aee5a647f4c7be66a34168db7789cda0
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/relocation/BringIntoViewScrollableInteractionTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/gestures/BringIntoViewSpec.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/BringIntoViewSpec.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/ContentInViewNode.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/LazyLayoutPager.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/ScrollableWithPivot.kt
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit 88461a963819511ee65cca1eb45fcddbbe719fbc
Author: rvighnesh <rvighnesh@google.com>
Date: Tue May 14 22:53:12 2024
feat: deprecate lazy layout forks from tv-foundation
Since the BringIntoViewSpec has been introduced, we can use that to
control the focused item's position while scrolling, on a tv device.
I will update the samples in a follow-up CL.
Bug: 332674072
Test: Not applicable
Relnote: Tv Lazy Layouts have been deprecated from tv-foundation library
Change-Id: I0855f36b41cf8bc374e8e69ac5faeabfefc97aa9
M tv/integration-tests/playground/src/main/java/androidx/tv/integration/playground/LazyRowsAndColumns.kt
M tv/integration-tests/playground/src/main/java/androidx/tv/integration/playground/StickyHeader.kt
M tv/integration-tests/presentation/src/main/java/androidx/tv/integration/presentation/App.kt
M tv/integration-tests/presentation/src/main/java/androidx/tv/integration/presentation/AppLazyRow.kt
M tv/integration-tests/presentation/src/main/java/androidx/tv/integration/presentation/ShowsGrid.kt
M tv/tv-foundation/api/current.txt
M tv/tv-foundation/api/restricted_current.txt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/BaseLazyGridTestWithOrientation.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyArrangementsTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyCustomKeysTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridAnimateItemPlacementTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridBeyondBoundsTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridPinnableContainerTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridPrefetcherTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridSlotsReuseTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridSpanTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridsContentPaddingTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridsIndexedTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyGridsReverseLayoutTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyNestedScrollingTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyScrollAccessibilityTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazyScrollTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/LazySemanticsTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/grid/TvLazyGridLayoutInfoTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/BaseLazyListTestWithOrientation.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyArrangementsTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyColumnTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyCustomKeysTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListAnimateItemPlacementTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListBeyondBoundsTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListHeadersTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListLayoutInfoTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListPinnableContainerTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListPrefetcherTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListSlotsReuseTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListsContentPaddingTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListsIndexedTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyListsReverseLayoutTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyNestedScrollingTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyRowTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazyScrollTest.kt
M tv/tv-foundation/src/androidTest/java/androidx/tv/foundation/lazy/list/LazySemanticsTest.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/PivotOffsets.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/ScrollableWithPivot.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGrid.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridAnimateScrollScope.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridDsl.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridItemProvider.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridMeasure.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridMeasuredItem.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridMeasuredLine.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridSpan.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazyGridSpanLayoutProvider.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/LazySemantics.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridItemInfo.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridItemScope.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridItemScopeImpl.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridLayoutInfo.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridMeasureResult.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridScopeMarker.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/grid/TvLazyGridState.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/layout/LazyLayoutSemantics.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyBeyondBoundsModifier.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyDsl.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyList.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListAnimateScrollScope.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListItemProvider.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListMeasure.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListMeasureResult.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListMeasuredItem.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazyListState.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/LazySemantics.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListIntervalContent.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListItemInfo.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListItemScope.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListItemScopeImpl.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListLayoutInfo.kt
M tv/tv-foundation/src/main/java/androidx/tv/foundation/lazy/list/TvLazyListScopeMarker.kt
rv...@google.com <rv...@google.com> #6
Closing this ticket as we have now deprecated TvLazyRow
, TvLazyColumn
, TvHorizontalGrid
and TvVerticalGrid
.
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-foundation:1.0.0-alpha11
Description
However, as was discussed in
For those reasons, we are not even sure that the animation spec should be customizable at all, we will be promoting BringIntoViewSpec api in the next release and we would be in favour of removing this property from the api at all before doing so.
What I propose is we try to reevaluate the defaults we have. Try to understand why it was needed for you to update this animation spec and maybe our default is just incorrect, so we need to update it for both tv an non tv targets.