i need help. i have a RecyclerView containing different View such as Cardviews. Those CardViews contains a ListView
the cardViews height is wrap content and the listviews hight is also wrap content.
the listView in the first card contains three items the second card only one and the last card has a subitem.
how can i archive that the cards grow if their content change or if the expandableListView opens
i'm sorry for my bad engish
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
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:id="@+id/card_vocdetail_general"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/card_vocdetail_expandableList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="48dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/card_vocdetail_more"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/card_vocdetail_expandableList">
<TextView
android:id="@+id/card_vocdetail_more_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/card_detail_voc_more_sides"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/card_vocdetail_expandableList" />
<TextView
android:id="@+id/textView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:gravity="end"
android:text="@string/show_more" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>