mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(andoird): crash on setting elevation on API21
This commit is contained in:
@@ -388,7 +388,7 @@ export class View extends ViewCommon {
|
||||
this.nativeViewProtected.setClickable(this._isClickable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this._manager = null;
|
||||
this._rootManager = null;
|
||||
super.onUnloaded();
|
||||
@@ -832,6 +832,11 @@ export class View extends ViewCommon {
|
||||
stateListAnimator.addState([statePressed, stateEnabled], pressedSet);
|
||||
stateListAnimator.addState([stateEnabled], notPressedSet);
|
||||
stateListAnimator.addState([], defaultSet);
|
||||
|
||||
const currentAnimator = nativeView.getStateListAnimator();
|
||||
if (currentAnimator) {
|
||||
currentAnimator.jumpToCurrentState();
|
||||
}
|
||||
nativeView.setStateListAnimator(stateListAnimator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user