Search code examples
androidlayoutscreen-orientation

Rotating Views (but not Layouts) on screen orientation change


I would like to rotate Buttons/TextViews/etc. on screen orientation change but I want to keep layout unchanged. How can it be done? I'm using LinearLayouts.

This is what I mean: http://i46.tinypic.com/209hwnr.png


Solution

  • Create res->layout->layout-land and put your xml file for landscape mode

    Your layout file in layout folder is only for portrait mode Now if you need landscape then create layout-land folder.