Android WebViewClient - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android WebViewClient class.

This code example shows how to use the following methods: onPageStarted
        mConfig = new DomainConfig(new String[]{"mixi.jp", "mixi.co.jp"});
    } 
 
    public void testOnPageStarted() { 
		WebViewClient client = new WebViewClientProxy(new WebViewClient(), mConfig);
		client.onPageStarted(null, "http://mixi.jp", null);
		client.onPageStarted(null, "http://mixi.co.jp", null);
		client.onPageStarted(null, "http://t.mixi.jp", null);
		client.onPageStarted(null, "http://t.mixi.co.jp", null);
		 
	} 
	 
	public void testOnPageStartedOnException() { 
		try { 
			WebViewClient client = new WebViewClientProxy(new WebViewClient(), mConfig);
			client.onPageStarted(null, "http://mix.jp", null);
			fail();
		} catch (Exception exp) {
		} 
	} 
Full Snippet Info
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods: onPageStarted
        mConfig = new DomainConfig(new String[]{"mixi.jp", "mixi.co.jp"});
    } 
 
    public void testOnPageStarted() { 
		WebViewClient client = new WebViewClientProxy(new WebViewClient(), mConfig);
		client.onPageStarted(null, "http://mixi.jp", null);
		client.onPageStarted(null, "http://mixi.co.jp", null);
		client.onPageStarted(null, "http://t.mixi.jp", null);
		client.onPageStarted(null, "http://t.mixi.co.jp", null);
		 
	} 
	 
	public void testOnPageStartedOnException() { 
		try { 
			WebViewClient client = new WebViewClientProxy(new WebViewClient(), mConfig);
			client.onPageStarted(null, "http://mix.jp", null);
			fail();
		} catch (Exception exp) {
		} 
	} 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: shouldOverrideUrlLoading
  } 
 
  /** {@inheritDoc} */ 
  @Override 
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
      return mWrappedClient.shouldOverrideUrlLoading(view, url);
  } 
 
  /** {@inheritDoc} */ 
  @Override 
  public void onPageStarted(WebView view, String url, Bitmap favicon) {
    mWrappedClient.onPageStarted(view, url, favicon);
  } 
 
  /** {@inheritDoc} */ 
  @Override 
  public void onPageFinished(WebView view, String url) {
    mWrappedClient.onPageFinished(view, url);
  } 
 
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
        super.onCreate(savedInstanceState); 
    } 
 
    @Override 
    protected void overrideSettings() { 
        mWebView.setWebViewClient(new WebViewClient()); 
    } 
} 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
	public void setup() { 
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setSupportZoom(true);
        mWebView.getSettings().setBuiltInZoomControls(true);
		mWebView.setWebViewClient( new WebViewClient() );
		mWebView.loadUrl(URL);
	} 
 
	@Override 
	public void reload() {} 
 
	@Override 
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
	} 
} 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: onPageFinished
 
            throw new SecurityRuntimeException("cannot load " + url);
        } 
 
        public void onPageFinished(WebView view, String url) {
            mWebViewClient.onPageFinished(view, url);
        } 
 
        public void onLoadResource(WebView view, String url) {
            mWebViewClient.onLoadResource(view, url);
        } 
 
        @SuppressWarnings("deprecation") 
        public void onTooManyRedirects(WebView view, Message cancelMsg, Message continueMsg) {
            mWebViewClient.onTooManyRedirects(view, cancelMsg, continueMsg);
        } 
 
        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
            mWebViewClient.onReceivedError(view, errorCode, description, failingUrl);
        } 
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: onLoadResource
  } 
 
  /** {@inheritDoc} */ 
  @Override 
  public void onLoadResource(WebView view, String url) {
    mWrappedClient.onLoadResource(view, url);
  } 
 
  /** {@inheritDoc} */ 
  @Deprecated 
  @Override 
  public void onTooManyRedirects(WebView view, Message cancelMsg,
          Message continueMsg) {
      mWrappedClient.onTooManyRedirects(view, cancelMsg, continueMsg);
  } 
 
  /** {@inheritDoc} */ 
  @Override 
  public void onReceivedError(WebView view, int errorCode,
          String description, String failingUrl) {
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: onReceivedHttpAuthRequest
  } 
 
  @Override 
  public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host,
      String realm) {
    delegate.onReceivedHttpAuthRequest(view, handler, host, realm);
  } 
 
  @Override 
  public boolean shouldOverrideKeyEvent(WebView view, KeyEvent event) {
    return delegate.shouldOverrideKeyEvent(view, event);
  } 
 
  @Override 
  public void onUnhandledKeyEvent(WebView view, KeyEvent event) {
    delegate.onUnhandledKeyEvent(view, event);
  } 
 
  @Override 
  public void onScaleChanged(WebView view, float oldScale, float newScale) {
Full Snippet Info
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
		super(context);
		// TODO Auto-generated constructor stub 
		 
		webView = new WebView(context);
		webView.getSettings().setJavaScriptEnabled(true);
		WebViewClient wc = new WebViewClient();
		webView.setWebViewClient(wc);
		 
		this.addView(webView);
		 
	} 
 
	 
	public void setWebViewPosition(int x, int y) {
		posx = x;
		posy = y;
	} 
	 
	public void setWebViewSize(int x, int y) {
		sizex = x;
Full Snippet Info
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android WebViewClient Questions & Answers:

Other Android WebViewClient Examples

35:		}
36:		
37:		private class DisPlayWebPageActivityClient extends WebViewClient {
38:		    @Override
39:		    public boolean shouldOverrideUrlLoading(WebView view, String url) {

Read More

See Code Examples for Android WebViewClient Methods: