summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
index 6ca7f12e842b..3fda83d7b6f4 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt
@@ -263,6 +263,13 @@ class DefaultClockController(
view.animateDoze(dozeState.isActive, !hasJumped)
}
}
+
+ override fun onPickerCarouselSwiping(swipingFraction: Float, previewRatio: Float) {
+ // TODO(b/278936436): refactor this part when we change recomputePadding
+ // when on the side, swipingFraction = 0, translationY should offset
+ // the top margin change in recomputePadding to make clock be centered
+ view.translationY = 0.5f * view.bottom * (1 - swipingFraction)
+ }
}
inner class LargeClockAnimations(