fix: Fix issue for view not being removed from its parent (#8432)

This commit is contained in:
Vladimir Mutafov
2020-03-13 12:57:38 +02:00
committed by GitHub
parent 18a9b1aea8
commit e081340665

View File

@ -107,6 +107,14 @@ function initializeNativeClasses() {
this.owner._originalBackground = this.owner.backgroundColor || new Color("White");
this.owner.nativeViewProtected.setBackgroundDrawable(bitmapDrawable);
this.backgroundBitmap = null;
let thisView = this.getView();
if (thisView) {
let thisViewParent = thisView.getParent();
if (thisViewParent && thisViewParent instanceof android.view.ViewGroup) {
thisViewParent.removeView(thisView);
}
}
}
super.onDestroyView();