mike wrote:
> Oh! You should take that up with Google then because that's their
> HelloActivity example code. I didn't change a thing there. If it
> causes trouble, it's probably endemic because Hello World is where
> most beginners start.

Seriously?

I don't see a "Hello Activity" example on their site or in the samples/
directory of 2.1. I see "Hello World", but there's no constructors in
that activity. Can you point me to the URL with the instructions you
followed?

There's no question that in the samples there's some fairly awful stuff
lingering around, so this doesn't surprise me. If you can point me to
it, I'll file a bug.

>> I think calling setContentView() outside of onCreate() is cumbersome and
>> inelegant, but, to each their own.
> 
> Why? Is there actually some sort of proscription against calling
> setContentView more than once? I've been using it this way for the
> last year and a half and have never had a problem except for this.

No firm proscription. I get nervous about memory leaks, and it's
seriously inefficient to, say, keep replacing the WebView rather than
reloading data with loadDataWithBaseURL().

Also, in the hands of newcomers to Android, the technique lends itself
to apps with The One Big-Ass...Er, I Mean...The One True Activity rather
than implementing separate activities for different screens.

So, it's more than I'm not a fan of the technique. If it works for you
(outside of this WebView oddity) and you're not experiencing problems,
have at it.

But that's the reason why I didn't consider this a "serious bug" -- it's
an issue *if* you use setContentView() the way you do. If you only call
setContentView() once per activity, up in onCreate(), you'd never know
there was a problem. But, there's something definitely strange going on
with WebView -- not terribly shocking given how frakkin' complex it must
be to slam together WebKit code and Android's input method framework.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

-- 
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

Reply via email to