Skip to content

Commit 49ca2ad

Browse files
committed
Added example custom easing function.
1 parent 10c539c commit 49ca2ad

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
package com.xxmassdeveloper.mpchartexample.custom;
3+
4+
import com.github.mikephil.charting.animation.AnimationEasing.EasingFunction;
5+
6+
/**
7+
* Example of a custom made animation EasingFunction.
8+
*
9+
* @author Philipp Jahoda
10+
*/
11+
public class MyEasingFunction implements EasingFunction {
12+
13+
@Override
14+
public float ease(long elapsed, long duration) {
15+
16+
// do awesome stuff here, this is just linear easing
17+
return elapsed / (float) duration;
18+
}
19+
20+
}

0 commit comments

Comments
 (0)