У меня есть RecyclerView
элемент с одним изображением и двумя текстовыми представлениями.
Если текст слишком длинный, это приводит к тому, что один элемент будет больше, чем другой, и в целом плохой интерфейс.
Что я могу сделать, чтобы ограничить текст с учетом ширины другого вида - изображения в этом случае? («Три точки» будут для меня правильным решением)
мой код макета для элемент просмотра recycler:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/cast_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/cast_name_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="TextView"
app:layout_constraintEnd_toEndOf="@+id/cast_image"
app:layout_constraintStart_toStartOf="@+id/cast_image"
app:layout_constraintTop_toBottomOf="@+id/cast_image" />
<TextView
android:id="@+id/cast_char_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="TextView"
app:layout_constraintEnd_toEndOf="@+id/cast_name_text"
app:layout_constraintStart_toStartOf="@+id/cast_name_text"
app:layout_constraintTop_toBottomOf="@+id/cast_name_text" />
</androidx.constraintlayout.widget.ConstraintLayout>
Изображение для пояснения проблемы -
мне бы