Fixed
Status Update
Comments
er...@gmail.com <er...@gmail.com> #2
Project: platform/frameworks/support
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
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
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
er...@gmail.com <er...@gmail.com> #3
jg...@google.com <jg...@google.com> #4
Project: platform/frameworks/support
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 ( b/140759491 ).
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
https://android-review.googlesource.com/1288456
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
jg...@google.com <jg...@google.com> #5
Btw, as a temporary workaround before a fix is released you can probably copy-paste the FragmentStateAdapter [1] class and patch it locally?
[1]https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/viewpager2/src/main/java/androidx/viewpager2/adapter/FragmentStateAdapter.java
[1]
ch...@beyls.net <ch...@beyls.net> #6
In my case the simplest workaround was to add fragment.setMenuItemVisible(false) directly in the createFragment(position) method of my adapters, right before returning the fragment.
jg...@google.com <jg...@google.com>
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit dca177316c5d2771759641d01f956b0f49892ca7
Author: Jelle Fresen <jellefresen@google.com>
Date: Fri Jan 17 17:32:28 2020
Fix for Fragment menu visibility issue in FSA
The fragment's menu visibility is directly related to the fragment's max
lifecycle. When the max lifecycle is STARTED, the menu should not be
visible. When the max lifecycle is RESUMED, the menu should be visible.
This CL fixes the bug where a fragment that is added to the fragment
manager by FragmentStateAdapter did set the max lifecycle to STARTED,
but did not set the menu visibility to false.
Relnote: "Fixed `FragmentStateAdapter` issue with initial fragment menu
visibility when adding a fragment to the `FragmentManager`."
Bug: 144442240
Test: ./gradlew viewpager2:viewpager2:cC \
-Pandroid.testInstrumentationRunnerArguments.class=\
androidx.viewpager2.widget.FragmentLifecycleTest
Change-Id: I9d2ffa0efcb03b63eeca25f2d4e74c81446a5774
M viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt
M viewpager2/viewpager2/src/main/java/androidx/viewpager2/adapter/FragmentStateAdapter.java
https://android-review.googlesource.com/1211984
Branch: androidx-master-dev
commit dca177316c5d2771759641d01f956b0f49892ca7
Author: Jelle Fresen <jellefresen@google.com>
Date: Fri Jan 17 17:32:28 2020
Fix for Fragment menu visibility issue in FSA
The fragment's menu visibility is directly related to the fragment's max
lifecycle. When the max lifecycle is STARTED, the menu should not be
visible. When the max lifecycle is RESUMED, the menu should be visible.
This CL fixes the bug where a fragment that is added to the fragment
manager by FragmentStateAdapter did set the max lifecycle to STARTED,
but did not set the menu visibility to false.
Relnote: "Fixed `FragmentStateAdapter` issue with initial fragment menu
visibility when adding a fragment to the `FragmentManager`."
Bug: 144442240
Test: ./gradlew viewpager2:viewpager2:cC \
-Pandroid.testInstrumentationRunnerArguments.class=\
androidx.viewpager2.widget.FragmentLifecycleTest
Change-Id: I9d2ffa0efcb03b63eeca25f2d4e74c81446a5774
M viewpager2/viewpager2/src/androidTest/java/androidx/viewpager2/widget/FragmentLifecycleTest.kt
M viewpager2/viewpager2/src/main/java/androidx/viewpager2/adapter/FragmentStateAdapter.java
je...@google.com <je...@google.com>
v....@gmail.com <v....@gmail.com> #8
I think this issue relates to https://issuetracker.google.com/issues/147550812 as well and that other issue can be marked as fixed too.
Checked on 1.1.0-alpha01 and can confirm the fix.
Checked on 1.1.0-alpha01 and can confirm the fix.
ni...@gmail.com <ni...@gmail.com> #9
Comment has been deleted.
14...@gmail.com <14...@gmail.com> #10
Still having issue in alpha, when you slide very fast, icon will disappear for a while!
je...@google.com <je...@google.com> #11
Can you file a new bug for that? It sounds like that is a separate issue where for a brief period of time there none of the fragments is in RESUMED state. We'd need to figure out if that is a bug or working as intended.
Description
As a result, between the time the fragment is added and the time it becomes the new primary fragment of the ViewPager2, its menu is briefly shown at the same time as the menu of the current primary fragment, creating a visual glitch of duplicate menu items.
Fix: update the code of FragmentStateAdapter to call newFragment.setMenuItemVisible(false) right after creating the fragment using createFragment(position)