-
Notifications
You must be signed in to change notification settings - Fork 78
/
Transition.java
81 lines (69 loc) · 1.84 KB
/
Transition.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.kaichunlin.transition;
import android.support.annotation.UiThread;
import android.view.View;
import android.view.animation.Interpolator;
/**
* Represent the operations that should be performed with the given progress, usually performed on a view.
* <p>
* Created by Kai-Chun Lin on 2015/4/18.
*/
public interface Transition<T extends AbstractTransition.Setup> extends TransitionOperation, Cloneable {
/**
* Sets an ID the transition, used internally for debugging purpose
*
* @param id
* @return
*/
AbstractTransition setId(String id);
/**
*
* @return ID assigned for the transition, used internally for debugging purpose
*/
String getId();
/**
* Sets the transition progress
*
* @param progress
*/
@UiThread
void setProgress(float progress);
/**
* Reverses the transition
*
* @return itself
*/
Transition reverse();
/**
*
* @param setup
* @return itself
*/
Transition setSetup(T setup);
/**
*
* @return a carbon clone of this object that can be used independently from the object it's cloned from
*/
Transition clone();
/**
*
* @param interpolator the Interpolator that should be used
* @return itself
*/
Transition setInterpolator(Interpolator interpolator);
/**
*
* @param target the target this transition would modify
*/
void setTarget(View target);
/**
*
* @return the target this transition would modify
*/
View getTarget();
/**
*
* @param updateStateAfterUpdateProgress whether or not to update a controller's enable state after each {@link #updateProgress(float)} call
* @return itself
*/
Transition setUpdateStateAfterUpdateProgress(boolean updateStateAfterUpdateProgress);
}