Change DialogLaunchAnimator X-axis interpolator
This dialog changes the interpolator used to animate the X-axis position of dialogs during the launch animation. This avoid animating the dialog out of the screen bounds (see b/208241926#comment1). Bug: 208241926 Test: Manual Change-Id: Ia5accb747615fcc8410b5c488ff13617556305be
This commit is contained in:
@@ -49,7 +49,13 @@ class DialogLaunchAnimator @JvmOverloads constructor(
|
||||
) {
|
||||
private companion object {
|
||||
private val TIMINGS = ActivityLaunchAnimator.TIMINGS
|
||||
private val INTERPOLATORS = ActivityLaunchAnimator.INTERPOLATORS
|
||||
|
||||
// We use the same interpolator for X and Y axis to make sure the dialog does not move out
|
||||
// of the screen bounds during the animation.
|
||||
private val INTERPOLATORS = ActivityLaunchAnimator.INTERPOLATORS.copy(
|
||||
positionXInterpolator = ActivityLaunchAnimator.INTERPOLATORS.positionInterpolator
|
||||
)
|
||||
|
||||
private val TAG_LAUNCH_ANIMATION_RUNNING = R.id.launch_animation_running
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ class LaunchAnimator(
|
||||
)
|
||||
|
||||
/** The interpolators used by this animator. */
|
||||
class Interpolators(
|
||||
data class Interpolators(
|
||||
/** The interpolator used for the Y position, width, height and corner radius. */
|
||||
val positionInterpolator: Interpolator,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user