title: How to open button click url in default browser or webview
body: <p>How can I open an url in a <code>webview</code> or in the default browser after clicking a button? Currently, when I click the <code>btn1</code> button it prompts me to select a browser from the phone. I want to open this url inside the default browser or in a <code>webview</code>.</p>
  
  <p>Here is my java code:</p>
  
  <pre><code> public class myactivity extends Activity {
  
  @Override
      public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      Button bt1 = (Button) findViewById(R.id.btn_click_login);
      btn_login.setOnClickListener(new OnClickListener() {
           public void onClick(View v) {
               Intent myWebLink = new Intent(android.content.Intent.ACTION_VIEW);
               myWebLink.setData(Uri.parse("http://google.com"));
               startActivity(myWebLink);
            }
           }
       );
  }
  </code></pre>