webview error on connection and page errors via eclipse
<p>how can i show error message in this when there is no connection at any point during the webview of the website. and also is there any way to hide web page errors like 501, 404 etc. 
thanks in advance, i am new to the android applications so please be in detail. </p>

<pre><code>package com.website;

import android.app.Activity;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.KeyEvent;
import android.view.Window;
import android.content.Context;
import android.net.NetworkInfo;

public class HelloWebView extends Activity {
    WebView webview;
    /** Called when the activity is first created. */
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; webview.canGoBack()) {
            webview.goBack();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main);
        webview = (WebView) findViewById(R.id.webview);
        WebView.enablePlatformNotifications();
        webview.getSettings().setJavaScriptEnabled(true);
        webview.setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
        webview.loadUrl("http://www.google.com/");
        webview.setWebViewClient(new HelloWebViewClient());

    }

    private class HelloWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true; 
        }
    }



}
</code></pre>
