Webview with progress and url overriding

by Chister Nordvik » Fri, 09 Oct 2009 14:10:38 GMT


Sponsored Links
 Hi!

I would like to add a Webview that both intercepts the URL clicks and
shows a progress when loading.

URL overriding:
myWebView.setWebViewClient(new WebViewClient() {
                    @Override public boolean shouldOverrideUrlLoading(WebView 
view,
String url) {
...

Progress:
myWebView.setWebChromeClient(new WebChromeClient(){
          @Override
          public void onProgressChanged(WebView view, int newProgress) {
...

But is there any way to combine these two? The WebViewClient only
offers OnPageFinished and then I can't show any real progress when
loading.

-Christer

--~--~---------~--~----~------------~-------~--~----~



Webview with progress and url overriding

by Mark Murphy » Fri, 09 Oct 2009 19:53:06 GMT


 


They are separate objects. What do you mean by "combined"?


What makes you say that? Is your WebChromeClient object being ignored?

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

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Webview with progress and url overriding

by cnordvik » Sat, 10 Oct 2009 04:13:24 GMT


 > What makes you say that? Is your WebChromeClient object being ignored?

Uh, well it seems like the website that I tested did a redirect so the
progress bar got a bit confused. It was working great actually. Just
thought the API was a bit strange with both a WebViewClient and a
WebChromeClient so I thought I did something wrong. Anyway, thanks for
replying to a confusing post :-)

-Christer
--~--~---------~--~----~------------~-------~--~----~



Webview with progress and url overriding

by Mark Murphy » Sat, 10 Oct 2009 04:21:24 GMT


 


Ah, yeah, redirects are somewhat annoying with WebView.

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

Looking for Android opportunities?  http://wiki.andmob.org/hado 

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. confused with glOrthof

I use it gl.glOrthof(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);

The vertex are
private FloatBuffer triggerBuffer = FloatBuffer.wrap(new float[]{
                        0,0,-20,
                        1,0,-20 ,
                        0.5f,1,-20});

The triangle is out of ortho space .
Why the triangle also rendered on the surface?

-- 

2. App Name

Developers:

Does anyone know a way to have the name of the app, as shown in the menu be
different than the title shown for the app on the launcher activity?

Thanks,
Nick Owens
VP, ThreeClix
Office: (904) 429-7039
Mobile: (847) 565-9392
After Hours: (904) 540-5830



--

3. OOT: Test Please Ignore

4. create spinner with "add item" selection

5. Question about Notification contentView

6. [WTA] Aplikasi yang memberatkan kinerja Procie

7. last block incomplete in decryption