Hacker News new | ask | show | jobs
by madisp 4057 days ago
Actually resources.arsc only contains the resource table (think stuff in values/ folders, like strings.xml). The layouts still have their own xml files in res/layout. It is in Android's XML chunk format though, not plain-text xml.

Interesting point - the resource table still has references to the XML files for configuration-resolving purposes, but they are only strings. E.g. getString(R.layout.main) will actually work and return "res/layout/main.xml" or "res/layout-land/main.xml" depending on the device configuration (and assuming one has the layout-land version). Vice-versa, if you have a string resource with the value "res/layout/main.xml" and say, name foo, then calling setContentView(R.string.foo) actually works.