File tree Expand file tree Collapse file tree
app/src/main/java/at/blogc/android/activities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import android .os .Bundle ;
55import android .util .Log ;
66import android .view .View ;
7+ import android .view .animation .OvershootInterpolator ;
78import android .widget .Button ;
89
910import at .blogc .android .views .ExpandableTextView ;
@@ -40,6 +41,13 @@ protected void onCreate(Bundle savedInstanceState)
4041 // set animation duration via code, but preferable in your layout files by using the animation_duration attribute
4142 expandableTextView .setAnimationDuration (750L );
4243
44+ // set interpolators for both expanding and collapsing animations
45+ expandableTextView .setInterpolator (new OvershootInterpolator ());
46+
47+ // or set them separately
48+ expandableTextView .setExpandInterpolator (new OvershootInterpolator ());
49+ expandableTextView .setCollapseInterpolator (new OvershootInterpolator ());
50+
4351 // toggle the ExpandableTextView
4452 buttonToggle .setOnClickListener (new View .OnClickListener ()
4553 {
You can’t perform that action at this time.
0 commit comments