Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prongbang/expandabletextview

Expandable Text View Android Library
https://github.com/prongbang/expandabletextview

android android-library expandable textview textview-expand

Last synced: 22 days ago
JSON representation

Expandable Text View Android Library

Awesome Lists containing this project

README

        

# Expandable Text View
Expandable Text View Android Library

![screenshot gif](https://github.com/prongbang/ExpandableTextView/blob/master/screenshots/screenshots.gif?raw=true)

## Download
> build.gradle
```gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```

### Support Library

```gradle
implementation 'com.github.prongbang:expandabletextview:1.0.1'
```

### AndroidX

```gradle
implementation 'com.github.prongbang:expandabletextview:2.0.0'
```

## How to use
> MainActivity.kt
```kotlin
btnExpand.setOnClickListener {
tvDescription.expandTextView()
}

btnCollapse.setOnClickListener {
tvDescription.collapseTextView()
}

btnCycle.setOnClickListener {
tvDescription.cycleTextViewExpansion()
}
```

> activity_main.xml
```xml

```
> Properties
```xml
app:duration="200"
app:collapsedMaxLines="5"
app:autoDuration="true"
```

### Thank