Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ara.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent niyet=new Intent(Intent.ACTION_VIEW,Uri.parse("www.google.com"));
- startActivity(niyet);
- https://www.google.com
- import android.app.Activity;
- import android.os.Bundle;
- import android.webkit.WebView;
- import android.webkit.WebViewClient;
- import android.widget.Toast;
- public class Main extends Activity {
- private WebView mWebview ;
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- mWebview = new WebView(this);
- mWebview.getSettings().setJavaScriptEnabled(true); // enable javascript
- final Activity activity = this;
- mWebview.setWebViewClient(new WebViewClient() {
- public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
- Toast.makeText(activity, description, Toast.LENGTH_SHORT).show();
- }
- });
- mWebview .loadUrl("http://www.google.com");
- setContentView(mWebview );
- }
- }
- Intent Browse = new Intent(Intent.ACTION_VIEW,Uri.parse("http://YOUR WEB SITE NAME"));
- startActivity(Browse);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement