mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-19 19:41:35 +08:00
Instead of sending a ACTION_CANCEL event only to the last child that returned true from its Behavior.onTouchEvent / onInterceptTouchEvent, send that to all the child views so that they can cancel whatever tracking logic they might have. Add a test that covers the specific case of HorizontalScrollView in AppBarLayout that starts intercepting a horizontal swipe. Also fix behavior for bottom sheet that wasn't "ready" to get cancel events during the window attach phase. Test: ./gradlew design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.AppBarHorizontalScrollingTest Test: ./gradlew design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.class=android.support.design.widget.AppBarWithCollapsingToolbarTest Test: ./gradlew design:connectedCheck --info --daemon -Pandroid.testInstrumentationRunnerArguments.package=android.support.design.widget Bug: 33824951 Change-Id: Ida605ab53cc156c44d9cc8b14fb8ce7a024b18c5 PiperOrigin-RevId: 174240782