title: Get Layouts using integer-array Android
body: <p>I would like to retrieve the layouts' address using a  from my java file. However, what I get is 0.</p>
  
  <p>res/values/worlds.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;integer-array
          name="world1"&gt;
          &lt;item&gt;@layout/lvl_1&lt;/item&gt;
          &lt;item&gt;@layout/lvl_1&lt;/item&gt;
      &lt;/integer-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>and the Java code which I use to get the array:</p>
  
  <pre><code>Resources res = getResources();
  int[] layouts = res.getIntArray(R.array.world1);
  setContentView(layouts[0]);
  </code></pre>
  
  <p>the Java code gives me a 0 on my Logcat though.</p>