title: How can I open my links in one webview in android?
body: <p>I have a ListView of some websites. What I want is that when a user clicks on listview, those websites are shown in same webview instead of starting a new activity. How can I do that?</p>
  
  <p>Here is my webview java:</p>
  
  <pre><code>import android.app.Activity;
  import android.app.ProgressDialog;
  import android.os.Bundle;
  import android.view.KeyEvent;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  public class Aftonbladet extends Activity {
      private WebView myWebView;
      /** Called when the activity is first created. */
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; myWebView.canGoBack()) { // Enables browsing to previous pages with the hardware back button
              myWebView.goBack();
              return true;
          }
          return super.onKeyDown(keyCode, event);
      }
  
  
      public void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.webview);
          final ProgressDialog pd = ProgressDialog.show(this, "", "Loading...",
                  true);
  
          myWebView = (WebView) findViewById(R.id.mywebview);
          myWebView.getSettings().setJavaScriptEnabled(true);
          myWebView.getSettings().setSupportZoom(true);  
          myWebView.getSettings().setBuiltInZoomControls(true);
          myWebView.setWebViewClient(new WebViewClient() {
              @Override
              public void onPageFinished(WebView view, String url) {
                  if(pd.isShowing() &amp;&amp; pd!=null)
                  {
                  pd.dismiss();
                  }
              }
          });
          myWebView.loadUrl("http://www.google.com");
  
      }
  }
  </code></pre>