Friday, March 25, 2011

Re: [android-developers] Reuse webView between activities

On Fri, Mar 25, 2011 at 5:33 AM, Guilo <guilo.guilo@gmail.com> wrote:
> My app has a list of news. The list only show the title of the new. Clicking
> on a row opens a new activity with a webview in it that displays the full
> content of the new. But the thing is that if the user wants to view an other
> new, he will come back to the list and then start a new activity hence
> instanciating a new webview.... which is quite slow. So I can I reuse my
> webview ? Just passing it with Intent.putExtra ?

You cannot "reuse my webview" via putExtra().

You can use FLAG_REORDER_TO_FRONT or something to not create a new
"full content" activity, bringing the existing one (where available)
back to the foreground.

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

_The Busy Coder's Guide to Android Development_ Version 3.5 Available!

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment