title: Increase the height of recyclerview dynamically on item add
body: <p><a href="http://i.stack.imgur.com/6d1CU.png" rel="noreferrer">Display pic</a></p>
  
  <p>In my app, i want to increase the height of recycler view dynamically. As i add new item under complaints, the height of recycler view should increase. Is there a way to do it? Please help me with this. Thanks in advance. </p>
  
  <pre><code>&lt;LinearLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" 
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:orientation="vertical"&gt;
  
          &lt;TextView
              android:id="@+id/complaint_text_view"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@color/background_line"
              android:padding="@dimen/layout_margin"
              android:text="Complaints"
              android:textColor="@color/textColorFullBlack" /&gt;
  
          &lt;LinearLayout
              android:id="@+id/complaints_container"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_marginBottom="@dimen/layout_margin"
              android:layout_weight="1"&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/complaint_recycler_view"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="@dimen/layout_margin"
                  android:divider="@color/toolBarBackground"
                  android:groupIndicator="@android:color/transparent" /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;TextView
              android:id="@+id/instructions_text_view"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@color/background_line"
              android:padding="@dimen/layout_margin"
              android:text="Instructions"
              android:textColor="@color/textColorFullBlack" /&gt;
  
          &lt;FrameLayout
              android:id="@+id/instructions_container"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_marginBottom="@dimen/layout_margin"
              android:layout_weight="1"&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/instructions_recycler_view"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="@dimen/layout_margin"
                  android:divider="@color/toolBarBackground"
                  android:groupIndicator="@android:color/transparent" /&gt;
  
          &lt;/FrameLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"&gt;
  
              &lt;LinearLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="1"
                  android:background="@color/colorPrimary"
                  android:orientation="horizontal"&gt;
  
                  &lt;in.palmpower.videocon.uicommon.widget.EditText
                      android:id="@+id/search_text_field"
                      style="@style/FormEditText"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_margin="@dimen/one_dp"
                      android:layout_weight="1"
                      android:background="@android:color/white"
                      android:inputType="textFilter"
                      android:padding="@dimen/search_edit_text_padding"
                      android:privateImeOptions="nm" /&gt;
  
                  &lt;Button
                      android:id="@+id/add_button"
                      android:layout_width="wrap_content"
                      android:layout_height="match_parent"
                      android:layout_gravity="center_vertical"
                      android:background="?attr/selectableItemBackground"
                      android:contentDescription="@string/edittext_hint_search"
                      android:padding="@dimen/button_padding"
                      android:text="@string/add_button_string"
                      android:textColor="@color/textColorWhite" /&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>