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:
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:
You'll have to change the layout parameters.
Your layout file in
layout
folder is only for portrait mode Now if you need landscape then createlayout-land
folder.It can be done it two ways:
1.) Either you define a new xml file in
layout-land
folder.2.) Use
android:configChanges="orientation"
in your activity tag inside manifest.xmlThen in your activity class:
Hope it helps !!!