try to create a folder "layout-land" and "layout-port" next to "layout".
just place main.xml inside both folders but not inside "layout". swapping the layout (numlock+7 inside the emulator) will show you the best fitting xml file. greetings, darolla 2009/2/10 Romain Guy <[email protected]>: > >> 1) Does Google think there will only be one screen size on Android >> phones? > > No. > >> The reason I ask is because I haven't been able to find >> anything on "variable" layouts in Android? > > All layouts are variable. > >> I would like to create a >> layout with 2 webviews, one 80% of screen height and the other 20%. >> Is this even possible, or do I need to assign the height of each as a >> static "px" value? > > That's what wrap_content, fill_parent, weight and in some measure the > dip unit are for. > >> 2) How do I preserve the data in my views when someone switches >> between landscape and portrait? I doubt it's hard, but I've not been >> able to find it. Can someone post an example? > > It's done automatically for all the views with an id. > > -- > Romain Guy > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

