Status Update
Comments
rv...@google.com <rv...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
on...@jacon.cz <on...@jacon.cz> #3
al...@gmail.com <al...@gmail.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
rv...@google.com <rv...@google.com> #5
Thanks for the feedback. Since this is just a sample, we haven't benchmarked it. We know that this is not the best solution. You can use the sample as a starter and do any enhancements which you feel are necessary.
We are still investigating better ways to do this. We will post here once we have an update.
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
de...@chili.com <de...@chili.com> #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