Click here to Skip to main content
15,891,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I have a relative layout with several buttons in it.When auto rotate happens all buttons get overlapped.how can i avoid that so that all the controls remain intact on auto rotate??

Any help would be really appreciated.

Thanks

Thanks
Posted

1 solution

Then you should create 2 different files for the same same layout, one is for Portrait layout, and another is for Landscape layout.
So right now, if you having a layout file named as temp.xml (for portrait view), create another file and name it as temp_land.xml.

The android framework will understand the difference between these two files, and load the appropriate file in each of the modes.



-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900