An easy to use CutableTextView when you need to cut a long text. ✂️ ✂️ ✂️
dependencies {
implementation 'com.github.devit951:cutabletextview:0.0.1'
...
}
<com.david.cutabletextview.CutableTextView
android:id="@+id/ctv_sample"
android:layout_margin="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Some loooooooooooooooooooooooooooooooooooooooooooooooong text"
app:ctv_lines_to_cut=4"/>
app:ctv_lines_to_cut=
cuts as many lines as you want (default 4).
If you want change this value programmatically , call this method CutableTextView#setLinesToCut(int lines);