Files
NativeScript/tns-core-modules/ui/frame/fragment.transitions.d.ts
Manol Donev cc19b400b9 fix(android): suppress reflection for default animations (#6141)
Fixes `Error: java.lang.CloneNotSupportedException: Class android.support.v4.app.FragmentManagerImpl$AnimationOrAnimator doesn't implement Cloneable` in specific projects.

Related to #5785
Related to #6129 

BREAKING CHANGE


Before:
Default fragment enter animation was Android version specific

After:
Default fragment enter animation is now fade animation for all Android versions

You can customise the transition per navigation entry or globally via the [navigation transitions API](
https://docs.nativescript.org/core-concepts/navigation#navigation-transitions)
2018-08-02 16:01:52 +03:00

67 lines
2.0 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,
currentEntry: BackstackEntry,
newEntry: BackstackEntry,
fragmentTransaction: any,
frameId: number): void;
/**
* @private
*/
export function _onFragmentCreateAnimation(entry: BackstackEntry, fragment: any, nextAnim: number, enter: boolean): any;
/**
* @private
*/
export function _getAnimatedEntries(frameId: number): Set<BackstackEntry>;
/**
* @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(entry: BackstackEntry): void;
/**
* @private
*/
export function _createIOSAnimatedTransitioning(navigationTransition: NavigationTransition, nativeCurve: any, operation: number, fromVC: any, toVC: any): any;
//@endprivate