title: Creating Custom Views that accept other layouts in xml attributes
body: <p>I have an <a href="https://stackoverflow.com/questions/31419534/custom-layout-manager-using-predefined-and-developer-defined-child-views">open question</a> on here that I am trying to solve, and I might have found a possible solution that is less error-prone; however, I don't know how to code up the solution.</p>
  
  <p>The solution would be very similar to how <code>android.support.design.widget.NavigationView</code> handles the header view in XML!! The only problem is that I have tried to search for the source code for <code>NavigationView</code>, but I cannot seem to find it. I can find other Android Source code easily - except for the newer Design Library.</p>
  
  <p>If I can find the Source code from Google, then I can implement something similar.</p>
  
  <h2>Code</h2>
  
  <pre><code>&lt;android.support.design.widget.NavigationView
          android:layout_width="wrap_content"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          app:menu="@menu/drawer"
          app:headerLayout="@layout/drawer_header"  /&gt;
  </code></pre>
  
  <p>See that last line? I want to be able to do something like that for my own customView to insert another view inside it.</p>
  
  <p><strong>So my question is:</strong></p>
  
  <ul>
  <li><p>Where is the source code for the Design Library's NavigationView?</p>
  
  <p>OR</p></li>
  <li><p>Is there another custom view that allows you to insert layouts inside of it that has code posted online?</p>
  
  <p>OR</p></li>
  <li><p>If there is nothing online, then how would a person go about doing that? It is possible. The NavigationView does it.</p></li>
  </ul>