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