Sharing some XML between layouts
<p>I want to make something that is a vertical <code>LinearLayout</code> on the phone version of an app, a horizontal one for tablets.</p>

<p>The view in question is located inside a large XML file that specifies the entire view.</p>

<p>The <em>naive</em> way to do this is to just copy and paste the file from <code>res/layout</code> to <code>res/layout-sw600dp</code>. I did this and it works. However this means I know have to maintain <strong>two</strong> files if I want to make other UX changes. This is inefficient.</p>

<p>What is the easiest way to abstract away the LinearLayout in question?</p>

<p>I have looked at <a href="http://developer.android.com/guide/topics/ui/custom-components.html#basic" rel="nofollow">Custom Components</a> but it goes farther than I would like to go. I do not want to have to make code changes for this, it should be self-contained in XML changes.</p>
