title: RecyclerView does not fully expand to show all elements
body: <p>I've created an EditText, a Button and a RecyclerView (composed of 1 TextView and 1 ImageView children) to add TextViews <a href="https://i.stack.imgur.com/c9neQ.png" rel="noreferrer">that looks like this</a> . In the EditText at the top, users may enter text and hit the + button. This adds their text to a List(String) which is used to update the RecyclerView. The user may hit the x at the right to delete an entry from the RecyclerView. <a href="https://i.stack.imgur.com/BrjfQ.png" rel="noreferrer">Here is an image of the overall fragment layout</a></p>
  
  <p>The issue, which you can see in the image, is that after a few submissions, the RecyclerView stops expanding and remains at a fixed size (notice the small blip in the bottom right). You may scroll in the RecyclerView to view the items, items are still added to it, but it will not expand to the full size (the one in the image has 20+ items). If I delete an item, the height grows for some reason but it still won't display all elements and it shrinks back when I add a new item.</p>
  
  <p>Things I've tried</p>
  
  <p>Here is the RecyclerView code. The heirarchy goes</p>
  
  <pre><code>&lt;LinearLayout&gt;
     &lt;ScrollView&gt;
        &lt;LinearLayout&gt;
           &lt;RecyclerView /&gt;
        &lt;/LinearLayout&gt;
     &lt;/ScrollView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>All heights and widths are set to match parent, all orientations to vertical: </p>
  
  <pre><code>&lt;android.support.v7.widget.RecyclerView
              android:id="@+id/ingredientsRecyclerView"
              android:layout_marginTop="4dp"
              android:layout_marginLeft="4dp"
              android:layout_marginRight="4dp"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:clipChildren="false"
              android:clipToPadding="false"
              &gt;
  </code></pre>
  
  <p>The code to add an entry to the RecyclerView (outside of the adapter):</p>
  
  <pre><code>ingredientsButton.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              if (ingredientsText.getText().toString().length() &gt; 0) {
                  mIngredients.add(ingredientsText.getText().toString());
                  ingredientsText.setText("");
                  mAdapter.notifyDataSetChanged();
                  mRecyclerView.setBackgroundResource(R.drawable.rounded_edittext);
              }
          }
      });
  </code></pre>
  
  <p>And, finally, the code to delete an entry from the RecyclerView (inside the RV adapter): </p>
  
  <pre><code>cancelImage.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                          mIngredients.remove(getAdapterPosition());
                  mAdapter.notifyItemRemoved(getAdapterPosition());
                  mAdapter.notifyItemRangeChanged(getAdapterPosition(), mIngredients.size());
                  if(mAdapter.getItemCount() == 0)
                  mRecyclerView.setBackgroundResource(0);
              }
          });
  </code></pre>
  
  <p>Any assistance would be GREATLY appreciated, as I can't figure this out for the life of me!</p>