Correctly apply scrollY

The previous calculation was not correct.
Now we interpolate between the requested height, including the override,
and the actual view bounds.

Test: visual
Bug: 199047412
Change-Id: I62104d04c9cee22d12ca63d55e4f834e44dde335
This commit is contained in:
Lucas Dupin
2021-11-02 17:57:21 -07:00
parent cec069482f
commit 92097fc4a4

View File

@@ -242,12 +242,12 @@ open class QSTileViewImpl @JvmOverloads constructor(
}
private fun updateHeight() {
val actualHeight = (if (heightOverride != HeightOverrideable.NO_OVERRIDE) {
val actualHeight = if (heightOverride != HeightOverrideable.NO_OVERRIDE) {
heightOverride
} else {
measuredHeight
} * squishinessFraction).toInt()
bottom = top + actualHeight
}
bottom = top + (actualHeight * squishinessFraction).toInt()
scrollY = (actualHeight - height) / 2
}