0

I am new in android my objective is that I have two different layouts one for vertical position and second one is for landscape position.

How can I use it.

  • http://stackoverflow.com/questions/2124046/how-do-i-specify-different-layouts-for-portrait-and-landscape-orientations ::: http://stackoverflow.com/questions/5407752/android-layout-folders-layout-layout-port-layout-land – SilentKiller Dec 10 '13 at 10:53
  • http://developer.android.com/guide/practices/screens_support.html – jpm Dec 10 '13 at 10:53

3 Answers3

1
  1. Create in your /res folder package with name layout-land
  2. put my_cool_landscape_activity.xml in there

And it works!

0

You should read android article about Supporting multiple screens. They will show you there how to use resources to get this behavior.

Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
0

Just put layout for vertical screen in layout folder in res and layout for landscape screen in layout-land with same name.

if layout-lan does not exist just create it.

vipul mittal
  • 17,343
  • 3
  • 41
  • 44