Files
NativeScript/tns-core-modules/ui/frame/fragment.transitions.d.ts
Hristo Hristov 7c68953009 Fix clear history transition (#4951)
* fix: Navigation test app added

* Removed native popToBackstack call.
Implemented custom fragment save/restore state.
When navigating back we reverse manually transitions/animations because we no longer add them to navite backstack.
Fragment instance stored on entry.
Animation and Transition listeners now holds reference to entry instead of fragment for easier update of fragment.
Animation and Transition listeners removed when entry removed from backstack.
Animation and Transition removed from fragment when fragment activity is destroyed.

* Revert package.json start up entry
Fixed bug where goBack took the last element in backstack while navigationQueue is not empty.
Fixed bug where goBack to specific entry in the backstack was removing that entry...
Removed duplicated method
Refactored method name
Fixed TS
2017-10-20 08:37:36 +03:00

62 lines
1.9 KiB
TypeScript

/**
* @module "ui/transition"
*/ /** */
import { NavigationTransition, BackstackEntry } from "../frame";
//@private
/**
* @private
*/
export const enum AnimationType {
enterFakeResourceId = -10,
exitFakeResourceId = -20,
popEnterFakeResourceId = -30,
popExitFakeResourceId = -40
}
/**
* @private
*/
export function _setAndroidFragmentTransitions(
animated: boolean,
navigationTransition: NavigationTransition,
currentFragment: any,
newFragment: any,
fragmentTransaction: any,
manager: any /* android.app.FragmentManager */): void;
/**
* @private
*/
export function _onFragmentCreateAnimator(fragment: any, nextAnim: number): any;
/**
* @private
* Called once fragment is recreated after it was destroyed.
* Reapply animations and transitions from entry to fragment if any.
*/
export function _updateTransitions(entry: BackstackEntry): void;
/**
* @private
* Called once fragment is going to reappear from backstack.
* Reverse transitions from entry to fragment if any.
*/
export function _reverseTransitions(previousEntry: BackstackEntry, currentEntry: BackstackEntry): boolean;
/**
* @private
* Called when entry is removed from backstack (either back navigation or
* navigate with clear history). Removes all animations and transitions from entry
* and fragment and clears all listeners in order to prevent memory leaks.
*/
export function _clearEntry(entry: BackstackEntry): void;
/**
* @private
* Called when fragment is destroyed because activity is destroyed.
* Removes all animations and transitions but keeps them on the entry
* in order to reapply them when new fragment is created for the same entry.
*/
export function _clearFragment(fragment: any): void;
/**
* @private
*/
export function _createIOSAnimatedTransitioning(navigationTransition: NavigationTransition, nativeCurve: any, operation: number, fromVC: any, toVC: any): any;
//@endprivate