I have a situation where I need to preserve the complete state of a
WebView, not just the forward/back history (which is all that its
onSaveInstanceState method seems to care about), so the life cycle of
the view can't be tied to the activity that contains it.  Because of
this, I create the view within the context of a background service
using all of the normal conventions for that kind of thing (ongoing
notification, and menu option to fully shut things down), and attach
and detach the view to a single-task activity (this is one of those
cases where it's OK to do that) as needed.  A message-passing system
from the service to the current activity (if any) allows things like
the progress bar and JavaScript alerts to work.

This scheme works well for most things, but it falls apart when it
comes to "combo box" selection lists, which are becoming a requirement
as well. When it comes to those, WebView requires the context it's
created in to be an activity, and I can't find any way to work around
it like WebViewChrome allows for JavaScript alerts.

I'd like to be able to preserve the complete web view state as well as
have combo boxes work properly, but at this point the only choice I
have is to provide a switch that lets the user choose one or the
other.  Any ideas on ways to let me keep both?

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

Reply via email to