Remove Easing suffix
Now that the easings are contained in an object, the suffix is redundant. Bug: 282730134 Test: Compiles Change-Id: I0c2b60e861fc619ffc7ba4cb1682b0af298982c4
This commit is contained in:
@@ -27,37 +27,37 @@ import com.android.app.animation.InterpolatorsAndroidX
|
||||
object Easings {
|
||||
|
||||
/** The standard interpolator that should be used on every normal animation */
|
||||
val StandardEasing = fromInterpolator(InterpolatorsAndroidX.STANDARD)
|
||||
val Standard = fromInterpolator(InterpolatorsAndroidX.STANDARD)
|
||||
|
||||
/**
|
||||
* The standard accelerating interpolator that should be used on every regular movement of
|
||||
* content that is disappearing e.g. when moving off screen.
|
||||
*/
|
||||
val StandardAccelerateEasing = fromInterpolator(InterpolatorsAndroidX.STANDARD_ACCELERATE)
|
||||
val StandardAccelerate = fromInterpolator(InterpolatorsAndroidX.STANDARD_ACCELERATE)
|
||||
|
||||
/**
|
||||
* The standard decelerating interpolator that should be used on every regular movement of
|
||||
* content that is appearing e.g. when coming from off screen.
|
||||
*/
|
||||
val StandardDecelerateEasing = fromInterpolator(InterpolatorsAndroidX.STANDARD_DECELERATE)
|
||||
val StandardDecelerate = fromInterpolator(InterpolatorsAndroidX.STANDARD_DECELERATE)
|
||||
|
||||
/** The default emphasized interpolator. Used for hero / emphasized movement of content. */
|
||||
val EmphasizedEasing = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED)
|
||||
val Emphasized = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED)
|
||||
|
||||
/**
|
||||
* The accelerated emphasized interpolator. Used for hero / emphasized movement of content that
|
||||
* is disappearing e.g. when moving off screen.
|
||||
*/
|
||||
val EmphasizedAccelerateEasing = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED_ACCELERATE)
|
||||
val EmphasizedAccelerate = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED_ACCELERATE)
|
||||
|
||||
/**
|
||||
* The decelerating emphasized interpolator. Used for hero / emphasized movement of content that
|
||||
* is appearing e.g. when coming from off screen
|
||||
*/
|
||||
val EmphasizedDecelerateEasing = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED_DECELERATE)
|
||||
val EmphasizedDecelerate = fromInterpolator(InterpolatorsAndroidX.EMPHASIZED_DECELERATE)
|
||||
|
||||
/** The linear interpolator. */
|
||||
val LinearEasing = fromInterpolator(InterpolatorsAndroidX.LINEAR)
|
||||
val Linear = fromInterpolator(InterpolatorsAndroidX.LINEAR)
|
||||
|
||||
private fun fromInterpolator(source: Interpolator) = Easing { x -> source.getInterpolation(x) }
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ internal fun PatternBouncer(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = SELECTED_DOT_REACTION_ANIMATION_DURATION_MS,
|
||||
easing = Easings.StandardAccelerateEasing,
|
||||
easing = Easings.StandardAccelerate,
|
||||
),
|
||||
)
|
||||
} else {
|
||||
@@ -140,7 +140,7 @@ internal fun PatternBouncer(
|
||||
animationSpec =
|
||||
tween(
|
||||
durationMillis = SELECTED_DOT_RETRACT_ANIMATION_DURATION_MS,
|
||||
easing = Easings.StandardDecelerateEasing,
|
||||
easing = Easings.StandardDecelerate,
|
||||
),
|
||||
)
|
||||
}
|
||||
@@ -333,7 +333,7 @@ private suspend fun showFailureAnimation(
|
||||
FAILURE_ANIMATION_DOT_SHRINK_ANIMATION_DURATION_MS,
|
||||
delayMillis =
|
||||
rowIndex * FAILURE_ANIMATION_DOT_SHRINK_STAGGER_DELAY_MS,
|
||||
easing = Easings.LinearEasing,
|
||||
easing = Easings.Linear,
|
||||
),
|
||||
)
|
||||
|
||||
@@ -343,7 +343,7 @@ private suspend fun showFailureAnimation(
|
||||
tween(
|
||||
durationMillis =
|
||||
FAILURE_ANIMATION_DOT_REVERT_ANIMATION_DURATION,
|
||||
easing = Easings.StandardEasing,
|
||||
easing = Easings.Standard,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -317,4 +317,4 @@ private val pinButtonPressedDuration = 100.milliseconds
|
||||
private val pinButtonPressedEasing = LinearEasing
|
||||
private val pinButtonHoldTime = 33.milliseconds
|
||||
private val pinButtonReleasedDuration = 420.milliseconds
|
||||
private val pinButtonReleasedEasing = Easings.StandardEasing
|
||||
private val pinButtonReleasedEasing = Easings.Standard
|
||||
|
||||
Reference in New Issue
Block a user