UNPKG

1.96 kBTypeScriptView Raw
1// Definitions for Android API lvl 21 transitions
2declare namespace android {
3 export namespace transition {
4 export abstract class Transition extends java.lang.Object {
5 addListener(transition: Transition.TransitionListener): Transition;
6 removeListener(transition: Transition.TransitionListener): Transition;
7 setDuration(duration: number): Transition;
8 setInterpolator(interpolator: android.animation.TimeInterpolator): Transition;
9 }
10
11 export abstract class Visibility extends android.transition.Transition {
12 constructor();
13 }
14
15 export class Slide extends Visibility {
16 constructor(slideEdge: number);
17 }
18
19 export class Fade extends Visibility {
20 constructor(fadingMode: number);
21 static IN: number;
22 static OUT: number;
23 }
24
25 export class Explode extends Visibility {
26 constructor();
27 }
28
29 export namespace Transition {
30 export interface TransitionListener {
31 onTransitionStart(transition: android.transition.Transition): void;
32 onTransitionEnd(transition: android.transition.Transition): void;
33 onTransitionResume(transition: android.transition.Transition): void;
34 onTransitionPause(transition: android.transition.Transition): void;
35 onTransitionCancel(transition: android.transition.Transition): void;
36 }
37 }
38 }
39
40 export namespace app {
41 export interface Fragment {
42 getEnterTransition(): android.transition.Transition;
43 getExitTransition(): android.transition.Transition;
44 getReenterTransition(): android.transition.Transition;
45 getReturnTransition(): android.transition.Transition;
46 setEnterTransition(transition: android.transition.Transition): void;
47 setExitTransition(transition: android.transition.Transition): void;
48 setReenterTransition(transition: android.transition.Transition): void;
49 setReturnTransition(transition: android.transition.Transition): void;
50 setAllowEnterTransitionOverlap(allow: boolean): void;
51 setAllowReturnTransitionOverlap(allow: boolean): void;
52 }
53 }
54}