Saturday, June 23, 2012

[android-developers] Re: Destroy WebView without leaking window

Thanks for your response.

> accomplish? I'm asking because these dialogs are modal. All interaction and
> app reactions are meant to take place within the scope of that dialog until
> *the user* makes it disappear by pressing a button. It is pretty unusual
> that the activity wants to finish while a dialog is still open.

The user pre-configures a timeout by which he wants the javascript
execution to have ended, that's what I'm trying to implement.

> Another thing comes to my mind. The last time I had to play around with
> WebView (about a year ago) there was actually no alert popup support out of
> the box.

It's definitely there now.

> I don't know whether the latest API versions changed something about that
> but you must be using a WebView which has an overridden, customized
> WebChromeClient that is responsible for creating these JavaScript alert
> dialogs in the first place.

No, you can just put an alert('hello') in, at least on my Nexus S
4.0.4.

> So whatever code you are using there must be custom WebChromeClient that
> creates the dialog. Look for that code and change it in a way so you can
> dispose the dialog prior finishing the activity.

I'd prefer to use the default implementation, but I guess if I can't
solve the problem I could
implement the dialogs myself, thanks for the tip.

I tried putting a JS setTimeout() at the start of the script BTW but
alerts seem to take over the timer.

Pent

p.s. I'm not a JS programmer if that's not obvious :-)

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate