Add a WebViewClient with a shouldOverrideUrlLoading() implementation. That method gets control for link clicks and redirects. You can then load the redirected URL back in the WebView.
On Sat, Nov 19, 2011 at 7:01 PM, DoubleCheese <[email protected]> wrote: > Hi, > I am using a webview to load a URL which results in a few 302 > redirects. However, I've noticed that it doesn't seem to follow the > redirects correctly. Is there a way to setup WebView so it follows the > redirect? > > Here is the code I use to initialize my WebView: > final WebView webview = (WebView) > findViewById(R.id.authBrowser); > webview.setVerticalScrollBarEnabled(false); > webview.setHorizontalScrollBarEnabled(false); > > WebSettings webSettings = webview.getSettings(); > webSettings.setBuiltInZoomControls(true); > webview.setWebViewClient(new ThisWebViewClient()); > webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE); > wv = webview.new WebViewTransport(); > wv.setWebView(webview); > > -- > 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 > -- 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.6 Available! -- 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

