Fixed
Status Update
Comments
ig...@jetbrains.com <ig...@jetbrains.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
je...@google.com <je...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ig...@jetbrains.com <ig...@jetbrains.com> #4
deleted
ig...@jetbrains.com <ig...@jetbrains.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
je...@google.com <je...@google.com> #6
On second thought, I think you're right. It does make more sense if scroll(2f)
yields a scrollDelta
of 2f. Will update my review accordingly
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit f7459926705b1c79810fa321844f060d2d4276f1
Author: Igor Demin <igor.demin@jetbrains.com>
Date: Thu Apr 21 17:35:32 2022
Invert delta in MouseInjectionScope.scroll for vertical scroll
Similar tohttps://android-review.googlesource.com/c/platform/frameworks/support/+/1913489
Bug: 224992993
RelNote: MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward)
Test: ./gradlew buildOnServer
Change-Id: Ifb697a9ae8bc05a2d54d0a6cb4018713e156baf8
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/InputDispatcher.kt
M compose/ui/ui-test/src/test/kotlin/androidx/compose/ui/test/inputdispatcher/MouseEventsTest.kt
M compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/AndroidInputDispatcher.android.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/MouseInjectionScope.kt
https://android-review.googlesource.com/2071209
Branch: androidx-main
commit f7459926705b1c79810fa321844f060d2d4276f1
Author: Igor Demin <igor.demin@jetbrains.com>
Date: Thu Apr 21 17:35:32 2022
Invert delta in MouseInjectionScope.scroll for vertical scroll
Similar to
Bug: 224992993
RelNote: MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward)
Test: ./gradlew buildOnServer
Change-Id: Ifb697a9ae8bc05a2d54d0a6cb4018713e156baf8
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/InputDispatcher.kt
M compose/ui/ui-test/src/test/kotlin/androidx/compose/ui/test/inputdispatcher/MouseEventsTest.kt
M compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/AndroidInputDispatcher.android.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/ScrollableTest.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/MouseInjectionScope.kt
Description
Jetpack Compose version: 3621f0a7 Jetpack Compose component used: performMouseInput, scroll
Inhttps://android-review.googlesource.com/c/platform/frameworks/support/+/1913489 we inverted vertical mouse scroll, because on Android when we scroll down (the top touch point of the wheel moves to the user), scrollX is positive, but it should be negative.
In tests when we make artificial scroll event, we should invert x axis too (to avoid confusion).
See for example the test:https://android-review.googlesource.com/c/platform/frameworks/support/+/1994356/3/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/OnPointerEventTest.kt#155
Now it is:
But it should be: