I have a text view under card view I want to how three dots at the end of text view when text is long enough.
I have tried adding below lines in my text view but could not help me.
android:singleLine="true"
android:maxLines="1"
android:ellipsize="end"
Screenshot
This is my layout below:
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="#fff"
app:cardCornerRadius="3dp"
app:contentPadding="3dp"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/homeBookImage"
android:layout_width="120dp"
android:layout_height="150dp"
android:layout_marginEnd="232dp"
android:layout_marginRight="232dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/homeBookName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:text=""
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/homeBookImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
android:singleLine="true"
android:maxLines="1"
android:ellipsize="end"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
Someone please let me know how can I achieve desired layout. Any help would be appreciated.
THANKS