Skip to content

Commit 3e0f647

Browse files
committed
update README: add example code for interpolators + change version code to 1.0.1
1 parent 019304e commit 3e0f647

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Demo
88
----
99
This repository also contains a demo project.
1010

11-
![Demo](https://raw.githubusercontent.com/Blogcat/Android-ExpandableTextView/release/1.0.0/demo.gif)
11+
![Demo](https://raw.githubusercontent.com/Blogcat/Android-ExpandableTextView/release/1.0.1/demo.gif)
1212

1313
Add dependency
1414
--------------
@@ -32,7 +32,7 @@ library dependency
3232

3333
```groovy
3434
dependencies {
35-
compile ('at.blogc:expandabletextview:1.0.0@aar')
35+
compile ('at.blogc:expandabletextview:1.0.1@aar')
3636
}
3737
```
3838

@@ -77,6 +77,13 @@ final Button buttonToggle = (Button) this.findViewById(R.id.button_toggle);
7777
// set animation duration via code, but preferable in your layout files by using the animation_duration attribute
7878
expandableTextView.setAnimationDuration(1000L);
7979

80+
// set interpolators for both expanding and collapsing animations
81+
expandableTextView.setInterpolator(new OvershootInterpolator());
82+
83+
// or set them separately
84+
expandableTextView.setExpandInterpolator(new OvershootInterpolator());
85+
expandableTextView.setCollapseInterpolator(new OvershootInterpolator());
86+
8087
// toggle the ExpandableTextView
8188
buttonToggle.setOnClickListener(new View.OnClickListener()
8289
{

0 commit comments

Comments
 (0)