Mark, thanks for looking into this. Unfortunately this has nothing to do with orientation. My app is only in portrait mode - apologies I should have supplied the manifest to make that clear. So I'm not sure any of the things you've mentioned are going to alter the issue. I've used fill_parent and added the manifest line anyway, but the behaviour is still the same. The webview content just disappears.
Please could you try it again in portrait mode only? On Dec 17, 6:10 pm, Mark Murphy <[email protected]> wrote: > On Fri, Dec 16, 2011 at 10:22 AM, Neilz <[email protected]> wrote: > > I'm not sure where I can post the project file. But from a new > > project, all you need is these two files, which is probably just as > > quick to implement: > > Do not use wrap_content for any widget dimension in a scrollable > direction. In the case of WebView, which can scroll horizontally or > vertically, do not use wrap_content for either the width or height. > Use other things to constrain the size. For example, after an > orientation change, I wound up with a zero-height WebView. > > That being said, even if i set the height to fill_parent, I am > definitely seeing strange behavior with the WebView with your supplied > content. > > Adding android:configChanges="orientation|keyboardHidden" to the > activity seems to clear up the problem, presumably because it keeps > the same WebView. Either use that or, better yet, move your WebViews > into dynamic fragments and use setRetainInstance(true), as that too > should keep the WebView widgets intact. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training in DC:http://marakana.com/training/android/ -- 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

