I have an item of RecyclerView that looks :
If user click on the help icon, I want to show a description of the item in the middle expanding the height of the item like this:
I tryed differents ways but I cant make it work, I tryed to set the height of the parent ( but I dont think this is a good approach, since it should get the size automattically in fuction of how many text have the description) but it doesnt work, make layout wrap content doesnt work either since it is a RelativeLayout with alignparent bottom, any help will be great
Layout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll"
android:layout_width="wrap_content"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_margin="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:animateLayoutChanges="true"
android:background="@drawable/stroke_shop_adapter"
android:orientation="vertical">
<TextView
android:id="@+id/nombre"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/img"
android:layout_toLeftOf="@+id/ayuda"
android:gravity="center|top"
android:text="@string/level"
android:textColor="#fff"
android:textSize="15sp" />
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_gravity="center"
android:src="@drawable/cubo" />
<TextView
android:id="@+id/descripcion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/img"
android:layout_toLeftOf="@+id/ayuda"
android:layout_below="@+id/separador1"
android:layout_above="@+id/coste"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:gravity="center"
android:text=""
android:textColor="#fff"
android:textSize="14sp" />
<ImageView
android:id="@+id/ayuda"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/ayuda_icon"/>
<TextView
android:id="@+id/coste"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/ayuda"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:text="100$"
android:textColor="#fff"
android:textSize="13sp" />
<View
android:id="@+id/separador1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/nombre"
android:layout_toRightOf="@+id/img"
android:layout_toLeftOf="@+id/ayuda"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="2dp"
android:background="#00c6ff"/>
<TextView
android:id="@+id/nivel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/img"
android:layout_alignParentBottom="true"
android:text="Level: 5/7"
android:textColor="#fff"
android:textSize="13sp" />
<TextView
android:id="@+id/maxNivel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/separador1"
android:layout_marginBottom="5dp"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:text=""
android:textColor="#fff"
android:textSize="17sp" />