I am using cardslib to show expandable list of cards in cardListview, so the problem is when I tap on card it expands always at the bottom of the card but I want the card should expand inside my custom card layout(as shown in layout_home_item.xml).
I have referred cardslib documentation but couldn't able to figure it out. below is the code suggested by @gabrielemariotti : to use
card:card_layout_resourceID="@layout/layout_home_item"
<it.gmariotti.cardslib.library.view.CardListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
card:card_layout_resourceID="@layout/layout_home_item"
android:id="@+id/list" />
layout_home_item.xml :
<?xml version="1.0" encoding="utf-8"?><!-- A CardView that contains a TextView --><!-- A CardView that contains a TextView -->
<TextView
android:id="@+id/question_text"
android:layout_below="@id/user_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/read_more_img"
android:textSize="16sp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginBottom="20dp"
android:textColor="@color/black" />
**<FrameLayout //inner expanded area
android:id="@+id/card_content_expand_layout"
style="@style/card.main_contentExpand"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_below="@id/question_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"></FrameLayout>**
<ImageView
android:id="@+id/question_img"
android:layout_below="@id/card_content_expand_layout"
android:layout_width="match_parent"
android:src="@drawable/mat2"
android:layout_height="270dp" />