title: RecyclerView with GridLayoutManager inside RecyclerView with LinearLayoutManager
body: <p>I am basically trying the achieve this design principle (<a href="https://material.google.com/components/cards.html#cards-actions" rel="nofollow noreferrer">from Google's Material Design</a>):
  <a href="https://i.stack.imgur.com/bz59T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bz59T.png" alt="enter image description here"></a>
  Thus I've made a parent <code>RecyclerView</code> with a <code>LinearLayoutManager</code>, then in the <code>RecyclerView</code> adapter, I've put the child <code>RecyclerView</code> with a <code>GridLayoutManager</code> for the "rich media" section (Action area 2). Everything works fine, except for the fact that I've set the internal <code>RecyclerView</code> grid to have a <code>match_parent</code> width and a <code>wrap_content</code> height, but it won't calculate the size of the content properly, seemingly leaving it at 0 &amp; thus hidden. If I set the child <code>RecyclerView</code> to a specific height, the items show within, but are then of course cut off at the bottom.
  Others seem to have come across this problem, <a href="https://stackoverflow.com/questions/32011995/how-to-have-a-listview-recyclerview-inside-a-parent-recyclerview-i-have-a-pare">but in their case, both have linear layouts</a>. (Also see <a href="https://stackoverflow.com/questions/34569217/how-to-add-a-recyclerview-inside-another-recyclerview">"Khay's" answer here</a>.)</p>
  
  <p>Now my question is, how would one override the <code>onMeasure</code> method as "pptang" did in the accepted answer of the linked question above, but within a custom <code>GridLayoutManager</code> instead of a custom <code>LinearLayoutManager</code>? I haven't posted my code here, because it's essentially the identical to the one linked, only that I need to make a custom <code>GridLayoutManager</code> instead for the child <code>RecyclerView</code>, so that it measures correctly as "pptang's" answer states.</p>
  
  <p>Otherwise, is there a better way than to use 1 RecyclerView inside a 2nd RecyclerView? Can only 1 RecyclerView populate an activity/fragment both with a list of the above <code>CardViews</code> and a grid of unique items within each <code>CardView</code>? </p>