title: Set RecyclerView height dynamically
body: <p>I have use <code>RecyclerView</code> inside <code>ScrollView</code> .I set 50 items to the list. But <code>RecyclerView</code> doesn't show all item. Only 5 items are display in the screen. See <a href="https://i.stack.imgur.com/NQSMc.png" rel="nofollow noreferrer">here</a>.</p>
  
  <p>My layout file:</p>
  
  <pre><code>&lt;android.support.v7.widget.RecyclerView
              android:id="@+id/business_recycle"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:nestedScrollingEnabled="false"
              android:isScrollContainer="false"
              /&gt;
  </code></pre>
  
  <p>My Java class:</p>
  
  <pre><code>bcontractor = new ArrayList&lt;&gt;();
  badapter = new HomeBusinessAdapter(context, bcontractor);
  RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(context, 1);
  mLayoutManager.setAutoMeasureEnabled(true);
  businessdirList.setLayoutManager(mLayoutManager);
  businessdirList.setItemAnimator(new DefaultItemAnimator());
  businessdirList.setAdapter(badapter);
  </code></pre>
  
  <p>What can be done to display all items ?</p>