mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): BottomNavigation error on back press (application exit) (#8970)
This commit is contained in:
@@ -954,10 +954,13 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
|
||||
const hasRemovingParent = fragment.getRemovingParentFragment();
|
||||
|
||||
if (hasRemovingParent) {
|
||||
const bitmapDrawable = new android.graphics.drawable.BitmapDrawable(application.android.context.getResources(), this.backgroundBitmap);
|
||||
this.frame._originalBackground = this.frame.backgroundColor || new Color('White');
|
||||
this.frame.nativeViewProtected.setBackgroundDrawable(bitmapDrawable);
|
||||
this.backgroundBitmap = null;
|
||||
const nativeFrameView = this.frame.nativeViewProtected;
|
||||
if (nativeFrameView) {
|
||||
const bitmapDrawable = new android.graphics.drawable.BitmapDrawable(application.android.context.getResources(), this.backgroundBitmap);
|
||||
this.frame._originalBackground = this.frame.backgroundColor || new Color('White');
|
||||
nativeFrameView.setBackgroundDrawable(bitmapDrawable);
|
||||
this.backgroundBitmap = null;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
superFunc.call(fragment);
|
||||
|
||||
Reference in New Issue
Block a user