title: Include a TextView and override the text
body: <p>I have a TextView I use as the headline of my menu page:</p>
  
  <pre><code>&lt;TextView
    android:id="@+id/menuTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Menu"
    android:textColor="@color/white"
    android:textSize="25sp"
    android:textStyle="bold" /&gt;
  </code></pre>
  
  <p>Now I need a TextView with the same color, size and style on every sub menu in my app. Instead of copy pasting the whole TextView to every layout and just change the text in each one I thought I'd make one layout with the TextView and include it in every sub menu view, only overriding the text.</p>
  
  <p>My code looks like this:</p>
  
  <p>/layout/menutextview.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/menuTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/default"
    android:textColor="@color/white"
    android:textSize="25sp"
    android:textStyle="bold" /&gt;
  </code></pre>
  
  <p>The includes in each layout xml file tries to override the text attribute:</p>
  
  <pre><code>&lt;include layout="@layout/menutextview" android:text="@string/menu" /&gt;
  
  &lt;include layout="@layout/menutextview" android:text="@string/settings" /&gt;
  </code></pre>
  
  <p>But the default text is displayed everywhere. Anyone have an idéa of what the problem might be?</p>
  
  <p>Regards,
  Mattias</p>