By using this custom textView, when TextView's text is too long, we can collapse the text.
To add the ReadMoreText library to your Android Studio project, add the following Gradle dependency:
implementation 'com.github.AtineKeshishi:ReadMoreText:1.0.0'
To use the ReadMoreText on your app, add the following code to your layout:
<com.akeshishi.readmoretext.ReadMoreText
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
You can customize ReadMoreText with:
- app:expandingText: Text that appears when the view is collapsed.
- app:collapsingText: Text that appears when the view is expanded.
- app:readMoreMaxLines: Max lines to determine when the clickable text is displayed.
- app:readMoreTextColor: Text color of trim clickable text.

