Fix default clock moving up in picker preview

Test: Manually
Bug: 277929406

Change-Id: I9befc75fb42527058709217bebf972aa21ab2aa4
This commit is contained in:
Sherry Zhou
2023-04-19 22:10:48 +00:00
parent 7da9503c29
commit 435bbfb972

View File

@@ -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(