Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cliffus committed Apr 23, 2016
2 parents ce301fa + cdb301d commit 6d8d94d
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 100 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ CHANGE LOG
1.0.0
-----
Initial version of the ExpandableTextView

1.0.1
-----
Added support for Interpolators + update demo Activity
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Demo
----
This repository also contains a demo project.

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

Add dependency
--------------
Expand All @@ -32,7 +32,7 @@ library dependency

```groovy
dependencies {
compile ('at.blogc:expandabletextview:1.0.0@aar')
compile ('at.blogc:expandabletextview:1.0.1@aar')
}
```

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

// set interpolators for both expanding and collapsing animations
expandableTextView.setInterpolator(new OvershootInterpolator());

// or set them separately
expandableTextView.setExpandInterpolator(new OvershootInterpolator());
expandableTextView.setCollapseInterpolator(new OvershootInterpolator());

// toggle the ExpandableTextView
buttonToggle.setOnClickListener(new View.OnClickListener()
{
Expand Down Expand Up @@ -127,9 +134,7 @@ expandableTextView.setOnExpandListener(new ExpandableTextView.OnExpandListener()
Roadmap
=======

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

License
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "blogc.at.android.views"
Expand All @@ -21,7 +21,7 @@ android {

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


Expand Down
14 changes: 10 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest package="at.blogc.android.views"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest
xmlns:tools="http://schemas.android.com/tools"
package="at.blogc.android.views"
xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="AllowBackup">

<activity android:name="at.blogc.android.activities.MainActivity">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

</activity>

</application>

</manifest>
12 changes: 11 additions & 1 deletion app/src/main/java/at/blogc/android/activities/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.OvershootInterpolator;
import android.widget.Button;

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

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

// set interpolators for both expanding and collapsing animations
expandableTextView.setInterpolator(new OvershootInterpolator());

// or set them separately
expandableTextView.setExpandInterpolator(new OvershootInterpolator());
expandableTextView.setCollapseInterpolator(new OvershootInterpolator());

// toggle the ExpandableTextView
buttonToggle.setOnClickListener(new View.OnClickListener()
{
@SuppressWarnings("ConstantConditions")
@Override
public void onClick(final View v)
{
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta5'
classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
// NOTE: Do not place your application dependencies here; they belong
Expand Down
43 changes: 41 additions & 2 deletions expandabletextview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

def fullVersion = '1.0.0'
def fullVersion = '1.0.1'

group = 'at.blogc'
version = fullVersion

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion "23.0.3"

defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName fullVersion

buildConfigField 'int', 'DEFAULT_ANIMATION_DURATION', '750'
}
buildTypes {
release {
Expand Down Expand Up @@ -48,11 +50,48 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

install {
repositories.mavenInstaller {
pom.project {
name 'Android ExpandableTextview'
description 'An expandable TextView for Android.'
url 'https://github.com/Blogcat/Android-ExpandableTextView'
inceptionYear '2016'

packaging 'aar'
groupId 'at.blogc'
artifactId 'expandabletextview'
version fullVersion

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
connection 'https://github.com/Blogcat/Android-ExpandableTextView.git'
url 'https://github.com/Blogcat/Android-ExpandableTextView'

}
developers {
developer {
id 'cliffus'
name 'Cliff Ophalvens'
email 'cliff.ophalvens@gmail.com'
}
}
}
}
}

bintray {
user = "${bintray_user}"
key = "${bintray_apikey}"
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6d8d94d

Please sign in to comment.