mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(android): fragment transactions to use 'add' instead of 'replace' on fwd navigation (#8791)
Changes the behavior of android fragment transactions to use `add` instead of `replace` on forward navigation. BREAKING CHANGE: Changes the internal behavior of Android navigation: * while navigating forward, the page navigated from is not unloaded anymore * events order is changed in the sense that now `unloaded` happens after `navigatedFrom` instead of before There are multiple plus sides to this: * no more black views on navigation when using opengl (maps, ...) * navigation is faster, especially the navigation back! No longer need to recreate the page anymore. Navigation forward also gets faster as we no longer unload the previous page * navigatedFrom event happens faster * this the default behavior used by most of the android native apps
This commit is contained in:
committed by
Nathan Walker
parent
1e3bc48737
commit
e17e46974b
@@ -181,7 +181,7 @@ function _test_PageNavigation_EventSequence(withTransition: boolean) {
|
||||
helper.navigateWithEntry(navigationEntry);
|
||||
helper.goBack();
|
||||
|
||||
const expectedEventSequence = ['navigatingTo', 'loaded', 'navigatedTo', 'navigatingFrom', 'unloaded', 'navigatedFrom'];
|
||||
const expectedEventSequence = ['navigatingTo', 'loaded', 'navigatedTo', 'navigatingFrom', 'navigatedFrom', 'unloaded'];
|
||||
TKUnit.arrayAssert(eventSequence, expectedEventSequence, 'Actual event sequence is not equal to expected. Actual: ' + eventSequence + '; Expected: ' + expectedEventSequence);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user