(resetOnFinish?: boolean)
| 158 | } |
| 159 | |
| 160 | public play(resetOnFinish?: boolean): AnimationPromise { |
| 161 | if (resetOnFinish !== undefined) { |
| 162 | this._resetOnFinish = resetOnFinish; |
| 163 | } |
| 164 | |
| 165 | if (this.isPlaying) { |
| 166 | return this._rejectAlreadyPlaying(); |
| 167 | } |
| 168 | |
| 169 | const animationFinishedPromise = super.play(); |
| 170 | |
| 171 | if (!this._animatorSet) { |
| 172 | this._animators = new Array<android.animation.Animator>(); |
| 173 | this._propertyUpdateCallbacks = new Array<Function>(); |
| 174 | this._propertyResetCallbacks = new Array<Function>(); |
| 175 | |
| 176 | for (let i = 0, length = this._propertyAnimations.length; i < length; i++) { |
| 177 | this._createAnimators(this._propertyAnimations[i]); |
| 178 | } |
| 179 | |
| 180 | this._nativeAnimatorsArray = Array.create(android.animation.Animator, this._animators.length); |
| 181 | for (let i = 0, length = this._animators.length; i < length; i++) { |
| 182 | this._nativeAnimatorsArray[i] = this._animators[i]; |
| 183 | } |
| 184 | |
| 185 | this._animatorSet = new android.animation.AnimatorSet(); |
| 186 | this._animatorSet.addListener(this._animatorListener); |
| 187 | } |
| 188 | this._play(); |
| 189 | return animationFinishedPromise; |
| 190 | } |
| 191 | |
| 192 | public cancel(): void { |
| 193 | if (!this.isPlaying) { |
nothing calls this directly
no test coverage detected