mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: use hide to prevent black with OpenGL during a transition
This commit is contained in:
@@ -439,6 +439,11 @@ export class Frame extends FrameBase {
|
||||
//transaction.setTransition(androidx.fragment.app.FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||
}
|
||||
|
||||
if (this._currentEntry && this._currentEntry.entry.backstackVisible === false) {
|
||||
// we only hide the fragment to fix some black blick issues with GLSurfaceView and GLTextureView
|
||||
// it will be removed once the navigation is done
|
||||
transaction.hide(this._currentEntry.fragment);
|
||||
}
|
||||
if (clearHistory || isReplace) {
|
||||
// we need to ensure we dont listen for animations of
|
||||
// in between fragments or they could break our transition end handling
|
||||
@@ -450,9 +455,6 @@ export class Frame extends FrameBase {
|
||||
} else {
|
||||
transaction.add(this.containerViewId, newFragment, newFragmentTag);
|
||||
}
|
||||
if (this._currentEntry && this._currentEntry.entry.backstackVisible === false) {
|
||||
transaction.remove(this._currentEntry.fragment);
|
||||
}
|
||||
transaction.commitNowAllowingStateLoss();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user