Re-using the same layout in multiple resource folders
<p>I've been trying to reuse the same layout in several resource folders, without success. First I tried following the instructions here: <a href="https://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters" rel="nofollow">https://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters</a> and adding a resource file like this:</p>

<pre><code>&lt;resources&gt;
    &lt;item name="main" type="layout"&gt;@layout/main_twopanes&lt;/item&gt;
&lt;/resources&gt;
</code></pre>

<p>I get two LINT warnings. The first is <code>Attribute is missing the Android namespace prefix</code>. If I fix that by adding a <code>xmlns:android="http://schemas.android.com/apk/res/android"</code>, then I still get <code>Unexpected text found in layout file: "@layout/layout_file"</code>. It will blow up when I try to inflate with these two exceptions:</p>

<pre><code>android.view.InflateException: Binary XML file line #2: Error inflating class resources
Caused by: java.lang.ClassNotFoundException: android.view.resources
</code></pre>

<p>I'm using API 15 and the support library. The include/merge trick doesn't seem to work with fragments, as that also blows up with a different exception.</p>

<p>Has anyone managed to get this to work?</p>

<p>Thanks!</p>
