fix(andoird): crash on setting elevation on API21

This commit is contained in:
vakrilov
2020-01-22 18:06:11 +02:00
parent 386497ff8b
commit b40cc6bf3e

View File

@@ -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);
}