Hi.
I'd like to build an application that loads different urls in a
webview.
I prefered the webview cause that gives the chance of deleting cache
and
things like that.
But loading an URL in a loop has the effect that everything but the
webView
is executed, till the end of the loop.

for(int i = 0; i < 10; i++) {
       WebView ansicht = new WebView(getBaseContext());
       ansicht.loadUrl(adress.toString());
        setContentView(ansicht);
        ansicht.clearCache(true);
        sleep(15000);
        System.out.println("instead something else");
}

i get the print "instead something else" every 15 seconds and after 10
times
the url will be loaded.

Why can't the webView be called in a loop?
What's my fault?

Another problem is that i want to call the loop in a seperate thread
but
have problems with the context. I store the context in the onCreate-
method
of the activity but in the thread it won't work.

Thanks,

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