Skip to content

Commit 6d8d94d

Browse files
committed
Merge branch 'release/1.0.1'
2 parents ce301fa + cdb301d commit 6d8d94d

File tree

11 files changed

+150
-100
lines changed

11 files changed

+150
-100
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ CHANGE LOG
44
1.0.0
55
-----
66
Initial version of the ExpandableTextView
7+
8+
1.0.1
9+
-----
10+
Added support for Interpolators + update demo Activity

README.md

+9-4
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
{
@@ -127,9 +134,7 @@ expandableTextView.setOnExpandListener(new ExpandableTextView.OnExpandListener()
127134
Roadmap
128135
=======
129136

130-
* take into account TextView padding and margin
131137
* optional fading edge at the bottom of the TextView
132-
* support for Interpolators
133138
* update demo project with more examples
134139

135140
License

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 23
5-
buildToolsVersion "23.0.2"
5+
buildToolsVersion "23.0.3"
66

77
defaultConfig {
88
applicationId "blogc.at.android.views"
@@ -21,7 +21,7 @@ android {
2121

2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
24-
compile 'com.android.support:appcompat-v7:23.1.1'
24+
compile 'com.android.support:appcompat-v7:23.3.0'
2525
compile project(':expandabletextview')
2626

2727

app/src/main/AndroidManifest.xml

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,28 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
16-
<manifest package="at.blogc.android.views"
17-
xmlns:android="http://schemas.android.com/apk/res/android">
16+
<manifest
17+
xmlns:tools="http://schemas.android.com/tools"
18+
package="at.blogc.android.views"
19+
xmlns:android="http://schemas.android.com/apk/res/android">
1820

1921
<application
2022
android:allowBackup="true"
2123
android:icon="@mipmap/ic_launcher"
2224
android:label="@string/app_name"
2325
android:supportsRtl="true"
24-
android:theme="@style/AppTheme">
26+
android:theme="@style/AppTheme"
27+
tools:ignore="AllowBackup">
28+
2529
<activity android:name="at.blogc.android.activities.MainActivity">
30+
2631
<intent-filter>
2732
<action android:name="android.intent.action.MAIN"/>
28-
2933
<category android:name="android.intent.category.LAUNCHER"/>
3034
</intent-filter>
35+
3136
</activity>
37+
3238
</application>
3339

3440
</manifest>

app/src/main/java/at/blogc/android/activities/MainActivity.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.os.Bundle;
55
import android.util.Log;
66
import android.view.View;
7+
import android.view.animation.OvershootInterpolator;
78
import android.widget.Button;
89

910
import at.blogc.android.views.ExpandableTextView;
@@ -28,8 +29,9 @@ public class MainActivity extends AppCompatActivity
2829
{
2930
private static final String TAG = "ExpandableTextView";
3031

32+
@SuppressWarnings("ConstantConditions")
3133
@Override
32-
protected void onCreate(Bundle savedInstanceState)
34+
protected void onCreate(final Bundle savedInstanceState)
3335
{
3436
super.onCreate(savedInstanceState);
3537
this.setContentView(R.layout.activity_main);
@@ -40,9 +42,17 @@ protected void onCreate(Bundle savedInstanceState)
4042
// set animation duration via code, but preferable in your layout files by using the animation_duration attribute
4143
expandableTextView.setAnimationDuration(750L);
4244

45+
// set interpolators for both expanding and collapsing animations
46+
expandableTextView.setInterpolator(new OvershootInterpolator());
47+
48+
// or set them separately
49+
expandableTextView.setExpandInterpolator(new OvershootInterpolator());
50+
expandableTextView.setCollapseInterpolator(new OvershootInterpolator());
51+
4352
// toggle the ExpandableTextView
4453
buttonToggle.setOnClickListener(new View.OnClickListener()
4554
{
55+
@SuppressWarnings("ConstantConditions")
4656
@Override
4757
public void onClick(final View v)
4858
{

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.0.0-beta5'
8+
classpath 'com.android.tools.build:gradle:2.0.0'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
1010
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
1111
// NOTE: Do not place your application dependencies here; they belong

expandabletextview/build.gradle

+41-2
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ apply plugin: 'com.android.library'
22
apply plugin: 'com.github.dcendents.android-maven'
33
apply plugin: 'com.jfrog.bintray'
44

5-
def fullVersion = '1.0.0'
5+
def fullVersion = '1.0.1'
66

77
group = 'at.blogc'
88
version = fullVersion
99

1010
android {
1111
compileSdkVersion 23
12-
buildToolsVersion "23.0.2"
12+
buildToolsVersion "23.0.3"
1313

1414
defaultConfig {
1515
minSdkVersion 14
1616
targetSdkVersion 23
1717
versionCode 1
1818
versionName fullVersion
19+
20+
buildConfigField 'int', 'DEFAULT_ANIMATION_DURATION', '750'
1921
}
2022
buildTypes {
2123
release {
@@ -48,11 +50,48 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
4850
classifier = 'javadoc'
4951
from javadoc.destinationDir
5052
}
53+
5154
artifacts {
5255
archives javadocJar
5356
archives sourcesJar
5457
}
5558

59+
install {
60+
repositories.mavenInstaller {
61+
pom.project {
62+
name 'Android ExpandableTextview'
63+
description 'An expandable TextView for Android.'
64+
url 'https://github.com/Blogcat/Android-ExpandableTextView'
65+
inceptionYear '2016'
66+
67+
packaging 'aar'
68+
groupId 'at.blogc'
69+
artifactId 'expandabletextview'
70+
version fullVersion
71+
72+
licenses {
73+
license {
74+
name 'The Apache Software License, Version 2.0'
75+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
76+
distribution 'repo'
77+
}
78+
}
79+
scm {
80+
connection 'https://github.com/Blogcat/Android-ExpandableTextView.git'
81+
url 'https://github.com/Blogcat/Android-ExpandableTextView'
82+
83+
}
84+
developers {
85+
developer {
86+
id 'cliffus'
87+
name 'Cliff Ophalvens'
88+
89+
}
90+
}
91+
}
92+
}
93+
}
94+
5695
bintray {
5796
user = "${bintray_user}"
5897
key = "${bintray_apikey}"

expandabletextview/src/androidTest/java/at/blogc/android/views/ApplicationTest.java

-15
This file was deleted.

expandabletextview/src/main/java/at/blogc/android/animator/AnimatorListener.java

-45
This file was deleted.

0 commit comments

Comments
 (0)