hodg wrote: > I was hoping someone might guide me in the best direction. I want to > apply a different layout depending on the orientation of the phone. > For example, when the keyboard is closed, I want to apply > main_vertical.xml. When its in landscape, main_landscape.xml. What > is the best way to do this?
Put the portrait one in res/layout. Put the landscape one in res/layout-land. Name them both the same (e.g., main.xml). And, *poof*, it works. I have three recent blog posts up on AndroidGuys, covering how to handle rotation events. Here's the third, which has links to the first two: http://androidguys.com/?p=2723 -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

