mike wrote: > We already proved that what you did here worked yesterday. > I don't want to setContentView to the webview initially. I want > to be able to paint up a screen and switch to the webview later, > via user control (ie, a button/menuitem).
Then make the WebView have visibility of GONE at the outset. Or use a ViewFlipper. > 1) I don't know what you mean by "never implement a constructor > in an Activity". I mean "never implement a constructor in an Activity". Anything you might have in a constructor should go in onCreate(), and a do-nothing constructor, like you had, is in the pointless-to-dangerous range. > 2) it doesn't matter where the constructor for the WebView is > called. It's the second setContentView call being called from the > menu/button click method that's causing the problem seemingly. > > 3) the return value of the onMenu doesn't affect the outcome here Points 1-3 were pointing out flaws in your code. Since you seem to be pointing out flaws in other people's code, I figured you would be interested to know where you are making other mistakes that might impact your activity working properly. > 4) Is a rather facile dodge, IMO. I call it from the button/menu listener > so that I can act on a user request which doesn't seem like it's asking > for a whole lot. Dismiss it as "not serious" if you like, but this > seems like > it's forcing me to code this as an Intent which would give a seriously > horrible user experience. No, you just have to get creative. As the Perl folk like to say, there's more than one way to do it. If your goal is "don't show the WebView 'til I'm good and ready", the solution you tried is one possibility, but I outlined others at the top, and there are probably still others beyond those. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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