Reputation: 254
Issue !!!
I need to develop an application for tablet (v3.1) in both portrait and landscape orientation.
I have placed the resources:- For Portrait - Images in "drawable" and Layouts in "layout"
For Landscape - Images in "drawable-large" and Layouts in "layout-large"
Issue is that the landscape layouts are not picking the right images.
Can someone please help?
Upvotes: 2
Views: 448
Reputation: 2393
1.Create two main.xml files for layout in both case: landscape and portrait.
2.Put those two main.xml in resources according to its type:
/res/layout-land/main.xml
/res/layout-port/main.xml
Just build and try your application GUI in runtime.
or another example...
create only "layout-land" folder and copy paste your xml file.
/res/layout/main.xml
/res/layout-land/main.xml
Upvotes: 2
Reputation: 2854
layout-large
is for devices with large screens, and also we have for example layout-small
. the folder you need is layout-land
, that the "land" part stands for landscape.
Upvotes: 1
Reputation: 128448
I think your layout folder should be renamed as layout-large-land
or simply layout-land
The below snap is from Supporting Multiple Screens document.
Upvotes: 0