You aren't setting the layout params correctly; you need to call the version of setContentView() that takes a LayoutParams argument.
On Mon, Jun 22, 2009 at 8:31 PM, Derek <dlawl...@gmail.com> wrote: > > Height is 0 in HierarchyViewer for the webview and both FrameLayouts. > The height of the LinearLayout is 53 which is also what the height of > the textview (title) is. Seems strange that the height is showing as > 0 in the properties of HierarchyViewer but the "DisplayView" shows a > fully populated screen. > > I tried manually setting the layoutParams to a pixel size using the > following code: > wv = new WebView(this); > wv.loadUrl(startPage); > LayoutParams params = new LayoutParams(260,260); > wv.setLayoutParams(params); > setContentView(wv); > > But didn't have any luck in seeing a change in the HierarchyViewer > height (or width). > > > On Jun 22, 9:53 pm, Dianne Hackborn <hack...@android.com> wrote: > > What is the size of the WebView/FrameLayout objects? What happens if you > > try setting the web view to a fixed size? > > > > > > > > On Mon, Jun 22, 2009 at 7:49 PM, Derek <dlawl...@gmail.com> wrote: > > > > > Very interesting... > > > > > Upon loading the view in the Hierarchy viewer I end up with a > > > hierarchy like this: > > > > > PhoneWindow$DecorView > > > | > > > LinearLayout > > > / \ > > > TextView FrameLayout > > > | > > > FrameLayout > > > | > > > WebView > > > > > If I look at each view walking up the tree, they all look like I would > > > expect (the full webview is loaded) until I click on the PhoneWindow > > > $DecorView. That is just showing the blank title. It seems like the > > > title TextView is the only part of the LinearLayout (the LinearLayout > > > looks like it should with fully populated WebView and title) > > > displaying once PhoneWindow$DecorView loads. > > > > > Does this mean we have an Android bug? > > > > > On Jun 22, 8:40 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > > Derek wrote: > > > > > Tried the setLayoutParams() with no luck :( > > > > > > > The xml layout I tried from Mark's suggestion also had the width, > > > > > height set to fill_parent. > > > > > > Jeff does bring up a good point, though. You could examine your > activity > > > > in hierarchyviewer and see if anything seems odd with the WebView -- > off > > > > the edge of the window, zero size, etc. > > > > > > -- > > > > Mark Murphy (a Commons Guy)http://commonsware.com| > > >http://twitter.com/commonsguy > > > > > > Android Development Wiki:http://wiki.andmob.org > > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see > and > > answer them. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---