@@ -76,10 +76,10 @@ export class RootLayout extends RootLayoutBase {
76
76
return this . _playAnimation ( this . _getAnimationSet ( view , exitState ) , exitState ?. duration ) ;
77
77
}
78
78
79
- private _getAnimationSet ( view : View , shadeCoverAnimation : TransitionAnimation , backgroundColor : string = defaultShadeCoverOptions . color ) : Array < android . animation . Animator > {
79
+ private _getAnimationSet ( view : View , shadeCoverAnimation : TransitionAnimation , backgroundColor ? : string ) : Array < android . animation . Animator > {
80
80
const isBackgroundGradient = backgroundColor && backgroundColor . startsWith ( 'linear-gradient' ) ;
81
81
82
- const animationSet = Array . create ( android . animation . Animator , isBackgroundGradient ? 6 : 7 ) ;
82
+ const animationSet = Array . create ( android . animation . Animator , ! backgroundColor || isBackgroundGradient ? 6 : 7 ) ;
83
83
animationSet [ 0 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'translationX' , [ shadeCoverAnimation . translateX ] ) ;
84
84
animationSet [ 1 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'translationY' , [ shadeCoverAnimation . translateY ] ) ;
85
85
animationSet [ 2 ] = android . animation . ObjectAnimator . ofFloat ( view . nativeViewProtected , 'scaleX' , [ shadeCoverAnimation . scaleX ] ) ;
@@ -97,7 +97,10 @@ export class RootLayout extends RootLayoutBase {
97
97
if ( view . backgroundImage ) {
98
98
view . backgroundImage = undefined ;
99
99
}
100
- animationSet [ 6 ] = this . _getBackgroundColorAnimator ( view , backgroundColor ) ;
100
+
101
+ if ( backgroundColor ) {
102
+ animationSet [ 6 ] = this . _getBackgroundColorAnimator ( view , backgroundColor ) ;
103
+ }
101
104
}
102
105
return animationSet ;
103
106
}
0 commit comments