When using a recycler view with LinearLayoutManager.HORIZONTAL and height as wrap_content
is it trying to keep the list items having the same height?
It seems it does and some text is cut off. How can I solve this?
This is the layout for the item
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="@drawable/boundaries"
android:paddingTop="16dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_marginEnd="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="16dp"
android:layout_height="16dp"
android:orientation="vertical"
android:gravity="center"
>
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:gravity="center"
android:src="@drawable/my_icon”
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:layout_marginStart="12dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:maxWidth="200sp"
android:text="Some text of various length"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:includeFontPadding="false"
android:layout_marginStart="12dp"
android:layout_marginBottom="16dp"
android:gravity="bottom"
android:text="Some text that is not more than a line"
/>
</LinearLayout>
</LinearLayout>