mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
fix(view-android): clear dialog fragment when closing modal view (#6852)
This commit is contained in:

committed by
Svetoslav

parent
fdebf049b2
commit
8c80044cc0
@ -91,6 +91,11 @@ function initializeDialogFragment() {
|
||||
return global.__native(this);
|
||||
}
|
||||
|
||||
public onDetachedFromWindow(): void {
|
||||
super.onDetachedFromWindow();
|
||||
this.fragment = null;
|
||||
};
|
||||
|
||||
public onBackPressed(): void {
|
||||
const view = this.fragment.owner;
|
||||
const args = <AndroidActivityBackPressedEventData>{
|
||||
@ -136,7 +141,6 @@ function initializeDialogFragment() {
|
||||
this._stretched = options.stretched;
|
||||
this._dismissCallback = options.dismissCallback;
|
||||
this._shownCallback = options.shownCallback;
|
||||
this.owner._dialogFragment = this;
|
||||
this.setStyle(android.support.v4.app.DialogFragment.STYLE_NO_TITLE, 0);
|
||||
|
||||
let theme = this.getTheme();
|
||||
|
Reference in New Issue
Block a user