Fixed
Status Update
Comments
jg...@google.com <jg...@google.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
ja...@skrasek.com <ja...@skrasek.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
ja...@skrasek.com <ja...@skrasek.com> #5
Hi, were you able to reproduce it?
je...@google.com <je...@google.com> #6
Hi
Yes, we were able to reproduce it and are looking into it now. Thanks for reaching out to us!
Yes, we were able to reproduce it and are looking into it now. Thanks for reaching out to us!
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #7
Current hypothesis: looks like SwipeRefreshLayout should call requestDisallowInterceptTouchEvent during the gesture. If that's indeed the case, we'll need to fix SwipeRefreshLayout instead.
je...@google.com <je...@google.com> #8
Seems to have been the problem indeed. A fix is on it's way, not sure when it will land yet.
th...@gmail.com <th...@gmail.com> #9
My ViewPager2 is placed in a CoordinatorLayout with a collapsing toolbar. The Fragments in the ViewPager2 have RecyclerViews. It is almost impossible to scroll vertically because the view pager will just try to scroll horizontally. Is this behaviour related to this issue? My layout looks like this:
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.widget.Toolbar/>
<com.google.android.material.tabs.TabLayout/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2/> <!-- this ViewPager2 contains Fragments with RecyclerViews -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.appbar.CollapsingToolbarLayout>
<androidx.appcompat.widget.Toolbar/>
<com.google.android.material.tabs.TabLayout/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager2.widget.ViewPager2/> <!-- this ViewPager2 contains Fragments with RecyclerViews -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
je...@google.com <je...@google.com> #10
That might be related to https://issuetracker.google.com/issues/133032785 . Can you see if the workaround suggested there works for you?
ja...@skrasek.com <ja...@skrasek.com> #11
The workaround helps to make it usable, though the behavior is still quite different:
It is now possible do also "page-swipe" during the "swipe-refresh gesture" simultaneously.
(E.g. start refresh first, then swipe to side. Otherwise it is ok - cannot do refresh swipe during page-swipe.)
It is now possible do also "page-swipe" during the "swipe-refresh gesture" simultaneously.
(E.g. start refresh first, then swipe to side. Otherwise it is ok - cannot do refresh swipe during page-swipe.)
th...@gmail.com <th...@gmail.com> #12
The workaround doesn't appear to help for my issue in comment #9 , unfortunately. The view pager is still too sensitive for swipes, which makes scrolling in the nested Fragment really hard. This is probably the same behaviour for the SwipeRefreshLayout.
je...@google.com <je...@google.com>
ja...@skrasek.com <ja...@skrasek.com> #13
Just tried latest versions:
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
implementation "androidx.viewpager2:viewpager2:1.0.0-alpha06"
and it is not fixed for me, as stated earlier. Is it fixed in some unreleased version? (AFAIK it is not)
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02"
implementation "androidx.viewpager2:viewpager2:1.0.0-alpha06"
and it is not fixed for me, as stated earlier. Is it fixed in some unreleased version? (AFAIK it is not)
at...@onedaycat.com <at...@onedaycat.com> #14
using "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02" doesn't fix for me
this is my layout hierarchy
RecyclerView --- inside ---> SwipeRefreshLayout --- fragment inside- --> ViewPager2 --- inside ---> TabBarLayot
this is my layout hierarchy
RecyclerView --- inside ---> SwipeRefreshLayout --- fragment inside- --> ViewPager2 --- inside ---> TabBarLayot
je...@google.com <je...@google.com> #15
I have confirmed that when the items of a ViewPager2 consist of a RecyclerView nested inside a SwipeRefreshLayout, where the orientation of the RV is perpendicular to the orientation of the VP2, then the swipe-to-refresh gesture is interrupted by moving in the direction of VP2's orientation.
We will have to look into the issue to see what is going on, if it is intended behavior or a bug, and how to work around and fix it.
We will have to look into the issue to see what is going on, if it is intended behavior or a bug, and how to work around and fix it.
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #16
This is a bug in RecyclerView (RV), related to nested scrolling.
What happens is that when RV dispatches a nested scroll, the SwipeRefreshLayout (SRL) consumes it and RV doesn't scroll. Because RV doesn't scroll, it doesn't call "getParent().requestDisallowInterceptTouchEvent(true)" (that is the bug), and because of that the parent ViewPager2 (VP2) is still allowed to start moving horizontally when the horizontal touch slop is overcome.
This will be fixed in recyclerview, stay tuned.
What happens is that when RV dispatches a nested scroll, the SwipeRefreshLayout (SRL) consumes it and RV doesn't scroll. Because RV doesn't scroll, it doesn't call "getParent().requestDisallowInterceptTouchEvent(true)" (that is the bug), and because of that the parent ViewPager2 (VP2) is still allowed to start moving horizontally when the horizontal touch slop is overcome.
This will be fixed in recyclerview, stay tuned.
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ae0d62aa0196beac0d56acfa5e752f6614a4f839
Author: Jelle Fresen <jellefresen@google.com>
Date: Mon Jul 15 21:00:52 2019
Disallow intercept touch after nested scroll consumed
RecyclerView now calls requestDisallowInterceptTouchEvent(true) on its
parent when a nested scrolling parent consumed (part of) the scroll,
even when RecyclerView itself doesn't move.
Moved SwipeInjector and TranslatedCoordinatesProvider from
:swiperefreshlayout to :internal-testutils for reuse.
Bug: 131115697
Test: ./gradlew recyclerview:recyclerview:cC
Change-Id: I5b13eae54861263648c047a2b3cd68f7f3634846
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewNestedScrolling3RequestDisallowInterceptTouchTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
D swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeInjector.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInHorizontallyScrollingParentTest.java
A testutils/src/main/java/androidx/testutils/SwipeInjector.java
M testutils/src/main/java/androidx/testutils/TranslatedCoordinatesProvider.java
https://android-review.googlesource.com/1055911
https://goto.google.com/android-sha1/ae0d62aa0196beac0d56acfa5e752f6614a4f839
Branch: androidx-master-dev
commit ae0d62aa0196beac0d56acfa5e752f6614a4f839
Author: Jelle Fresen <jellefresen@google.com>
Date: Mon Jul 15 21:00:52 2019
Disallow intercept touch after nested scroll consumed
RecyclerView now calls requestDisallowInterceptTouchEvent(true) on its
parent when a nested scrolling parent consumed (part of) the scroll,
even when RecyclerView itself doesn't move.
Moved SwipeInjector and TranslatedCoordinatesProvider from
:swiperefreshlayout to :internal-testutils for reuse.
Bug: 131115697
Test: ./gradlew recyclerview:recyclerview:cC
Change-Id: I5b13eae54861263648c047a2b3cd68f7f3634846
A recyclerview/recyclerview/src/androidTest/java/androidx/recyclerview/widget/RecyclerViewNestedScrolling3RequestDisallowInterceptTouchTest.java
M recyclerview/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java
D swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeInjector.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInHorizontallyScrollingParentTest.java
A testutils/src/main/java/androidx/testutils/SwipeInjector.java
M testutils/src/main/java/androidx/testutils/TranslatedCoordinatesProvider.java
je...@google.com <je...@google.com> #18
Will be released in androidx.recyclerview:recyclerview:1.1.0-beta02
Description
(Tabs are horizontally laid out, swipe-refresh is vertical)
This worked in ViewPager.
Used version: androidx.viewpager2:viewpager2:1.0.0-alpha03
Not sure if its related to