title: Is it possible in android to define constants in XML that vary with configuration
body: <p>I am interested in having an XML layouts in Android change size depending on landscape or portrait viewing (and maybe other configurations later).</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_alignParentBottom="true"
  android:background="@drawable/stream_bg_1px_wide"
  android:layout_height="150dip" &gt;
  </code></pre>
  
  <p>In this example I <em>just</em> want to vary the 150dip size depending on landscape or portrait, not change anything else.</p>
  
  <p>I am using layout and layout-land, and I know I could repeat the layout in each of those folders, but that makes maintaining changes in it a bit of a pain. When I introduce more variants based on screen density and size it just gets worse.</p>
  
  <p>So, I wondered if it's possible to define a value (constant) in an XML file, and reference it from my layout, similar to how colors can be defined</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;color name="shopper_background"&gt; #FFFFFF&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>along the lines of......</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;value name="footer_size" &gt;150&lt;/value&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Then I could just replicate that file, with different values, in each config.</p>
  
  <p>thanks for any help</p>