app: fix trackpad scrolling on Googlebook

On Android 14+ (including Aluminium OS on Googlebooks), trackpad
two-finger scroll gestures are dispatched as MotionEvents with
CLASSIFICATION_TWO_FINGER_SWIPE. Compose UI 1.12 translates these into
PanMove pointer events with panOffset.

However, compose-foundation was not explicitly declared and was resolved
transitively to 1.10.0 via compose-material3. In foundation 1.10.0,
TrackpadScrollingLogic did not exist yet, causing two-finger swipe
gestures to be dropped and leaving scrollable views unresponsive.

Add explicit compose-foundation and compose-animation dependencies
aligned with compose-ui (1.12.1) so all core Compose modules stay in
sync and trackpad scrolling is handled properly.

Assisted-by: Gemini 3.8 Flash
This commit is contained in:
topjohnwu
2026-10-08 06:04:45 +00:00
parent cefa2730d4
commit f25a6aa81f
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -39,6 +39,8 @@ dependencies {
// Compose
implementation(libs.compose.ui)
implementation(libs.compose.animation)
implementation(libs.compose.foundation)
implementation(libs.accompanist.drawablepainter)
implementation(libs.compose.ui.tooling.preview)
debugImplementation(libs.compose.ui.tooling)
+2
View File
@@ -53,6 +53,8 @@ libsu-nio = { module = "com.github.topjohnwu.libsu:nio", version.ref = "libsu" }
activity-compose = { module = "androidx.activity:activity-compose", version = "1.13.0" }
accompanist-drawablepainter = { module = "com.google.accompanist:accompanist-drawablepainter", version = "0.37.3" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose-ui" }
compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-ui" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-ui" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose-ui" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose-ui" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-m3" }