mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix: Fix issue for view not being removed from its parent (#8432)
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user