Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arslancharyev31 committed Jul 29, 2017
1 parent b4060a0 commit 30417eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
[![Download](https://api.bintray.com/packages/arslancharyev31/android/Anko-ExpandableTextView/images/download.svg) ](https://bintray.com/arslancharyev31/android/Anko-ExpandableTextView/_latestVersion)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

An expandable TextView for Android (Api 16+) which is entirely written in
An Expandable TextView for Android (Api 16+) which is entirely written in
[Kotlin](https://kotlinlang.org/) and takes advantage of [Anko](https://github.com/Kotlin/anko).
The library also handles configuration changes, so that the view remains
expanded/collapsed on configuration change.
expanded/collapsed on configuration change. Extends from `AppCompatTextView`.

## Table of Contents

Expand All @@ -32,15 +32,14 @@ The library is included in jCenter, so just add this dependency to your module l

```groovy
dependencies {
// Use `implementation` instead of `compile` if you are using Android Studio 3.0+
compile 'tm.charlie.androidlib:expandabletextview:1.0.2'
implementation 'tm.charlie.androidlib:expandable-textview:1.1.0'
}
```

## Usage

1. Define the `android:maxLines` attribute to set the number of lines for `ExpandableTextView`'s collapsed state.
2. Provide unique `id` to retain expanded/collapsed state.
2. Provide unique `id` so that library could restore its expanded/collapsed state after configuration change.

Then just use `ExpandableTextView` as you would use any other `TextView`.

Expand All @@ -61,7 +60,7 @@ expandableTextView(text = "Lorem ipsum...") {
maxLines = 3
}
```
[More in demo project](demo/src/main/java/tm/charlie/expandabletextview/demo/KotlinActivity.kt#L24-L38).
[More in demo project](demo/src/main/java/tm/charlie/expandabletextview/demo/KotlinActivity.kt#L31-L46).

## License

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

ext {
// Demo and lib versions
versionCode = 3
versionName = "1.0.2"
versionCode = 4
versionName = "1.1.0"

// Sdk and tools
minSdkVersion = 16
Expand Down
3 changes: 1 addition & 2 deletions expandable-textview/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bintray.gradle
install.gradle
deploy.gradle
5 changes: 2 additions & 3 deletions expandable-textview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ dependencies {
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
}

// Configs for publishing
// Config for publishing

//apply from: 'install.gradle'
//apply from: 'bintray.gradle'
//apply from: 'deploy.gradle'

0 comments on commit 30417eb

Please sign in to comment.