thieumao

Vao Web

May 24th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. package com.example.thieumao;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.net.Uri;
  6. import android.os.Bundle;
  7. import android.view.Menu;
  8. import android.view.View;
  9.  
  10. public class MainActivity extends Activity {
  11.  
  12.     @Override
  13.     protected void onCreate(Bundle savedInstanceState) {
  14.         super.onCreate(savedInstanceState);
  15.         setContentView(R.layout.activity_main);
  16.     }
  17.  
  18.     public void gotoNIIT(View view) {
  19.         Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://google.com/"));
  20.         startActivity(intent);
  21.     }
  22.  
  23.     @Override
  24.     public boolean onCreateOptionsMenu(Menu menu) {
  25.         // Inflate the menu; this adds items to the action bar if it is present.
  26.         getMenuInflater().inflate(R.menu.activity_main, menu);
  27.         return true;
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment