title: Android Abstract Layout
body: <p>I'm trying to figure out a way to make an abstract layout.</p>
  
  <p>I have a XML layout file, defined as:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/Title"
          style="@style/bigText"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true" /&gt;
  
      &lt;ViewGroup
          android:id="@+id/QuestionArea"
          android:layout_below="@+id/Title"
          android:layout_centerHorizontal="true" /&gt;
  
      &lt;ViewGroup
          android:id="@+id/AnswerArea"
          android:layout_alignLeft="@+id/Title"
          android:layout_below="@+id/Title" 
          android:layout_alignParentBottom="true"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I want to create a family of classes, which all replace the QuestionArea and AnswerArea ViewGroups with their own custom Views. I've figured out how to get the ViewGroup, but I can't figure out how to take the other view and super-impose it with custom view I am making. Essentially, I want an abstract layout that I can pick and choose custom views to be inserted into placeholders.</p>
  
  <p>Alternatively, I would appreciate any thoughts on what might be a better way to do what I'm trying to do.</p>