I fought for sure! the same problem and finally found a solution, so even if the question is quite old, maybe someone will find it useful
Put the portrait layout in /res/layout/abc.xml (you already have)
Place the terrain layout in /res/layout/abc_land.xml
create layout.xml file with content
<?xml version="1.0" encoding="utf-8"?> <resources> <item name="abc" type="layout">@layout/abc_land</item> </resources>
copy this file into your directories /res/values-land/ and /res/values-xlarge/
It is important that your layout.xml file contains a link to the improved (landscape) file abc_land.xml , which is also stored in the layout directory, and that the files are in the values-x directories, not layout-x once.
I also tried to put two files abc_land.xml and abc_port.xml in the layout directory and create an alias on them from /res/values-land/ , /res/values-port/ , as well as /res/values-xlarge/ directories and, seems to work, so this is also a useful solution to do some βorderβ in the layouts!
source share