Status Update
Comments
to...@gtempaccount.com <to...@gtempaccount.com> #2
Branch: androidx-main
commit 06035833f0e98b6116774b743c75c2cc7c334326
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 15:52:36 2021
Create @AppCompatShadowedAttributes
This annotation is restricted to intra-androidx library usage. When
applied to a View in AppCompat, it will direct the annotation processor
to infer shadowed attributes for the View based on what interfaces from
Core it implements, e.g.: TintableBackgroundView.
Test: N/A
Relnote: Improved AppCompat support
Bug: 188446121
Change-Id: I2d7387a017585bcea14a8d8a857b9b60930bc1c5
M resourceinspection/resourceinspection-annotation/api/restricted_current.txt
A resourceinspection/resourceinspection-annotation/src/main/java/androidx/resourceinspection/annotation/AppCompatShadowedAttributes.java
jg...@google.com <jg...@google.com> #3
Branch: androidx-main
commit 42f9ba7d4ccd46960123b403df5ca28803643059
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 17:41:24 2021
Refactor resource inspection processor model
Extract an Attribute interface to generate code for either shadowed or
annotated regular attributes.
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: I131f017c433ec9e44a6fb364c903467894735377
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/InspectionCompanionGeneration.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/LayoutInspectionStep.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/Models.kt
jg...@google.com <jg...@google.com> #4
Branch: androidx-main
commit 49d18d3f7b42f7a5675357bd51fa4ff22ac0b5d5
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 18:51:33 2021
Shadowed attributes annotation processing
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: Icf4eb2cab92ccde42daf583566f0ce7aca6d6d34
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/LayoutInspectionStep.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/Models.kt
M resourceinspection/resourceinspection-processor/src/test/kotlin/androidx/resourceinspection/processor/ResourceInspectionProcessorTest.kt
to...@gtempaccount.com <to...@gtempaccount.com> #5
Branch: androidx-main
commit 6b505f5fbaa249d03647cfa5f236bea9a2967a12
Author: Ember Rose <emberrose@google.com>
Date: Tue May 18 12:31:44 2021
Document shadowed attribute interfaces
Test: N/A (docs)
Bug: 188446121
Change-Id: I025fe8f50202c9a30a0bcfcd24cd63047f9b4c75
M core/core/src/main/java/androidx/core/view/TintableBackgroundView.java
M core/core/src/main/java/androidx/core/widget/AutoSizeableTextView.java
M core/core/src/main/java/androidx/core/widget/TintableCheckedTextView.java
M core/core/src/main/java/androidx/core/widget/TintableCompoundButton.java
M core/core/src/main/java/androidx/core/widget/TintableCompoundDrawablesView.java
M core/core/src/main/java/androidx/core/widget/TintableImageSourceView.java
M resourceinspection/resourceinspection-annotation/src/main/java/androidx/resourceinspection/annotation/AppCompatShadowedAttributes.java
jg...@google.com <jg...@google.com> #6
Branch: androidx-main
commit 575674b572525f2ae8626306eab2a2cd264a7246
Author: Ember Rose <emberrose@google.com>
Date: Tue May 18 17:53:29 2021
Covert test dependencies to runtime only
Compile testing needs these dependencies to be on the runtime
classpath, but they're not needed on the implementation classpath.
(All use is in source strings or code generated in the test itself.)
This keeps the implementation classpath clean.
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: I0332d8049a3fb0e22b7565d9f98cc56a8dbe3783
M resourceinspection/resourceinspection-processor/build.gradle
jg...@google.com <jg...@google.com> #7
This should be available in appcompat:1.4.0-alpha02 and resourceinpsection:1.0.0-alpha02
jg...@google.com <jg...@google.com> #8
Branch: androidx-main
commit 1bc6fdbb39da2551ddbf94e3d96ff3cd35c8779d
Author: Ember Rose <emberrose@google.com>
Date: Thu May 20 16:36:24 2021
Resourece Inspection 1.0.0-alpha02
Test: N/A
Bug: 188446121
Change-Id: I76330dac3210b000842ad8151d8cd2ddf9f2227a
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
to...@gtempaccount.com <to...@gtempaccount.com> #9
After some investigation, it seems to be the SwipeRefreshLayout that is the culprit.
In the example that works fine that you provided me (
The heirachy in the video above for the child fragment is pretty simple
<SwipeRefreshLayout>
<ConstraintLayout>
<CustomErrorView/>
<RecyclerView/>
</ConstraintLayout>
</SwipeRefreshLayout>
I can cofirm when I remove the SwipeRefreshLayout, it works as intended.
je...@google.com <je...@google.com> #10
In this particular case, you will only need the bugfix of RecyclerView, because with this view hierarchy RV is driving the nested scroll.
In the absence of a scrolling child in SRL, you would need the bugfix of SRL.
If you have any other scrolling child in SRL, that component either already does the right thing or needs to be fixed similar to how RV was fixed. To the best of my knowledge, the most likely candidate, NestedScrollView, already does the right thing.
Original issue:
[1]
[2]
je...@google.com <je...@google.com> #11
to...@gtempaccount.com <to...@gtempaccount.com> #12
I started using both 1.1.0-beta02 for recyclerview and 1.1.0-alpha02 for swiperefreshlayout, but unfortunately, still not working.
The only way I can get scroll behaviour as predicted, is it if remove the SwipeRefreshLayout all together.
to...@gtempaccount.com <to...@gtempaccount.com> #13
jg...@google.com <jg...@google.com> #14
Probably the easiest way to do it is to modify our sample [1], but any self-contained sample that'd allow us to reproduce the issue would be great.
[1]
to...@gtempaccount.com <to...@gtempaccount.com> #15
jg...@google.com <jg...@google.com>
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #16
to...@gtempaccount.com <to...@gtempaccount.com> #17
ap...@google.com <ap...@google.com> #18
Branch: androidx-master-dev
commit 6a9efe2e5b9ad406f486b5c4999fd6c119eb59fa
Author: Jelle Fresen <jellefresen@google.com>
Date: Tue Aug 27 14:56:12 2019
Improve SwipeRefreshLayout test
Fixes/improvements in
SwipeRefreshLayoutInHorizontallyScrollingParentTest:
- Make sibling pages non-zero size
- Calculates 'gesture distance' correctly
- Accounts for touch slop when performing gesture
- Asserts that requestDisallowInterceptTouchEvent(true) is called
- Speeds up the gesture
Bug: 138314213
Test: ./gradlew swiperefreshlayout:cC
Change-Id: I00a5f73ef0c54f41034cdacd023b8348e133384c
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInHorizontallyScrollingParentTest.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInRecyclerViewActivity.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeToRefreshLayoutRequestDisallowInterceptTest.java
to...@gtempaccount.com <to...@gtempaccount.com> #19
Just to confirm, I have tried the new update (beta-04) and the issue persists.
je...@google.com <je...@google.com> #20
In the mean time, it might be possible to work around the issue by extending SwipeRefreshLayout and overriding "requestDisallowInterceptTouchEvent" with the following implementation:
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
// Ignore here, but pass it up to our parent
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(b);
}
}
Does that solve the problem for now?
ap...@google.com <ap...@google.com> #21
Branch: androidx-master-dev
commit 6d5f435733bf7c9975d1b8064605a237fe6086a9
Author: Jelle Fresen <jellefresen@google.com>
Date: Fri Aug 23 10:53:45 2019
Don't ignore requestDisallowInterceptTouchEvent in SRL
A SwipeRefreshLayout ignored calls to requestDisallowInterceptTouchEvent
when nested scrolling was not enabled in its child, but there is no good
reason why it shouldn't propagate the call to its parents. It is OK for
SRL itself to dishonor the request, as one can always use
OnChildScrollUpCallback to control cooperation with scrolls in children.
Bug: 138314213
Test: ./gradlew swiperefreshlayout:cC
Change-Id: I4959df942ebb2097f3c3ebe39ff0582f6ae6f395
M swiperefreshlayout/api/1.1.0-alpha03.txt
M swiperefreshlayout/api/current.txt
M swiperefreshlayout/api/public_plus_experimental_1.1.0-alpha03.txt
M swiperefreshlayout/api/public_plus_experimental_current.txt
M swiperefreshlayout/api/restricted_1.1.0-alpha03.txt
M swiperefreshlayout/api/restricted_current.txt
M swiperefreshlayout/build.gradle
M swiperefreshlayout/src/androidTest/AndroidManifest.xml
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/RequestDisallowInterceptRecordingRecyclerView.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInRecyclerViewBaseActivity.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInRecyclerViewWithRecyclerViewChildActivity.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInRecyclerViewWithSimpleChildActivity.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInScrollingParentAndChildTest.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInScrollingParentBaseTest.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutInScrollingParentTest.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutRequestDisallowInterceptAsChildAndParentTest.java
A swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutRequestDisallowInterceptAsChildTest.java
M swiperefreshlayout/src/androidTest/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayoutRequestDisallowInterceptBaseTest.java
M swiperefreshlayout/src/main/java/androidx/swiperefreshlayout/widget/SwipeRefreshLayout.java
je...@google.com <je...@google.com> #22
ji...@careem.com <ji...@careem.com> #23
<swiperefreshlayout>
<recycler>
</swiperefreshlayout>
still getting this error
ji...@careem.com <ji...@careem.com> #24
je...@google.com <je...@google.com> #25
I think you ran into
c....@gmail.com <c....@gmail.com> #26
ContainerFragment;
<androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.tabs.TabLayout/>
<androidx.viewpager2.widget.ViewPager2/>
</androidx.constraintlayout.widget.ConstraintLayout>
InnerFragment;
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<FrameLayout android:nestedScrollingEnabled="true">
<androidx.recyclerview.widget.RecyclerView/>
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
constraintLayoutVersion = "1.1.3"
viewPager2 = "1.1.0-alpha01"
swipeRefreshLayoutVersion = "1.2.0-alpha01"
recyclerViewVersion = "1.2.0-alpha05"
je...@google.com <je...@google.com> #27
I'm having trouble understanding the video. Maybe you could record it again, going a bit slower than this? In particular, I can't work out if the list is scrolling up or down because the scrolls happen at a high speed and follow each other in rapid succession; I can't work out the used gestures because the contact time with the screen is very short; and consequently I wasn't able to see the occurrence of the bug. It will also be helpful to turn on the debug option "Pointer location" (next to "Show taps", which I see you already turned on) so it's easier to work out what gestures you make while reproducing the issue.
Description
I am afraid a sample will not explain this. However, ViewPager2 seems to be more sensitive (compared to ViewPager) to small variations while scrolling a RecyclerView that is in a Fragment that is part of ViewPager2.
I have started to new project and implemented ViewPager2. It does not feel natural when scrolling a page up or down. It changes tabs when there is a small left or right drag in your pull.
I have implement same project with original ViewPager it is more natural, it does not switch tabs unless you pull left or Right.
While it was really bad in 1.0.0-alpha06, it did get better in 1.0.0-beta02