2012-06-03 25 views

回答

1
Intent websiteIntent = new Intent(Intent.ACTION_VIEW); 
Uri uri = Uri.parse("http://www.android.com"); 
websiteIntent.setData(uri); 
startActivity(websiteIntent); 
2

就在這個代碼添加到的onClick():

 // Launch a browser 
     Uri uri = Uri.parse("http://www.yahoo.com"); 
     Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
     startActivity(intent);   
1

試試這個

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"); 
startActivity(intent);