https://github.com/ykw93/expandabletextview
ExpandableTextView
https://github.com/ykw93/expandabletextview
andorid android-library expandabletextview
Last synced: 9 months ago
JSON representation
ExpandableTextView
- Host: GitHub
- URL: https://github.com/ykw93/expandabletextview
- Owner: YKW93
- License: apache-2.0
- Created: 2020-08-27T06:00:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-01T08:44:16.000Z (almost 6 years ago)
- Last Synced: 2025-06-17T13:50:27.672Z (about 1 year ago)
- Topics: andorid, android-library, expandabletextview
- Language: Kotlin
- Homepage:
- Size: 247 KB
- Stars: 30
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExpandableTextView
Read More TextView for Android

## Usage
#### Gradle
```gradle
dependencies {
implementation 'com.wayne.expandabletextview:expandable-textview:1.1.3'
}
```
#### How to use
* xml
```xml
```
* kotlin
```kotlin
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
et_test.stateChangeListener = object : OnStateChangeListener {
override fun onStateChanged(state: ExpandableTextView.State) {
tv_current_state.text = state.name
}
}
// change font
et_test.textTypeface = ResourcesCompat.getFont(this, R.font.roboto_bold)
}
}
```
#### Attributes
- `expandable_gradient_view_height` (16dp)
- `expandable_text` ("")
- `expandable_text_collapsedLines` (4)
- `expandable_text_color` (Color.BLACK)
- `expandable_text_line_spacing_extra` (8dp)
- `expandable_text_size` (14dp)
- `expandable_text_font`
#### Important note while applying font
- You must create a directory to res/value/ and place the font file within that path.
#### Fetures
- expand/colleapse animation
## License
```
Copyright 2020 @Wayne
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```