Status Update
Comments
rv...@google.com <rv...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
on...@jacon.cz <on...@jacon.cz> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
al...@gmail.com <al...@gmail.com> #4
rv...@google.com <rv...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
rv...@google.com <rv...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit ee78f0dd46533f9b9cd7e0e588d1c09b19f87785
Author: Ralston Da Silva <ralu@google.com>
Date: Fri Jun 02 13:40:26 2023
FocusRestorer API
Adds an api to restore focus to a previously focused child
Bug: 283243426
Bug: 235681940
Bug: 235691035
Bug: 272302679
Bug: 275157318
Test: ./gradlew compose:ui:ui:cC -P android.testInstrumentationRunnerArguments.package=androidx.compose.ui.focus.FocusRestorerTest
Test: ./gradlew compose:ui:ui:cC -P android.testInstrumentationRunnerArguments.package=androidx.compose.ui.focus.RestoreFocusTest
Relnote: "Added FocusRequester.saveFocusedChild and FocusRequester.restoreFocusedChild"
Change-Id: Ic557eaacc4b5c5fe9f908c5afcc86fc5e84f2bac
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
A compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/focus/FocusRestorationDemo.kt
M compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/FocusSamples.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/FocusRestorerTest.kt
A compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/focus/RestoreFocusTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusRequester.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusRequesterModifierNode.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusRestorer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/focus/FocusTargetNode.kt
vr...@gmail.com <vr...@gmail.com> #7
Which version will this change be part of?
al...@gmail.com <al...@gmail.com> #8
vi...@google.com <vi...@google.com> #9
FocusGroup
was a stop-gap, which is no longer preferred. FocusRestorer
is part of compose-foundation 1.6.0-alpha*
.
You can find examples of how to use FocusRestorer
in
Backhandler
should work with FocusRestorer
.
Also, please refer to this
[Deleted User] <[Deleted User]> #10
I continue to have problems with moving focus to first element in an unexplored row if I scroll the list. For example: I have a TvLazyColumn and it contains a list of TvLazyRow. For the first Rows all is ok, the focus goes on the first element and if I move up and down the focus is restored. But, if I scroll the entire list, for one of the new rows the focus is moved to another position like the position of an older row. It rememeber the focus.
Row 1 focus ok Row 2 focus ok Row 3 focus ok .... Row 10 it get focus of row 1 Row 11 gets focus of row 2 and so on
Description
Version used: 1.0.0-alpha05
When set some TvLazyRow into TvLazyColumn, the below problem is occurred
Item is focused according to changing direction by D-PAD. When changes from a current row to another, leanback keeps state current row item and starts from first index in new row list, but in compose android framework finds nearest focusable item and this item is focused