Fixed SonarLint problems
* Removed alphaRelativeDuration as there is no use for it
This commit is contained in:
parent
1921583ff0
commit
4651c242cc
3 changed files with 14 additions and 15 deletions
|
|
@ -76,14 +76,8 @@ fun View.animate(
|
|||
animate().setListener(null).cancel()
|
||||
isVisible = true
|
||||
|
||||
val alphaRelativeDuration = if (enterOrExit && alpha < 1.0f) {
|
||||
(duration * (1 - alpha)).toLong()
|
||||
} else {
|
||||
(duration * alpha).toLong()
|
||||
}
|
||||
|
||||
when (animationType) {
|
||||
AnimationType.ALPHA -> animateAlpha(enterOrExit, alphaRelativeDuration, delay, execOnEnd)
|
||||
AnimationType.ALPHA -> animateAlpha(enterOrExit, duration, delay, execOnEnd)
|
||||
AnimationType.SCALE_AND_ALPHA -> animateScaleAndAlpha(enterOrExit, duration, delay, execOnEnd)
|
||||
AnimationType.LIGHT_SCALE_AND_ALPHA -> animateLightScaleAndAlpha(enterOrExit, duration, delay, execOnEnd)
|
||||
AnimationType.SLIDE_AND_ALPHA -> animateSlideAndAlpha(enterOrExit, duration, delay, execOnEnd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue