https://github.com/yingding/hscrollslc
https://github.com/yingding/hscrollslc
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yingding/hscrollslc
- Owner: yingding
- License: apache-2.0
- Created: 2023-01-04T15:49:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T16:30:55.000Z (over 3 years ago)
- Last Synced: 2025-02-23T23:43:15.683Z (over 1 year ago)
- Language: Kotlin
- Size: 83 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# horizontalScroll conflicts on SLC
This repo shows that the `horizontalScroll` modifier doesn't work on the parent composable of `androidx.wear.compose.material.ScalingLazyColumn`,
On the contrary, `horizontalScroll` works on
Dependencies:
* wear compose 1.1.0
* compose 1.3.2
Android Studio
```
Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.6.2
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 10
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
Non-Bundled Plugins:
idea.plugin.protoeditor (213.6461.28)
```
Emulator Version: 31.3.14
AVD: Wear OS 3 - Preview ARM 64 v8a System Image API 30, Rev 11
## How to recreate the issue
Please switch the `hasChildSLC` variable between `true` and `false`
in the `onCreate()` of the `MainActivity.kt`
```
setContent {
WearAppTheme {
// set the hasChildSLC to true to trigger IllegalArgumentException
val hasChildSLC = true
horizontalScollSLC(hasChildSLC = hasChildSLC)
}
}
```
to reproduce the `IllegalArgumentException`:
```console
java.lang.IllegalArgumentException: Failed requirement.
at androidx.wear.compose.material.ScalingLazyColumnKt$verticalNegativePadding$1.invoke-3p2s80s(ScalingLazyColumn.kt:725)
...
```