mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Trying to fix the Travis build.
This commit is contained in:
@ -376,6 +376,7 @@ export class Animation extends common.Animation implements definition.Animation
|
|||||||
private _enableHardwareAcceleration() {
|
private _enableHardwareAcceleration() {
|
||||||
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
|
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
|
||||||
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
|
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
|
||||||
|
if (cache){
|
||||||
let layerType = cache.getLayerType();
|
let layerType = cache.getLayerType();
|
||||||
if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) {
|
if (layerType !== android.view.View.LAYER_TYPE_HARDWARE) {
|
||||||
cache.layerType = layerType;
|
cache.layerType = layerType;
|
||||||
@ -383,11 +384,12 @@ export class Animation extends common.Animation implements definition.Animation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private _disableHardwareAcceleration() {
|
private _disableHardwareAcceleration() {
|
||||||
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
|
for (let i = 0, length = this._propertyAnimations.length; i < length; i++) {
|
||||||
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
|
let cache = <CacheLayerType>this._propertyAnimations[i].target._nativeView;
|
||||||
if (cache.layerType !== undefined) {
|
if (cache && cache.layerType !== undefined) {
|
||||||
cache.setLayerType(cache.layerType, null);
|
cache.setLayerType(cache.layerType, null);
|
||||||
cache.layerType = undefined;
|
cache.layerType = undefined;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user