Tags: google/horologist
Tags
[0.6.x] Cherry pick ambient and padding fixes (#2483) * Add lifecycle parameter to AmbientAware (#2481) --------- Co-authored-by: yschimke <yschimke@users.noreply.github.com> (cherry picked from commit 4cceb8d) * Cherry pick #2476 Ceil padding to 1px * Update ScalingLazyColumnDefaults.kt * 🤖 Updates screenshots --------- Co-authored-by: yschimke <yschimke@users.noreply.github.com>
Moves modifier to the scaffold instead of the pager component. (#2475) * Moves modifier to the scaffold instead of the pager component. Also the `pageNestedScrollConnection` parameter was redundant and has been removed from `PagerScreen`. --------- Co-authored-by: yschimke <yschimke@users.noreply.github.com>
[0.6.x] cherry pick ambient changes (#2477) * Refactor: AmbientAware API change (#2472) This change refactors the `AmbientAware` API to make it more intuitive and easier to use. The following changes were made: - The `AmbientAware` composable moves to the screen level - The `AmbientStateUpdate` class was merged into `AmbientState`. - The `AmbientState` sealed interface now has a data object `Interactive` and a data class `Ambient` to store AmbientDetails, as well as Inactive. --------- (cherry picked from commit f8ccc68) * Fix: Handle missing AmbientLifecycleObserver in Robolectric (#2474) * Fix: Handle missing AmbientLifecycleObserver in Robolectric Handles missing AmbientLifecycleObserver in Robolectric tests by catching NoClassDefFoundError and returning null instead of crashing. This allows ambient-aware composables to be tested in Robolectric without requiring a real device or emulator. --------- (cherry picked from commit 6cd025b)
Add rememberResponsiveColumnPadding (#2450) This change introduces a new composable function, `rememberResponsiveColumnPadding`, to calculate and remember padding values for Wear columns based on screen size and item types. It also adds a `ColumnItemType` interface with default implementations for common item types to determine padding, improving responsive design for Wear OS columns. Finally, it updates `rememberResponsiveColumnState` to use `rememberResponsiveColumnPadding` for content padding and includes tests with screenshots to validate padding behavior. --------- Co-authored-by: yschimke <yschimke@users.noreply.github.com>
PreviousNext